From: Conor Dooley <conor@kernel.org>
To: Rodrigo Alencar <455.rodrigo.alencar@gmail.com>
Cc: rodrigo.alencar@analog.com, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
Michael Hennerich <Michael.Hennerich@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v2 2/6] dt-bindings: iio: amplifiers: Add AD8366 support
Date: Wed, 28 Jan 2026 14:43:20 +0000 [thread overview]
Message-ID: <20260128-grieving-polish-4292db90090d@spud> (raw)
In-Reply-To: <4dkomm5sskte4olhvjtkuae2t34qim5alp6ptsn3a2m6cyqqrt@kemulszlm3ta>
[-- Attachment #1: Type: text/plain, Size: 4193 bytes --]
On Wed, Jan 28, 2026 at 09:39:12AM +0000, Rodrigo Alencar wrote:
> On 26/01/27 07:38PM, Conor Dooley wrote:
> > On Tue, Jan 27, 2026 at 11:37:52AM +0000, Rodrigo Alencar wrote:
> > > On 26/01/26 08:11PM, Conor Dooley wrote:
> > > > On Mon, Jan 26, 2026 at 01:51:03PM +0000, Rodrigo Alencar via B4 Relay wrote:
> > > > > From: Rodrigo Alencar <rodrigo.alencar@analog.com>
> > > > >
> > > > > Add device tree binding documentation for amplifiers and digital
> > > > > attenuators. This covers different device variants with similar
> > > > > SPI control.
> > >
> > > ...
> > >
> > > > > +properties:
> > > > > + compatible:
> > > > > + enum:
> > > > > + - adi,ad8366
> > > > > + - adi,ada4961
> > > > > + - adi,adl5240
> > > > > + - adi,adrf5720
> > > > > + - adi,adrf5730
> > > > > + - adi,adrf5731
> > > > > + - adi,hmc271a
> > > > > + - adi,hmc792a
> > > > > + - adi,hmc1018a
> > > > > + - adi,hmc1019a
> > > > > + - adi,hmc1119
> > > >
> > > > Why do none of these devices use fallback compatibles? Please put the
> > > > rationale in the commit message.
> > >
> > > Will do. Each device has their own gain range/step.
> > >
> > > > > +
> > > > > + reg:
> > > > > + maxItems: 1
> > > > > +
> > > > > + vcc-supply:
> > > > > + description: Regulator that provides power to the device.
> > > > > +
> > > > > + reset-gpios:
> > > > > + maxItems: 1
> > > > > +
> > > > > + enable-gpios:
> > > > > + maxItems: 1
> > > >
> > > > How come enable-gpios is optional? Is it optional on all devices?
> > > > Do all devices support enable-gpios and/or reset-gpios?
> > >
> > > Board designs often hardwire powerup or serial mode enable signals
> > > to high voltage level, so there will not be a reason to add the
> > > enable-gpio.
> >
> > I don't see anything about all devices supporting enable-gpios, adl5240
> > doesn't appear to have one? I'm not going to check all of the datasheets
> > to see about the others, but you should disallow the property on devices
> > that don't have an enable pin.
>
> Understood. I will prepare the following for v3:
>
> allOf:
> - $ref: /schemas/spi/spi-peripheral-props.yaml#
> - if:
> properties:
> compatible:
> contains:
> const: adi,hmc271a
> then:
> properties:
> reset-gpios:
> maxItems: 1
This doesn't look right. The stuff you currently have in the patch
should remain, and this should become
if:
properties:
compatible:
not:
contains:
const: adi,hmc271a
then:
properties:
reset-gpios: false
> - if:
> properties:
> compatible:
> contains:
> anyOf:
> - const: adi,ad8366
> - const: adi,ada4961
> - const: adi,adrf5720
> - const: adi,adrf5730
> - const: adi,adrf5731
> - const: adi,hmc792a
> - const: adi,hmc1018a
> - const: adi,hmc1019a
> - const: adi,hmc1119
> then:
> properties:
> enable-gpios:
> maxItems: 1
> description: Power-up or Serial Mode Enable GPIO.
Same for this.
Thanks,
Conor.
>
> > > I went over the device datasheets and I could not find the
> > > reason for the reset gpio. I left it there because it was being used
> > > in the current driver implementation, and I would not like to
> > > invalidate designs that might be currently using it. I will ask around.
> >
> > If none of the devices have a reset pin, then you should delete the
> > property from the binding and the driver. Not like you're going to break
> > something if none of the supported devices even have the pin!
>
> The pin might have been there due to an old revision of the ada4961 device
> (the reset_gpio was added to the code when ada4961 support was included)
> which I can't find related documentation. However, it turns out that
> hmc271a contains a reset pin, as you can see above.
>
> --
> Kind regards,
>
> Rodrigo Alencar
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-01-28 14:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 13:51 [PATCH v2 0/6] iio: amplifiers: ad8366: driver update and dt support Rodrigo Alencar via B4 Relay
2026-01-26 13:51 ` [PATCH v2 1/6] MAINTAINERS: Add missing maintainer entry for AD8366 driver Rodrigo Alencar via B4 Relay
2026-01-26 13:51 ` [PATCH v2 2/6] dt-bindings: iio: amplifiers: Add AD8366 support Rodrigo Alencar via B4 Relay
2026-01-26 20:11 ` Conor Dooley
2026-01-27 11:37 ` Rodrigo Alencar
2026-01-27 19:38 ` Conor Dooley
2026-01-28 9:39 ` Rodrigo Alencar
2026-01-28 14:43 ` Conor Dooley [this message]
2026-01-31 20:55 ` David Lechner
2026-01-26 13:51 ` [PATCH v2 3/6] iio: amplifiers: ad8366: refactor device resource management Rodrigo Alencar via B4 Relay
2026-01-27 21:12 ` Andy Shevchenko
2026-01-28 9:31 ` Rodrigo Alencar
2026-01-29 18:40 ` Jonathan Cameron
2026-01-26 13:51 ` [PATCH v2 4/6] iio: amplifiers: ad8366: add device tree support Rodrigo Alencar via B4 Relay
2026-01-27 21:21 ` Andy Shevchenko
2026-01-28 9:55 ` Rodrigo Alencar
2026-01-28 10:09 ` Andy Shevchenko
2026-01-28 10:23 ` Rodrigo Alencar
2026-01-28 12:39 ` Andy Shevchenko
2026-01-31 21:18 ` David Lechner
2026-01-26 13:51 ` [PATCH v2 5/6] iio: amplifiers: ad8366: consume enable gpio Rodrigo Alencar via B4 Relay
2026-01-31 21:19 ` David Lechner
2026-01-26 13:51 ` [PATCH v2 6/6] iio: amplifiers: ad8366: Update device support Rodrigo Alencar 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=20260128-grieving-polish-4292db90090d@spud \
--to=conor@kernel.org \
--cc=455.rodrigo.alencar@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rodrigo.alencar@analog.com \
/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