Linux Documentation
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>, nuno.sa@analog.com
Cc: linux-gpio@vger.kernel.org, linux-hwmon@vger.kernel.org,
	 devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>
Subject: Re: [PATCH v7 1/3] dt-bindings: hwmon: Document the LTC4283 Swap Controller
Date: Mon, 23 Mar 2026 15:17:34 +0000	[thread overview]
Message-ID: <63baaa6ea6ce7a8534046fea3d9f14fdb26f87a3.camel@gmail.com> (raw)
In-Reply-To: <453dbd6c-c68d-4977-8418-a898008b0fe7@roeck-us.net>

On Mon, 2026-03-23 at 07:33 -0700, Guenter Roeck wrote:
> [ ...]
> > > > +  adi,pgio1-func:
> > > > +    description: Configures the function of the PGIO1 pin.
> > > > +    $ref: /schemas/types.yaml#/definitions/string
> > > > +    enum: [inverted_power_good, power_good, gpio]
> > > > +    default: inverted_power_good
> > > > +
> > > > +  adi,pgio2-func:
> > > > +    description: Configures the function of the PGIO2 pin.
> > > > +    $ref: /schemas/types.yaml#/definitions/string
> > > > +    enum: [inverted_power_good, power_good, gpio, active_current_limiting]
> > > > +    default: inverted_power_good
> > > > +
> > > > +  adi,pgio3-func:
> > > > +    description: Configures the function of the PGIO3 pin.
> > > > +    $ref: /schemas/types.yaml#/definitions/string
> > > > +    enum: [inverted_power_good_input, power_good_input, gpio]
> > > > +    default: inverted_power_good_input
> > > > +
> > > > +  adi,pgio4-func:
> > > > +    description: Configures the function of the PGIO4 pin.
> > > > +    $ref: /schemas/types.yaml#/definitions/string
> > > > +    enum: [inverted_external_fault, external_fault, gpio]
> > > > +    default: inverted_external_fault
> > > > +
> > > > +  adi,gpio-on-adio1:
> > > > +    description: If set, the ADIO1 pin is used as a GPIO.
> > > > +    type: boolean
> > > > +
> > > > +  adi,gpio-on-adio2:
> > > > +    description: If set, the ADIO2 pin is used as a GPIO.
> > > > +    type: boolean
> > > > +
> > > > +  adi,gpio-on-adio3:
> > > > +    description: If set, the ADIO3 pin is used as a GPIO.
> > > > +    type: boolean
> > > > +
> > > > +  adi,gpio-on-adio4:
> > > > +    description: If set, the ADIO4 pin is used as a GPIO.
> > > > +    type: boolean
> > > 
> > > Does this dependency block force a redundant specification of adi,pgio4-func?
> > > The default for adi,pgio4-func is inverted_external_fault, which means the
> > > default hardware state already supports external fault features.
> > > If a device tree legitimately omits adi,pgio4-func to rely on that default,
> > > will it fail schema validation here since the dependencies keyword strictly
> > > checks for the literal presence of properties without injecting defaults?
> > 
> > Fair point. I guess it will fail but the alternative is to not have any constrain at all so
> > maybe worth it to be explicit in here?
> > 
> 
> I don't claim to understand how to define devicetree properties, but
> 
> adi,pgio4-func = <"gpio">
> 
> and
> 
> adi,gpio-on-adio4;
> 
> seem to be equivalent to me, and omitting the first property (because

Not exactly. ADIO4 and PGIO4 are different pins and can be both configured
as GPIOs. ADIO is a boolean because they are either monitored by the ADC (default)
or configured as GPIOs. PGIOs can have additional configurations and hence the
enum.

- Nuno Sá

> it defaults to inverted_external_fault) would cause the second to fail.
> So either both would be necessary or none. If that is correct, what is
> the point of having the adi,gpio-on-adio4 property in the first place ?
> 
> In other words, what is the difference between
> 	adi,pgio4-func = <"gpio">;
> 	adi,gpio-on-adio4;
> 
> and
> 	adi,pgio4-func = <"gpio">;
> (with no boolean property) ?

> 
> Thanks,
> Guenter

  reply	other threads:[~2026-03-23 15:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14 10:52 [PATCH v7 0/3] hwmon: Add support for the LTC4283 Hot Swap Controller Nuno Sá via B4 Relay
2026-03-14 10:52 ` [PATCH v7 1/3] dt-bindings: hwmon: Document the LTC4283 " Nuno Sá via B4 Relay
2026-03-16 15:59   ` Guenter Roeck
2026-03-23 10:31     ` Nuno Sá
2026-03-23 14:33       ` Guenter Roeck
2026-03-23 15:17         ` Nuno Sá [this message]
2026-03-23 15:27           ` Guenter Roeck
2026-03-23 16:07             ` Nuno Sá
2026-03-14 10:52 ` [PATCH v7 2/3] hwmon: ltc4283: Add support for " Nuno Sá via B4 Relay
2026-03-18  1:17   ` Guenter Roeck
2026-03-23 10:21     ` Nuno Sá
2026-03-14 10:52 ` [PATCH v7 3/3] gpio: gpio-ltc4283: " Nuno Sá via B4 Relay

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=63baaa6ea6ce7a8534046fea3d9f14fdb26f87a3.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.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