devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch v5 0/2] gpio: add GPIO hogging mechanism
@ 2014-12-19 20:07 Benoit Parrot
  2014-12-19 20:07 ` [Patch v5 1/2] " Benoit Parrot
  2014-12-19 20:07 ` [Patch v5 2/2] gpio: Document " Benoit Parrot
  0 siblings, 2 replies; 10+ messages in thread
From: Benoit Parrot @ 2014-12-19 20:07 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, linux-kernel, devicetree, Alexandre Courbot,
	Maxime Ripard, Jiri Prchal, Pantelis Antoniou, Benoit Parrot

This patch set re-introduces the gpio hogging concept first 
presented by Boris Brezillion.
This patch set provides a way to initially configure specific GPIO
when the GPIO controller is probed.

The actual DT scanning to collect the GPIO specific data is performed
as part of of_gpiochip_add().

The purpose of this is to allow specific GPIOs to be configured
without any driver specific code.
This is particularly useful because board design are getting
increasingly complex and given SoC pins can now have more
than 10 mux values a lot of connections are now dependent on
external IO muxes to switch various modes.

Specific drivers should not necessarily need to be aware of
what accounts to a specific board implementation. This board level
"description" should be best kept as part of the dts file.

Changes since v4:
 * Addressed review comments from Alexandre Courbot

Changes since v3:
 * Relocated the non-DT "hog" function to gpiolib.c.
 * Rename some of the function to be clearer and remove _ prefixes.
 * Replace the gpiod_request/gpiod_put usage with
   gpiochip_request_own_desc/free_own_desc version instead.
 * Refactor some of the logic to better handle error condition/reporting
 * Renamed the "direction" DT properties to "state".

Changes since v2:
 * Refactor the gpio-hog mechanism to split the DT related action
   from the actual "hogging" operation.
 * This allows non-DT providers to implement hogs as well.
 * Added FLAG_IS_HOGGED to mark hogged gpio and make gpiochip removal
   able to release hogged gpio.
 * Similarly to the hogging, the cleanup is performed as part of
   of_gpiochip_remove

Changes since v1:
 * Split the devicetree bindings documentation in its own patch.
 * Refactor the gpio-hog mechanism as private functions meant to
   be to invoked from of_gpiochip_add().

Benoit Parrot (2):
  gpio: add GPIO hogging mechanism
  gpio: Document GPIO hogging mechanism

 Documentation/devicetree/bindings/gpio/gpio.txt |  23 +++++
 drivers/gpio/gpiolib-of.c                       | 118 ++++++++++++++++++++++
 drivers/gpio/gpiolib.c                          | 128 ++++++++++++++++++++----
 drivers/gpio/gpiolib.h                          |   3 +
 4 files changed, 252 insertions(+), 20 deletions(-)

-- 
1.8.5.1


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

end of thread, other threads:[~2015-01-16 10:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-19 20:07 [Patch v5 0/2] gpio: add GPIO hogging mechanism Benoit Parrot
2014-12-19 20:07 ` [Patch v5 1/2] " Benoit Parrot
2015-01-12 10:16   ` Linus Walleij
2014-12-19 20:07 ` [Patch v5 2/2] gpio: Document " Benoit Parrot
2015-01-12 10:20   ` Linus Walleij
2015-01-12 10:28     ` Arend van Spriel
2015-01-12 16:39     ` Benoit Parrot
2015-01-12 21:43       ` Alexandre Courbot
2015-01-13 18:38         ` Benoit Parrot
     [not found]         ` <CAAVeFuLF7EVR-Xta=eNegmGWX9AFu9xmyhXisGCTwc1ds3t1cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-16 10:20           ` 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).