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 16:07:11 +0000 [thread overview]
Message-ID: <ff6a81b9fdefa6b6156f1af39943312d6a445145.camel@gmail.com> (raw)
In-Reply-To: <821aafb4-d1a8-4611-addc-5bff4f1e187e@roeck-us.net>
On Mon, 2026-03-23 at 08:27 -0700, Guenter Roeck wrote:
> On 3/23/26 08:17, Nuno Sá wrote:
> > 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.
> >
>
> Ah, I didn't realize the small "A" vs. "G" difference (and apparently
> I don't understand what the AI is complaining about ;-). Sorry for the noise.
>
My understanding about the AI complain is the below dependencies:
+ adi,external-fault-retry-enable:
+ - adi,pgio4-func
+ adi,external-fault-fet-off-enable:
+ - adi,pgio4-func
The default value (omitting the property) is a valid case to use any of the above two
flags but with the above, omitting the property and adding the flag should result in
an error when validating the binding (because of the dependency). That is why I replied
with
"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?"
- Nuno Sá
next prev parent reply other threads:[~2026-03-23 16:06 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á
2026-03-23 15:27 ` Guenter Roeck
2026-03-23 16:07 ` Nuno Sá [this message]
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=ff6a81b9fdefa6b6156f1af39943312d6a445145.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