linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gpio: acpi: some sanity fixes
@ 2014-08-19 17:06 Alexandre Courbot
  2014-08-19 17:06 ` [PATCH v2 1/2] gpio: acpi: normalize use of gpiochip_get_desc() Alexandre Courbot
  2014-08-19 17:06 ` [PATCH v2 2/2] gpio: change gpiochip_request_own_desc() prototype Alexandre Courbot
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandre Courbot @ 2014-08-19 17:06 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Mika Westerberg, linux-gpio, linux-kernel, gnurou,
	Alexandre Courbot

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(-)

-- 
2.0.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-29  6:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19 17:06 [PATCH v2 0/2] gpio: acpi: some sanity fixes Alexandre Courbot
2014-08-19 17:06 ` [PATCH v2 1/2] gpio: acpi: normalize use of gpiochip_get_desc() Alexandre Courbot
2014-08-29  6:57   ` Linus Walleij
2014-08-19 17:06 ` [PATCH v2 2/2] gpio: change gpiochip_request_own_desc() prototype Alexandre Courbot
2014-08-29  6:57   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).