All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
       [not found] <AAE35E953C746D4784A1A0C604EFEA714DFBD819@DLEE10.ent.ti.com>
@ 2015-02-18 17:23   ` Benoit Parrot
  0 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2015-02-18 17:23 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, linux-kernel, devicetree, Alexandre Courbot,
	Maxime Ripard, Jiri Prchal, Pantelis Antoniou, Benoit Parrot

Gentle ping.

Is there any chance this will make it in 3.21?

Benoit

Parrot, Benoit <bparrot@ti.com> wrote on Wed [2015-Feb-02 17:44:43 -0600]:
> 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 v5:
> * Addressed review comment from Linus Walleij
> * Replace "state" property back with separate boolean properties
> * Renamed helper function
> * Refactored pr_* calls to remove "__func__"
>  
> 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 |  30 ++++++
> drivers/gpio/gpiolib-of.c                       | 111 +++++++++++++++++++++
> drivers/gpio/gpiolib.c                          | 124 ++++++++++++++++++++----
> drivers/gpio/gpiolib.h                          |   3 +
> 4 files changed, 249 insertions(+), 19 deletions(-)
>  
> --
> 1.8.5.1
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>  
> 

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

* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
@ 2015-02-18 17:23   ` Benoit Parrot
  0 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2015-02-18 17:23 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, linux-kernel, devicetree, Alexandre Courbot,
	Maxime Ripard, Jiri Prchal, Pantelis Antoniou, Benoit Parrot

Gentle ping.

Is there any chance this will make it in 3.21?

Benoit

Parrot, Benoit <bparrot@ti.com> wrote on Wed [2015-Feb-02 17:44:43 -0600]:
> 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 v5:
> * Addressed review comment from Linus Walleij
> * Replace "state" property back with separate boolean properties
> * Renamed helper function
> * Refactored pr_* calls to remove "__func__"
>  
> 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 |  30 ++++++
> drivers/gpio/gpiolib-of.c                       | 111 +++++++++++++++++++++
> drivers/gpio/gpiolib.c                          | 124 ++++++++++++++++++++----
> drivers/gpio/gpiolib.h                          |   3 +
> 4 files changed, 249 insertions(+), 19 deletions(-)
>  
> --
> 1.8.5.1
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>  
> 

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

* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
  2015-02-18 17:23   ` Benoit Parrot
@ 2015-02-19 21:46       ` Michael Welling
  -1 siblings, 0 replies; 10+ messages in thread
From: Michael Welling @ 2015-02-19 21:46 UTC (permalink / raw)
  To: Benoit Parrot
  Cc: Linus Walleij, linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Alexandre Courbot,
	Maxime Ripard, Jiri Prchal, Pantelis Antoniou

On Wed, Feb 18, 2015 at 11:23:42AM -0600, Benoit Parrot wrote:
> Gentle ping.
> 
> Is there any chance this will make it in 3.21?
> 
> Benoit
>

Is there a reason that the pin has to be "hogged"?

Couldn't the pin be released after configuration for eventual use in the userspace?
 
> Parrot, Benoit <bparrot-l0cyMroinI0@public.gmane.org> wrote on Wed [2015-Feb-02 17:44:43 -0600]:
> > 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 v5:
> > * Addressed review comment from Linus Walleij
> > * Replace "state" property back with separate boolean properties
> > * Renamed helper function
> > * Refactored pr_* calls to remove "__func__"
> >  
> > 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 |  30 ++++++
> > drivers/gpio/gpiolib-of.c                       | 111 +++++++++++++++++++++
> > drivers/gpio/gpiolib.c                          | 124 ++++++++++++++++++++----
> > drivers/gpio/gpiolib.h                          |   3 +
> > 4 files changed, 249 insertions(+), 19 deletions(-)
> >  
> > --
> > 1.8.5.1
> >  
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >  
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
@ 2015-02-19 21:46       ` Michael Welling
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Welling @ 2015-02-19 21:46 UTC (permalink / raw)
  To: Benoit Parrot
  Cc: Linus Walleij, linux-gpio, linux-kernel, devicetree,
	Alexandre Courbot, Maxime Ripard, Jiri Prchal, Pantelis Antoniou

On Wed, Feb 18, 2015 at 11:23:42AM -0600, Benoit Parrot wrote:
> Gentle ping.
> 
> Is there any chance this will make it in 3.21?
> 
> Benoit
>

Is there a reason that the pin has to be "hogged"?

Couldn't the pin be released after configuration for eventual use in the userspace?
 
> Parrot, Benoit <bparrot@ti.com> wrote on Wed [2015-Feb-02 17:44:43 -0600]:
> > 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 v5:
> > * Addressed review comment from Linus Walleij
> > * Replace "state" property back with separate boolean properties
> > * Renamed helper function
> > * Refactored pr_* calls to remove "__func__"
> >  
> > 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 |  30 ++++++
> > drivers/gpio/gpiolib-of.c                       | 111 +++++++++++++++++++++
> > drivers/gpio/gpiolib.c                          | 124 ++++++++++++++++++++----
> > drivers/gpio/gpiolib.h                          |   3 +
> > 4 files changed, 249 insertions(+), 19 deletions(-)
> >  
> > --
> > 1.8.5.1
> >  
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >  
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
  2015-02-18 17:23   ` Benoit Parrot
@ 2015-02-20  4:53       ` Alexandre Courbot
  -1 siblings, 0 replies; 10+ messages in thread
From: Alexandre Courbot @ 2015-02-20  4:53 UTC (permalink / raw)
  To: Benoit Parrot
  Cc: Linus Walleij, linux-gpio-u79uwXL29TY76Z2rM5mHXA,
	Linux Kernel Mailing List, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Maxime Ripard, Jiri Prchal, Pantelis Antoniou

On Thu, Feb 19, 2015 at 2:23 AM, Benoit Parrot <bparrot-l0cyMroinI0@public.gmane.org> wrote:
> Gentle ping.
>
> Is there any chance this will make it in 3.21?

I'm good with it - Linus will probably come to it after the 3.20 merge
window closes.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
@ 2015-02-20  4:53       ` Alexandre Courbot
  0 siblings, 0 replies; 10+ messages in thread
From: Alexandre Courbot @ 2015-02-20  4:53 UTC (permalink / raw)
  To: Benoit Parrot
  Cc: Linus Walleij, linux-gpio, Linux Kernel Mailing List, devicetree,
	Maxime Ripard, Jiri Prchal, Pantelis Antoniou

On Thu, Feb 19, 2015 at 2:23 AM, Benoit Parrot <bparrot@ti.com> wrote:
> Gentle ping.
>
> Is there any chance this will make it in 3.21?

I'm good with it - Linus will probably come to it after the 3.20 merge
window closes.

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

* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
  2015-02-19 21:46       ` Michael Welling
  (?)
@ 2015-03-04  9:53       ` Linus Walleij
  -1 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2015-03-04  9:53 UTC (permalink / raw)
  To: Michael Welling
  Cc: Benoit Parrot, linux-gpio, linux-kernel, devicetree,
	Alexandre Courbot, Maxime Ripard, Jiri Prchal, Pantelis Antoniou

On Thu, Feb 19, 2015 at 10:46 PM, Michael Welling <mwelling@ieee.org> wrote:
> On Wed, Feb 18, 2015 at 11:23:42AM -0600, Benoit Parrot wrote:
>> Gentle ping.
>>
>> Is there any chance this will make it in 3.21?
>>
>> Benoit
>>
>
> Is there a reason that the pin has to be "hogged"?
>
> Couldn't the pin be released after configuration for eventual use in the userspace?

That can be added on later when/if we add support for
mapping pins to userspace.

If you know you want to give it to userspace and how to set
it up properly you certainly know what to name it too, so for
pins explicitly exported to userspace we need a mechanism
to name them and export them explicitly (without having userspace
exporting them to itself with that brain-damaged sysfs interface).

Yours,
Linus Walleij

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

* Re: [Patch v6 0/2] gpio: add GPIO hogging mechanism
  2015-02-02 17:44 ` Benoit Parrot
  (?)
@ 2015-02-26  9:38 ` Alexandre Courbot
  -1 siblings, 0 replies; 10+ messages in thread
From: Alexandre Courbot @ 2015-02-26  9:38 UTC (permalink / raw)
  To: Linus Walleij, Benoit Parrot
  Cc: linux-gpio, Linux Kernel Mailing List, devicetree, Maxime Ripard,
	Jiri Prchal, Pantelis Antoniou

Linus, this looks good to me in its current form, what are your thoughts?

On Tue, Feb 3, 2015 at 2:44 AM, Benoit Parrot <bparrot@ti.com> wrote:
> 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 v5:
>  * Addressed review comment from Linus Walleij
>  * Replace "state" property back with separate boolean properties
>  * Renamed helper function
>  * Refactored pr_* calls to remove "__func__"
>
> 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 |  30 ++++++
>  drivers/gpio/gpiolib-of.c                       | 111 +++++++++++++++++++++
>  drivers/gpio/gpiolib.c                          | 124 ++++++++++++++++++++----
>  drivers/gpio/gpiolib.h                          |   3 +
>  4 files changed, 249 insertions(+), 19 deletions(-)
>
> --
> 1.8.5.1
>

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

* [Patch v6 0/2] gpio: add GPIO hogging mechanism
@ 2015-02-02 17:44 ` Benoit Parrot
  0 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2015-02-02 17:44 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 v5:
 * Addressed review comment from Linus Walleij
 * Replace "state" property back with separate boolean properties
 * Renamed helper function
 * Refactored pr_* calls to remove "__func__"

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 |  30 ++++++
 drivers/gpio/gpiolib-of.c                       | 111 +++++++++++++++++++++
 drivers/gpio/gpiolib.c                          | 124 ++++++++++++++++++++----
 drivers/gpio/gpiolib.h                          |   3 +
 4 files changed, 249 insertions(+), 19 deletions(-)

-- 
1.8.5.1


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

* [Patch v6 0/2] gpio: add GPIO hogging mechanism
@ 2015-02-02 17:44 ` Benoit Parrot
  0 siblings, 0 replies; 10+ messages in thread
From: Benoit Parrot @ 2015-02-02 17:44 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 v5:
 * Addressed review comment from Linus Walleij
 * Replace "state" property back with separate boolean properties
 * Renamed helper function
 * Refactored pr_* calls to remove "__func__"

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 |  30 ++++++
 drivers/gpio/gpiolib-of.c                       | 111 +++++++++++++++++++++
 drivers/gpio/gpiolib.c                          | 124 ++++++++++++++++++++----
 drivers/gpio/gpiolib.h                          |   3 +
 4 files changed, 249 insertions(+), 19 deletions(-)

-- 
1.8.5.1


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

end of thread, other threads:[~2015-03-04  9:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AAE35E953C746D4784A1A0C604EFEA714DFBD819@DLEE10.ent.ti.com>
2015-02-18 17:23 ` [Patch v6 0/2] gpio: add GPIO hogging mechanism Benoit Parrot
2015-02-18 17:23   ` Benoit Parrot
     [not found]   ` <20150218172341.GA3851-l0cyMroinI0@public.gmane.org>
2015-02-19 21:46     ` Michael Welling
2015-02-19 21:46       ` Michael Welling
2015-03-04  9:53       ` Linus Walleij
2015-02-20  4:53     ` Alexandre Courbot
2015-02-20  4:53       ` Alexandre Courbot
2015-02-02 17:44 Benoit Parrot
2015-02-02 17:44 ` Benoit Parrot
2015-02-26  9:38 ` Alexandre Courbot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.