[lkml]   [2018]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] gpio: 74x164: add lines-initial-states property
Hi David,

On Wed, Aug 15, 2018 at 10:19 PM David Bauer <> wrote:

> This adds the ability to define the initial state of each output line on
> device probe.
> Signed-off-by: David Bauer <>

> Optional properties:
> - enable-gpios: GPIO connected to the OE (Output Enable) pin.
> +- lines-initial-states: Bitmask that specifies the initial state of
> + each line. When a bit is set to zero, the corresponding output line
> + is initialized LOW. When a bit is set to one, the corresponding
> + output line is initialized HIGH. In case this property is not
> + defined, all lines will be initialized as LOW.

This sounds like something that should be generic, and not use
a bitmask, but offsets. It should work even if the number of
GPIOs from the chip is > 32.

Is the usecase different from hogs?
See Documentation/devicetree/bindings/gpio.txt

There has been extensive discussion about supporting initial values
with something similar to hogs, but I haven't got anything ACKed
by the DT maintainers so it has kind of stalled.

I would make sure to both make it generic, get ACK from the DT
mainatiners, and make sure to implement it in
drivers/gpio/gpiolib-of.c and not locally in drivers.

Linus Walleij

 \ /
  Last update: 2018-08-16 10:13    [W:0.102 / U:1.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site