Re: [PATCH v2 0/2] gpio: 74x164: seed the chain from DT at probe time

From: Bartosz Golaszewski

Date: Wed May 06 2026 - 04:11:57 EST



On Wed, 29 Apr 2026 12:51:32 +0900, Chanhong Jung wrote:
> This v2 reuses the existing lines-initial-states bitmask, as suggested
> by Linus Walleij, instead of inventing a new property. That sidesteps
> both the v1 review concerns at once: there is no vendor-specific
> property to argue about, and the bit-N-equals-line-N convention is
> already documented for nxp,pcf8575.
>
> Background (carried over from v1):
> The 74HC595 / 74LVC594 family is push-pull output only. There is no
> read-back path, no defined power-on state for the parallel outputs, and
> __gen_74x164_write_config() always shifts the full chain on every
> transaction. The driver therefore publishes whatever sits in
> chip->buffer on the very first ->set() call, and today that buffer is
> fresh from kzalloc(), so all outputs come up low. On boards with active-
> low indicators or other signals whose initial level matters, the 0x00
> publish glitches the chain before user space (or gpio-leds default-state
> walking) gets a chance to run.
>
> [...]

Reluctantly applied.

[1/2] dt-bindings: gpio: fairchild,74hc595: add lines-initial-states property
https://git.kernel.org/brgl/c/d6e1a94888f5a4306c9998944a0f29f7bcd49411
[2/2] gpio: 74x164: support lines-initial-states for boot-time output state
https://git.kernel.org/brgl/c/cb77f8933467d08c8896674cd39ca98550a70fd6

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>