Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-09-05 Thread Linus Walleij
On Sun, Aug 31, 2014 at 2:57 AM, Alexandre Courbot wrote: > Linus, please consider my position about this patch as neutral, and > feel free to take it if you think it is worth. I will meditate on this. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-30 Thread Alexandre Courbot
On Fri, Aug 29, 2014 at 10:37 AM, Guenter Roeck wrote: > On Fri, Aug 29, 2014 at 10:00:47AM -0700, Alexandre Courbot wrote: >> On Thu, Aug 28, 2014 at 10:54 PM, Guenter Roeck wrote: >> > On 08/28/2014 10:44 PM, Linus Walleij wrote: >> >> >> >> On Mon, Aug 11, 2014 at 5:20 PM, Alexandre Courbot >

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-29 Thread Guenter Roeck
On Fri, Aug 29, 2014 at 10:00:47AM -0700, Alexandre Courbot wrote: > On Thu, Aug 28, 2014 at 10:54 PM, Guenter Roeck wrote: > > On 08/28/2014 10:44 PM, Linus Walleij wrote: > >> > >> On Mon, Aug 11, 2014 at 5:20 PM, Alexandre Courbot > >> wrote: > >>> > >>> On Tue, Aug 12, 2014 at 12:15 AM, Guent

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-29 Thread Alexandre Courbot
On Thu, Aug 28, 2014 at 10:54 PM, Guenter Roeck wrote: > On 08/28/2014 10:44 PM, Linus Walleij wrote: >> >> On Mon, Aug 11, 2014 at 5:20 PM, Alexandre Courbot >> wrote: >>> >>> On Tue, Aug 12, 2014 at 12:15 AM, Guenter Roeck >>> wrote: >> >> This is just one of many patches which would make

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-28 Thread Guenter Roeck
On 08/28/2014 10:44 PM, Linus Walleij wrote: On Mon, Aug 11, 2014 at 5:20 PM, Alexandre Courbot wrote: On Tue, Aug 12, 2014 at 12:15 AM, Guenter Roeck wrote: This is just one of many patches which would make it possible to submit the rest, which would make use of it. What you are saying is

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-28 Thread Linus Walleij
On Mon, Aug 11, 2014 at 5:20 PM, Alexandre Courbot wrote: > On Tue, Aug 12, 2014 at 12:15 AM, Guenter Roeck wrote: >> This is just one of many patches which would make it possible to submit >> the rest, which would make use of it. What you are saying is that it won't >> make sense to submit that

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-12 Thread Guenter Roeck
On Mon, Aug 11, 2014 at 03:05:54PM -0700, Alexandre Courbot wrote: > On Mon, Aug 11, 2014 at 9:13 AM, Guenter Roeck wrote: > > On 08/11/2014 08:20 AM, Alexandre Courbot wrote: > > [ ... ] > > > >> > >> Note that this doesn't change anything to the core of the argument ; > >> we have not heard what

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-11 Thread Alexandre Courbot
On Mon, Aug 11, 2014 at 9:13 AM, Guenter Roeck wrote: > On 08/11/2014 08:20 AM, Alexandre Courbot wrote: > [ ... ] > >> >> Note that this doesn't change anything to the core of the argument ; >> we have not heard what Linus thinks about named GPIOs in >> /sys/class/gpio yet, maybe he will have a d

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-11 Thread Guenter Roeck
On 08/11/2014 08:20 AM, Alexandre Courbot wrote: [ ... ] Note that this doesn't change anything to the core of the argument ; we have not heard what Linus thinks about named GPIOs in /sys/class/gpio yet, maybe he will have a different opinion... Well, please let me know if/when you are planni

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-11 Thread Alexandre Courbot
On Tue, Aug 12, 2014 at 12:15 AM, Guenter Roeck wrote: > On 08/11/2014 08:01 AM, Alexandre Courbot wrote: >> >> On Thu, Aug 7, 2014 at 4:34 PM, Guenter Roeck wrote: Or you could have a platform device which sole purpose is to request the GPIOs to export and export them using gpio_e

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-11 Thread Guenter Roeck
On 08/11/2014 08:01 AM, Alexandre Courbot wrote: On Thu, Aug 7, 2014 at 4:34 PM, Guenter Roeck wrote: Or you could have a platform device which sole purpose is to request the GPIOs to export and export them using gpio_export() and gpio_export_link() using itself as the device parameters. All yo

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-11 Thread Alexandre Courbot
On Thu, Aug 7, 2014 at 4:34 PM, Guenter Roeck wrote: >> Or you could have a platform device which sole purpose is to request >> the GPIOs to export and export them using gpio_export() and >> gpio_export_link() using itself as the device parameters. All your >> links would then appear under the sam

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-07 Thread Guenter Roeck
On 08/06/2014 11:25 PM, Alexandre Courbot wrote: Sorry for the delayed reply... On Thu, Jul 24, 2014 at 3:33 PM, Guenter Roeck wrote: As I explained on the other thread, I still encourage you to have these GPIOs under device nodes that give a hint of who is provided the GPIO (effectively expor

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-08-06 Thread Alexandre Courbot
Sorry for the delayed reply... On Thu, Jul 24, 2014 at 3:33 PM, Guenter Roeck wrote: >> As I explained on the other thread, I still encourage you to have >> these GPIOs under device nodes that give a hint of who is provided the >> GPIO (effectively exporting the (dev, function) tuple to user-spac

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-07-25 Thread Guenter Roeck
On 07/25/2014 12:46 AM, Jiří Prchal wrote: What about this modification? If is defined label, use it prioritlly, at second use name in chip description. @@ -842,7 +842,9 @@ int gpiod_export(struct gpio_desc *desc, bool direction_may_change) spin_unlock_irqrestore(&gpio_lock, flags);

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-07-25 Thread Jiří Prchal
What about this modification? If is defined label, use it prioritlly, at second use name in chip description. @@ -842,7 +842,9 @@ int gpiod_export(struct gpio_desc *desc, bool direction_may_change) spin_unlock_irqrestore(&gpio_lock, flags); offset = gpio_chip_hwgpio(desc); -

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-07-23 Thread Guenter Roeck
On 07/23/2014 11:29 PM, Jiří Prchal wrote: Hi, just to append to this: is in plan some kind of exporting named GPIOs from device tree to /sys/* or /dev/*? It would be very useful not only for me. Because I thing what GPIO is used for what is hardware design dependent same as for example what S

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-07-23 Thread Guenter Roeck
On 07/23/2014 10:44 PM, Alexandre Courbot wrote: On Thu, Jul 24, 2014 at 3:12 AM, Guenter Roeck wrote: gpiod_export_name is similar to gpiod_export, but lets the user determine the name used to export a gpio pin. Currently, the pin name is determined by the chip driver with the 'names' array i

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-07-23 Thread Jiří Prchal
Hi, just to append to this: is in plan some kind of exporting named GPIOs from device tree to /sys/* or /dev/*? It would be very useful not only for me. Because I thing what GPIO is used for what is hardware design dependent same as for example what SPI chips are used. And SPI chips are in DT.

Re: [RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-07-23 Thread Alexandre Courbot
On Thu, Jul 24, 2014 at 3:12 AM, Guenter Roeck wrote: > gpiod_export_name is similar to gpiod_export, but lets the user > determine the name used to export a gpio pin. > > Currently, the pin name is determined by the chip driver with > the 'names' array in the gpio_chip data structure, or it is se

[RFC PATCH] gpiolib: Provide and export gpiod_export_name

2014-07-23 Thread Guenter Roeck
gpiod_export_name is similar to gpiod_export, but lets the user determine the name used to export a gpio pin. Currently, the pin name is determined by the chip driver with the 'names' array in the gpio_chip data structure, or it is set to gpioX, where X is the pin number, if no name is provided by