Re: [PATCH v2 2/6] dt-bindings: iio: amplifiers: Add AD8366 support
From: Rodrigo Alencar
Date: Wed Jan 28 2026 - 04:39:45 EST
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@xxxxxxxxxx>
> > > >
> > > > 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
- 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.
> > 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