Re: Active-low behavior in gpiolib

2013-06-09 Thread Alexandre Courbot
On Fri, Jun 7, 2013 at 4:10 PM, Linus Walleij wrote: > Well it is designed as a sysfs-only thing according to the comment: > drivers/gpio/gpiolib.c:#define FLAG_ACTIVE_LOW 6 /* sysfs value > has active low */ > > So I think your actual question is whether it should also be > enabled for the

Re: Active-low behavior in gpiolib

2013-06-07 Thread Stephen Warren
On 06/07/2013 01:10 AM, Linus Walleij wrote: > On Wed, Jun 5, 2013 at 7:22 AM, Alexandre Courbot wrote: > >> FLAG_ACTIVE_LOW, on the other hand, is *only* set and used through >> sysfs operations. Independently, the active low property can be >> specified in gpio phandles and retrieved by >> of_g

Re: Active-low behavior in gpiolib

2013-06-07 Thread Linus Walleij
On Wed, Jun 5, 2013 at 7:22 AM, Alexandre Courbot wrote: > FLAG_ACTIVE_LOW, on the other hand, is *only* set and used through > sysfs operations. Independently, the active low property can be > specified in gpio phandles and retrieved by > of_get_(named_)gpio_flags() - only it has to be kept in a

Active-low behavior in gpiolib

2013-06-04 Thread Alexandre Courbot
Hi everyone, While preparing the v2 of the descriptor-based GPIO interface (gpiod), I stumbled upon this point that looks like some inconsistency in the current interface. gpiolib.c defines the following flags that can influence the gpio output: FLAG_ACTIVE_LOW, FLAG_OPEN_DRAIN, and FLAG_OPEN_SOU