From: Krzysztof Kozlowski <krzk@kernel.org>
To: Chanhong Jung <happycpu@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] dt-bindings: gpio: fairchild,74hc595: add registers-default property
Date: Thu, 23 Apr 2026 10:59:16 +0200 [thread overview]
Message-ID: <20260423-quantum-precious-mantis-2481d7@quoll> (raw)
In-Reply-To: <33d515f13769c685e6811463a14e111252a7c58d.1776872453.git.happycpu@gmail.com>
On Thu, Apr 23, 2026 at 01:05:03AM +0900, Chanhong Jung wrote:
> The 74HC595 and 74LVC594 shift registers latch their outputs until the
> first serial write, so boards that depend on a specific power-on pattern
> (for example active-low indicators, reset lines, or other signals that
> must come up non-zero) have no way to express that today: the Linux
> driver always writes zeros from its zero-initialised buffer during
> probe.
You can fix the driver not to do that. Or fix the driver to properly
parse hogs. I don't understand why exactly this one driver needs
default registers stored in DT, but all other drivers in the kernel
don't.
>
> Describe a new optional 'registers-default' property that carries a u8
> array - one byte per cascaded register, in the same order used by the
> driver's internal buffer (first byte targets the last register in the
> chain). The Linux driver change that consumes this property follows.
>
> This property is already recognised by the corresponding U-Boot driver
> (drivers/gpio/74x164_gpio.c), so documenting it here brings the two
> bindings back in sync and allows boards to initialise the chain once
> from the bootloader DT and keep the same value after the kernel takes
> over.
>
> Signed-off-by: Chanhong Jung <happycpu@gmail.com>
> ---
> .../devicetree/bindings/gpio/fairchild,74hc595.yaml | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
> index 23410aeca..c6221ed75 100644
> --- a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
> +++ b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
> @@ -45,6 +45,15 @@ properties:
> $ref: /schemas/types.yaml#/definitions/uint32
> description: Number of daisy-chained shift registers
>
> + registers-default:
Where is this property defined (lack of vendor prefix means it is
generic property)? Otherwise you always need vendor properties. I really
dislike a generic "registers-default" property, because this is can of
worms for all sorts of poor DT.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-04-23 8:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 16:05 [PATCH v1 0/2] gpio: 74x164: seed the chain from DT at probe time Chanhong Jung
2026-04-22 16:05 ` [PATCH v1 1/2] dt-bindings: gpio: fairchild,74hc595: add registers-default property Chanhong Jung
2026-04-23 8:59 ` Krzysztof Kozlowski [this message]
2026-04-23 10:33 ` Chanhong Jung
2026-04-22 16:05 ` [PATCH v1 2/2] gpio: 74x164: support 'registers-default' DT property for initial state Chanhong Jung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260423-quantum-precious-mantis-2481d7@quoll \
--to=krzk@kernel.org \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=happycpu@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox