From: Jonathan Cameron <jic23@kernel.org>
To: Maxim Kiselev <bigunclemax@gmail.com>
Cc: "Andre Przywara" <andre.przywara@arm.com>,
linux-iio@vger.kernel.org, "Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Chen-Yu Tsai" <wens@csie.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Samuel Holland" <samuel@sholland.org>,
"Conor Dooley" <conor@kernel.org>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Heiko Stuebner" <heiko.stuebner@vrull.eu>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Cosmin Tanislav" <demonsingur@gmail.com>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Haibo Chen" <haibo.chen@nxp.com>,
"ChiYuan Huang" <cy_huang@richtek.com>,
"Ramona Bolboaca" <ramona.bolboaca@analog.com>,
"Ibrahim Tilki" <Ibrahim.Tilki@analog.com>,
"Caleb Connolly" <caleb.connolly@linaro.org>,
"William Breathitt Gray" <william.gray@linaro.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"Leonard Göhrs" <l.goehrs@pengutronix.de>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Hugo Villeneuve" <hvilleneuve@dimonoff.com>,
"ChiaEn Wu" <chiaen_wu@richtek.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: Re: [RFC PATCH v1 0/4] Add support for Allwinner GPADC on D1/T113s/R329 SoCs
Date: Sun, 28 May 2023 16:25:07 +0100 [thread overview]
Message-ID: <20230528162507.144cfdf2@jic23-huawei> (raw)
In-Reply-To: <20230528162257.7e8932b9@jic23-huawei>
On Sun, 28 May 2023 16:22:57 +0100
Jonathan Cameron <jic23@kernel.org> wrote:
> On Wed, 24 May 2023 14:36:28 +0300
> Maxim Kiselev <bigunclemax@gmail.com> wrote:
>
> > Hi Andre,
> >
> > thanks for you comments
> >
> > > This may sound kind of obvious, but wouldn't it be easier to model this
> > > with one compatible string, and have the number of channels as a DT
> > > property?
> >
> > Yes, I completely agree that using separate config for each SoCs is looks
> > overcomplicated because the only difference is the number of channels.
> > I thought about a DT property with channels number but I didn't find
> > another ADC driver with the same approach (except i2c ADC's with child nodes).
> If you are 100% sure that that devices are either
> 1) Detectable at runtime
> 2) Identical in functionality.
>
> So that in neither case will any changes on driver support expose differences
> in the future then a single compatible is fine.
>
> The back up is that you use fallback compatibles - list more than one.
> Whilst it doesn't matter (as no differences found) the driver can use
> the first one. If differences become apparent later, others may be used.
>
> I'm not however keen on a simple channel count parameter. If you want
> to go that way, it's better to provide the fine control of individual channel
> child nodes (see Documentation/devicetree/bindings/iio/adc/adc.yaml)
>
> That way the control is on which channels are wired to something useful, rather
> than whether the device can read them or not (which is pointless if no one
> wired them up.
Another thing to note is that with generic compatibles you loose the ability
to have the dt-schmema validate that sets of parameters make sense. If it's
just the channels available that may not matter however.
>
>
> >
> > > Or, alternatively, using iio/multiplexer/io-channel-mux.yaml, since it's
> > > only one ADC anyway?
> > I'm sorry, I didn't quite understand what you're suggesting.
>
> That's normally only used for a separate MUX where we need a separate driver
> to handle it. If used on a device like this it would expose additional complexity
> to userspace with no benefits in generality etc.
>
> >
> > > And btw: it seems that the T507 (the H616 die with a different pinout) has
> > > the same IP, with four channels:
> > > http://dl.linux-sunxi.org/T507/
> >
> > Oh, thanks for pointing that. I'll add it to the list in the next version.
>
next prev parent reply other threads:[~2023-05-28 15:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 8:27 [RFC PATCH v1 0/4] Add support for Allwinner GPADC on D1/T113s/R329 SoCs Maxim Kiselev
2023-05-24 8:27 ` [RFC PATCH v1 1/4] iio: adc: Add Allwinner D1/T113s/R329 SoCs GPADC Maxim Kiselev
2023-05-24 10:01 ` Andre Przywara
2023-05-24 11:06 ` Andy Shevchenko
2023-05-24 12:14 ` Maxim Kiselev
2023-05-28 16:38 ` Jonathan Cameron
2023-05-24 8:27 ` [RFC PATCH v1 2/4] dt-bindings: " Maxim Kiselev
2023-05-24 9:21 ` Rob Herring
2023-05-28 15:28 ` Jonathan Cameron
2023-05-24 8:27 ` [RFC PATCH v1 3/4] ARM: dts: sun8i: t113s: Add GPADC node Maxim Kiselev
2023-05-24 8:27 ` [RFC PATCH v1 4/4] riscv: dts: allwinner: d1: " Maxim Kiselev
2023-05-24 9:34 ` [RFC PATCH v1 0/4] Add support for Allwinner GPADC on D1/T113s/R329 SoCs Andre Przywara
2023-05-24 11:36 ` Maxim Kiselev
2023-05-28 15:22 ` Jonathan Cameron
2023-05-28 15:25 ` Jonathan Cameron [this message]
2023-05-28 16:39 ` Jonathan Cameron
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=20230528162507.144cfdf2@jic23-huawei \
--to=jic23@kernel.org \
--cc=Ibrahim.Tilki@analog.com \
--cc=andre.przywara@arm.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=bigunclemax@gmail.com \
--cc=caleb.connolly@linaro.org \
--cc=chiaen_wu@richtek.com \
--cc=conor@kernel.org \
--cc=cy_huang@richtek.com \
--cc=demonsingur@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=haibo.chen@nxp.com \
--cc=heiko.stuebner@vrull.eu \
--cc=hvilleneuve@dimonoff.com \
--cc=jernej.skrabec@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=l.goehrs@pengutronix.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=mike.looijmans@topic.nl \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=ramona.bolboaca@analog.com \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
--cc=william.gray@linaro.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).