From: "Nuno Sá" <noname.nuno@gmail.com>
To: "Jonathan Cameron" <jonathan.cameron@huawei.com>,
"Nuno Sá" <nuno.sa@analog.com>
Cc: 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 2/3] iio: dac: ad5456: Add missing DT compatibles
Date: Mon, 27 Oct 2025 14:55:22 +0000 [thread overview]
Message-ID: <457d739b237bfdcf26361b3e4d5a39398468afd1.camel@gmail.com> (raw)
In-Reply-To: <20251023181321.00001511@huawei.com>
On Thu, 2025-10-23 at 18:13 +0100, Jonathan Cameron wrote:
> On Thu, 23 Oct 2025 14:01:38 +0300
> Nuno Sá <nuno.sa@analog.com> wrote:
>
> I'd retitle this to say it's adding explicit DT compatibles
>
> Missing made me thing one or two were missing rather than it relying
> on the fallback path to use the i2c_device_id / spi_device_id paths.
>
> I'm not particularly keen on only get the drvdata from those other
> tables as that's fragile to the two remaining precisely in sync. Until
> we fix that better to not add these tables at all.
>
> The cleanup will need to switch to pointers rather than enum entries
> and then use generic fetchers to get those pointers which ever type
> of firmware we have.
>
> Not trivial but also fairly mechanical change to make so I don't
> feel too mean asking that you do that as part of this patch series.
> If nothing else looking at just this series, someone might think a fallback
> compatible would be fine given the differences between parts aren't
> visible.
>
For such an old part I was trying to get away without having to refactor that
much eheh :). But fair enough, I'll do the above and look for some more obvious
improvements (like i2c and spi dedicated files). Should also note that I don't
really have HW with me so I'll really stick to obvious stuff.
- Nuno Sá
>
>
> > Add missing of_device_id compatibles for the i2c and spi drivers.
> >
> > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > ---
> > drivers/iio/dac/ad5446.c | 41 +++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 41 insertions(+)
> >
> > diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
> > index ad304b0fec08..b6967f3b9386 100644
> > --- a/drivers/iio/dac/ad5446.c
> > +++ b/drivers/iio/dac/ad5446.c
> > @@ -445,6 +445,35 @@ static const struct spi_device_id ad5446_spi_ids[] = {
> > MODULE_DEVICE_TABLE(spi, ad5446_spi_ids);
> >
> > static const struct of_device_id ad5446_of_ids[] = {
> > + { .compatible = "adi,ad5300" },
> > + { .compatible = "adi,ad5310" },
> > + { .compatible = "adi,ad5320" },
> > + { .compatible = "adi,ad5444" },
> > + { .compatible = "adi,ad5446" },
> > + { .compatible = "adi,ad5450" },
> > + { .compatible = "adi,ad5451" },
> > + { .compatible = "adi,ad5452" },
> > + { .compatible = "adi,ad5453" },
> > + { .compatible = "adi,ad5512a" },
> > + { .compatible = "adi,ad5541a" },
> > + { .compatible = "adi,ad5542a" },
> > + { .compatible = "adi,ad5543" },
> > + { .compatible = "adi,ad5553" },
> > + { .compatible = "adi,ad5600" },
> > + { .compatible = "adi,ad5601" },
> > + { .compatible = "adi,ad5611" },
> > + { .compatible = "adi,ad5621" },
> > + { .compatible = "adi,ad5641" },
> > + { .compatible = "adi,ad5620-2500" },
> > + { .compatible = "adi,ad5620-1250" },
> > + { .compatible = "adi,ad5640-2500" },
> > + { .compatible = "adi,ad5640-1250" },
> > + { .compatible = "adi,ad5660-2500" },
> > + { .compatible = "adi,ad5660-1250" },
> > + { .compatible = "adi,ad5662" },
> > + { .compatible = "ti,dac081s101" },
> > + { .compatible = "ti,dac101s101" },
> > + { .compatible = "ti,dac121s101" },
> > { .compatible = "ti,dac7512" },
> > { }
> > };
> > @@ -547,9 +576,21 @@ static const struct i2c_device_id ad5446_i2c_ids[] = {
> > };
> > MODULE_DEVICE_TABLE(i2c, ad5446_i2c_ids);
> >
> > +static const struct of_device_id ad5446_i2c_of_ids[] = {
> > + { .compatible = "adi,ad5301" },
> > + { .compatible = "adi,ad5311" },
> > + { .compatible = "adi,ad5321" },
> > + { .compatible = "adi,ad5602" },
> > + { .compatible = "adi,ad5612" },
> > + { .compatible = "adi,ad5622" },
> > + { }
> > +};
> > +MODULE_DEVICE_TABLE(OF, ad5446_i2c_of_ids);
> > +
> > static struct i2c_driver ad5446_i2c_driver = {
> > .driver = {
> > .name = "ad5446",
> > + .of_match_table = ad5446_i2c_of_ids,
> > },
> > .probe = ad5446_i2c_probe,
> > .id_table = ad5446_i2c_ids,
> >
next prev parent reply other threads:[~2025-10-27 14:54 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
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á [this message]
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=457d739b237bfdcf26361b3e4d5a39398468afd1.camel@gmail.com \
--to=noname.nuno@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=jonathan.cameron@huawei.com \
--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;
as well as URLs for NNTP newsgroup(s).