Thread (4 messages) 4 messages, 3 authors, 2018-08-19

Re: [PATCH] gpio: 74x164: add lines-initial-states property

From: Linus Walleij <hidden>
Date: 2018-08-16 08:11:54
Also in: linux-gpio, lkml

Hi David,

On Wed, Aug 15, 2018 at 10:19 PM David Bauer [off-list ref] wrote:
This adds the ability to define the initial state of each output line on
device probe.

Signed-off-by: David Bauer <redacted>
(...)
 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.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help