public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Linus Walleij <linusw@kernel.org>,
	Chanhong Jung <happycpu@gmail.com>,
	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: Tue, 5 May 2026 15:24:20 -0500	[thread overview]
Message-ID: <20260505202420.GA3809037-robh@kernel.org> (raw)
In-Reply-To: <CAMRc=MfQY2Z+q=YGO0jEBip0dGjyq+uCH8EZwi9RaUOJxf74UA@mail.gmail.com>

On Wed, Apr 29, 2026 at 11:03:46AM +0200, Bartosz Golaszewski wrote:
> On Tue, Apr 28, 2026 at 11:07 AM Linus Walleij <linusw@kernel.org> wrote:
> >
> > On Wed, Apr 22, 2026 at 6:05 PM Chanhong Jung <happycpu@gmail.com> 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.
> > >
> > > 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>
> >
> > See
> > Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml
> >
> >   lines-initial-states:
> >     $ref: /schemas/types.yaml#/definitions/uint32
> >     description:
> >       Bitmask that specifies the initial state of each line.
> >       When a bit is set to zero, the corresponding line will be initialized to
> >       the input (pulled-up) state.
> >       When the  bit is set to one, the line will be initialized to the
> >       low-level output state.
> >       If the property is not specified all lines will be initialized to the
> >       input state.
> >
> > If you want to set up initial states, use this property.
> >
> > This also makes it possible for us to centralize the handling later on.
> >
> 
> Ah, the old initial/default GPIO values problem strikes again. :(
> 
> IMO this is software configuration, not HW description. I think the
> driver should do it based on the compatible and/or machine. It should
> not be a property but if Krzysztof is fine with it, I'll queue it.

Sounds like h/w configuration to me. It's the board design dicating the 
config rather than the user.

Rob

  parent reply	other threads:[~2026-05-05 20:24 UTC|newest]

Thread overview: 19+ 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
2026-04-23 10:33     ` Chanhong Jung
2026-04-28  8:40       ` Krzysztof Kozlowski
2026-04-28  9:07   ` Linus Walleij
2026-04-29  3:50     ` Chanhong Jung
2026-04-29  9:03     ` Bartosz Golaszewski
2026-05-05  9:45       ` Linus Walleij
2026-05-05 11:00         ` Bartosz Golaszewski
2026-05-05 20:24       ` Rob Herring [this message]
2026-04-22 16:05 ` [PATCH v1 2/2] gpio: 74x164: support 'registers-default' DT property for initial state Chanhong Jung
2026-04-29  3:51 ` [PATCH v2 0/2] gpio: 74x164: seed the chain from DT at probe time Chanhong Jung
2026-04-29  3:51 ` [PATCH v2 1/2] dt-bindings: gpio: fairchild,74hc595: add lines-initial-states property Chanhong Jung
2026-04-30 12:08   ` Linus Walleij
2026-05-06  1:43   ` Rob Herring (Arm)
2026-04-29  3:51 ` [PATCH v2 2/2] gpio: 74x164: support lines-initial-states for boot-time output state Chanhong Jung
2026-04-30 12:09   ` Linus Walleij
2026-04-30 22:14     ` 정찬홍

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=20260505202420.GA3809037-robh@kernel.org \
    --to=robh@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 \
    /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