Thread (20 messages) read the whole thread 20 messages, 6 authors, 2026-05-06

Re: [PATCH v1 1/2] dt-bindings: gpio: fairchild,74hc595: add registers-default property

From: Bartosz Golaszewski <brgl@kernel.org>
Date: 2026-05-05 11:01:09
Also in: linux-gpio, lkml

On Tue, May 5, 2026 at 11:46 AM Linus Walleij [off-list ref] wrote:
On Wed, Apr 29, 2026 at 11:04 AM Bartosz Golaszewski [off-list ref] wrote:
quoted
quoted
  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.
This one is particularly uncomfortably hard to define.

If we depend on the machine we need to sprinkle
of_machine_is_compatible() over all drivers.

A lot of detailed properties that could have been handled by a few
gazillion of_machine_is_compatible():s are already present
in the kernel.

What is good about the property that has the same name
is that we can create nicer looking kernel code that is easier
to maintain. The DT maintainers may not care about that, but
from a GPIO subsystem PoV I think the line-initial-states
are better.
Fair enough. I'll still wait for DT maintainers' formal Ack before we
carve it in stone do avoid getting hit on th ehead with said stone
later on. :)

Bart
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help