Re: [PATCH v3 2/2] gpio: 74x164: Introduce the 'registers-default' property

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

 



On Wed, Dec 30, 2020 at 10:49 PM Fabio Estevam <festevam@xxxxxxxxx> wrote:

> From: Sandor Yu <sandor.yu@xxxxxxx>
>
> On the imx7d-sdb board, there is one output pin of the 74x164 that
> controls all peripherals power supply (PERI_3V).
>
> This pin should be at high voltage level when the 74x164 is probed,
> otherwise the modules dependent on PERI_3V3 will not be powered.

This seems like a usecase for a fixed GPIO regulator.
Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
drivers/regulator/fixed.c

> Add a new optional property called 'registers-default' that allows
> describing the default output value for each shift register.
>
> Signed-off-by: Sandor Yu <sandor.yu@xxxxxxx>
> Signed-off-by: Fabio Estevam <festevam@xxxxxxxxx>
> ---
> Changes since v2:
> -Add Sandor's Signed-off-by tag.

Again while poking some defaults into some registers does indeed
solve the problem, what we really want is to assign initial values
to GPIO lines for cases where there are no consumers.

If there are actually no device drivers on the GPIO line you can
use GPIO hogs.
Documentation/devicetree/bindings/gpio/gpio.txt

Otherwise e.g. properly obtain reset or GPIO regulator etc.

Deferred probe will sort things out,

If you just need the line to go to a certain level for the short
period between initializing the GPIO driver and the proper device
driver taking control of the line, we need initial GPIO line
values, which was discussed in my previous mail.

Yours,
Linus Walleij



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux