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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David,

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

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

(...)
>  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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux