Skip to content

gpio: acpi: some sanity fixes

Alexandre Courbot linux-gpio lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Fixed a misdeclaration of struct gpio_desc
- Added Mika's Tested-by

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2gpio: acpi: normalize use of gpiochip_get_desc()drivers/gpio/gpiolib-acpi.c+14 -81 reply
2/2gpio: change gpiochip_request_own_desc() prototypeDocumentation/gpio/driver.txt drivers/gpio/gpiolib-acpi.c drivers/gpio/gpiolib.c +1 more+21 -231 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchMika Westerberg
1/2T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] gpio: acpi: some sanity fixes

These two small patches perform some sanity changes in gpiolib-acpi:

1) Stop assuming there is a direct 1:1 mapping between GPIO descriptors and GPIO numbers. This should not be taken for granted and will likely change in the future. GPIO descriptors should be handled like regulators and other allocated resources, i.e. obtained and preserved for later use instead of constantly requested using gpiochip_get_desc()

2) Change the prototype of gpiochip_request_own_desc() to match other functions in driver.h. This results is a simplification of the related code in gpiolib-acpi, which should be a good thing.

Changes since v1:
- Fixed a misdeclaration of struct gpio_desc
- Added Mika's Tested-by

Alexandre Courbot (2):
gpio: acpi: normalize use of gpiochip_get_desc()
gpio: change gpiochip_request_own_desc() prototype

 Documentation/gpio/driver.txt |  3 ++-
 drivers/gpio/gpiolib-acpi.c   | 30 +++++++++++-------------------
 drivers/gpio/gpiolib.c        | 18 ++++++++++++++----
 include/linux/gpio/driver.h   |  3 ++-
 4 files changed, 29 insertions(+), 25 deletions(-)
Signature · 1 line
2.0.4