Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Conor Dooley <conor@kernel.org>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"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>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/3] dt-bindings: iio: dac: Document AD5446 and similar devices
Date: Fri, 24 Oct 2025 11:12:07 +0100	[thread overview]
Message-ID: <20251024111207.00007427@huawei.com> (raw)
In-Reply-To: <20251023-food-say-5e396be087af@spud>

On Thu, 23 Oct 2025 19:24:17 +0100
Conor Dooley <conor@kernel.org> wrote:

> On Thu, Oct 23, 2025 at 02:01:37PM +0300, Nuno Sá wrote:
> > Add device tree binding documentation for the Analog Devices AD5446
> > family of Digital-to-Analog Converters and compatible devices from
> > Texas Instruments. There's both SPI and I2C interfaces and feature
> > resolutions ranging from 8-bit to 16-bit.
> > 
> > The binding covers 29 compatible devices including the AD5446 series,  
> 
> If they're compatible, how come there's no fallback use? Just to keep
> things consistent with how they've always been while probing as spi
> child devices?
Hi Conor,

They aren't compatible. The 2nd patch is misleading because it doesn't
associate data with the of_device_id.  The driver is getting that from
matching the compatible property with manufacturer stripped off.

I've requested Nuno sort that out in v3. It's a bit more than just
adding the data as would also involve moving away from using an enum
to using pointers to the structures that the enum indexes (currently in
an array).

https://elixir.bootlin.com/linux/v6.17.4/source/drivers/iio/dac/ad5446.c#L315

Thanks,

J
> 
> Conor.
> 
> > AD5600 series, AD5620/5640/5660 variants with different voltage ranges,
> > and TI DAC081s101/DAC101s101/DAC121s101 devices.
> > 
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> >  .../devicetree/bindings/iio/dac/adi,ad5446.yaml    | 138 +++++++++++++++++++++
> >  MAINTAINERS                                        |   8 ++
> >  2 files changed, 146 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
> > new file mode 100644
> > index 000000000000..90fc8ca053fe
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
> > @@ -0,0 +1,138 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/dac/adi,ad5446.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Analog Devices AD5446 and similar DACs
> > +
> > +maintainers:
> > +  - Michael Hennerich <michael.hennerich@analog.com>
> > +  - Nuno Sá <nuno.sa@analog.com>
> > +
> > +description: |
> > +  Digital to Analog Converter devices supporting both SPI and I2C interfaces.
> > +  These devices feature a range of resolutions from 8-bit to 16-bit.
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - description: SPI DACs
> > +        enum:
> > +          - adi,ad5300
> > +          - adi,ad5310
> > +          - adi,ad5320
> > +          - adi,ad5444
> > +          - adi,ad5446
> > +          - adi,ad5450
> > +          - adi,ad5451
> > +          - adi,ad5452
> > +          - adi,ad5453
> > +          - adi,ad5512a
> > +          - adi,ad5541a
> > +          - adi,ad5542
> > +          - adi,ad5542a
> > +          - adi,ad5543
> > +          - adi,ad5553
> > +          - adi,ad5600
> > +          - adi,ad5601
> > +          - adi,ad5611
> > +          - adi,ad5621
> > +          - adi,ad5641
> > +          - adi,ad5620-2500
> > +          - adi,ad5620-1250
> > +          - adi,ad5640-2500
> > +          - adi,ad5640-1250
> > +          - adi,ad5660-2500
> > +          - adi,ad5660-1250
> > +          - adi,ad5662
> > +          - ti,dac081s101
> > +          - ti,dac101s101
> > +          - ti,dac121s101
> > +      - description: I2C DACs
> > +        enum:
> > +          - adi,ad5301
> > +          - adi,ad5311
> > +          - adi,ad5321
> > +          - adi,ad5602
> > +          - adi,ad5612
> > +          - adi,ad5622
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  vcc-supply:
> > +    description:
> > +      Reference voltage supply. If not supplied, devices with internal
> > +      voltage reference will use that.
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - adi,ad5300
> > +              - adi,ad5310
> > +              - adi,ad5320
> > +              - adi,ad5444
> > +              - adi,ad5446
> > +              - adi,ad5450
> > +              - adi,ad5451
> > +              - adi,ad5452
> > +              - adi,ad5453
> > +              - adi,ad5512a
> > +              - adi,ad5541a
> > +              - adi,ad5542
> > +              - adi,ad5542a
> > +              - adi,ad5543
> > +              - adi,ad5553
> > +              - adi,ad5600
> > +              - adi,ad5601
> > +              - adi,ad5611
> > +              - adi,ad5621
> > +              - adi,ad5641
> > +              - adi,ad5620-2500
> > +              - adi,ad5620-1250
> > +              - adi,ad5640-2500
> > +              - adi,ad5640-1250
> > +              - adi,ad5660-2500
> > +              - adi,ad5660-1250
> > +              - adi,ad5662
> > +              - ti,dac081s101
> > +              - ti,dac101s101
> > +              - ti,dac121s101
> > +    then:
> > +      allOf:
> > +        - $ref: /schemas/spi/spi-peripheral-props.yaml#
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    spi {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        dac@0 {
> > +            compatible = "adi,ad5446";
> > +            reg = <0>;
> > +            vcc-supply = <&dac_vref>;
> > +        };
> > +    };
> > +  - |
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        dac@42 {
> > +            compatible = "adi,ad5622";
> > +            reg = <0x42>;
> > +            vcc-supply = <&dac_vref>;
> > +        };
> > +    };
> > +...
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 940889b158eb..dae04c308975 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -440,6 +440,14 @@ W:	http://wiki.analog.com/AD5398
> >  W:	https://ez.analog.com/linux-software-drivers
> >  F:	drivers/regulator/ad5398.c
> >  
> > +AD5456	DAC DRIVER
> > +M:	Michael Hennerich <michael.hennerich@analog.com>
> > +M:	Nuno Sá <nuno.sa@analog.com>
> > +L:	linux-iio@vger.kernel.org
> > +S:	Supported
> > +W:	https://ez.analog.com/linux-software-drivers
> > +F:	Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
> > +
> >  AD714X CAPACITANCE TOUCH SENSOR DRIVER (AD7142/3/7/8/7A)
> >  M:	Michael Hennerich <michael.hennerich@analog.com>
> >  S:	Supported
> > 
> > -- 
> > 2.34.1
> >   
> 


  reply	other threads:[~2025-10-24 10:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 11:01 [PATCH v2 0/3] iio: dac: ad5446: Add AD5542 to the spi id table Nuno Sá
2025-10-23 11:01 ` [PATCH v2 1/3] dt-bindings: iio: dac: Document AD5446 and similar devices Nuno Sá
2025-10-23 17:08   ` Jonathan Cameron
2025-10-27 14:48     ` Nuno Sá
2025-10-27 15:01       ` Jonathan Cameron
2025-10-30 11:30         ` Nuno Sá
2025-11-02 12:13           ` Jonathan Cameron
2025-10-23 18:24   ` Conor Dooley
2025-10-24 10:12     ` Jonathan Cameron [this message]
2025-10-24 11:04       ` Conor Dooley
2025-10-27 14:49         ` Nuno Sá
2025-10-23 11:01 ` [PATCH v2 2/3] iio: dac: ad5456: Add missing DT compatibles Nuno Sá
2025-10-23 17:13   ` Jonathan Cameron
2025-10-27 14:55     ` Nuno Sá
2025-10-24 16:29   ` Andy Shevchenko
2025-10-24 18:41     ` Jonathan Cameron
2025-10-23 11:01 ` [PATCH v2 3/3] iio: dac: ad5446: Add AD5542 to the spi id table Nuno Sá

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=20251024111207.00007427@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.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