From: "Nuno Sá" <noname.nuno@gmail.com>
To: Jonathan Cameron <jonathan.cameron@huawei.com>,
David Lechner <dlechner@baylibre.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Jonathan Cameron <jic23@kernel.org>,
nuno.sa@analog.com, andy@kernel.org, robh@kernel.org,
conor+dt@kernel.org, krzk+dt@kernel.org,
linux-iio@vger.kernel.org, s32@nxp.com,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
chester62515@gmail.com, mbrugger@suse.com,
ghennadi.procopciuc@oss.nxp.com
Subject: Re: [PATCH v2 2/2] iio: adc: Add the NXP SAR ADC support for the s32g2/3 platforms
Date: Fri, 12 Sep 2025 16:10:38 +0100 [thread overview]
Message-ID: <6bf6a282ee8a4e55ebba21d89ec6dcf3fa499188.camel@gmail.com> (raw)
In-Reply-To: <20250912151718.00004cf1@huawei.com>
On Fri, 2025-09-12 at 15:17 +0100, Jonathan Cameron wrote:
> On Thu, 11 Sep 2025 08:26:06 -0500
> David Lechner <dlechner@baylibre.com> wrote:
>
> > On 9/11/25 7:55 AM, Daniel Lezcano wrote:
> > >
> > > Hi Jonathan,
> > >
> > > thanks for the review
> > >
> > > On 10/09/2025 19:32, Jonathan Cameron wrote:
> > > > On Wed, 10 Sep 2025 17:57:56 +0200
> > > > Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> > >
> > > [ ... ]
> > >
> >
> > ...
> >
> > >
> > > > > + indio_dev->name = dev_name(dev);
> > > >
> > > > This should be the 'part number'. That is a little ill defined
> > > > for a SoC integrated ADC, but generally not what we get from dev_name()
> > > > on the platform_device.
> > >
> > > Sorry, I don't get the comment. If I refer to the different drivers there
> > > is not consistency with the iio_dev->name.
> >
> > dev_name() will be something like adc@12345678 from the devicetree,
> > so not the "part number".
> >
> > >
> > > rtq6056.c: indio_dev->name = "rtq6056";
> >
> > This style is preferred if there is only one supported part.
> >
> > > rzg2l_adc.c: indio_dev->name = DRIVER_NAME;
> >
> > We try to avoid using a macro for the driver name like this.
> >
> > > sc27xx_adc.c: indio_dev->name = dev_name(dev);
> >
> > Looks like we missed catching this one in review.
>
> There are a bunch of historical drivers (and maybe some more recent
> ones that snuck in). The risk of changing that ABI seemed too high to fix them
> up. I guess this happens often enough I should add a comment to the ones
> that still do this about it being wrong but left alone as the ABI was in use.
>
Yeah, we (at ADI) also had the highly questionable practise of using the OF node
name until we the label property got in. So I would not be surprised if some of
those are still around.
- Nuno Sá
>
> >
> > > mt6359-auxadc.c: indio_dev->name = adc_dev->chip_info->model_name;
> >
> > This is preferred if there is more than one part supported in the driver.
> >
> > > mcp3911.c: indio_dev->name = spi_get_device_id(spi)->name;
> >
> > This is fine too in cases where there isn't chip_info.
> >
> > >
> > > Are you suggesting to use the compatible part number ?
> > >
> > > indio->name = "s32g2-sar-adc";
> > >
> >
> > That works.
> >
> >
> >
next prev parent reply other threads:[~2025-09-12 15:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 15:57 [PATCH v2 0/2] NXP SAR ADC IIO driver for s32g2/3 platforms Daniel Lezcano
2025-09-10 15:57 ` [PATCH v2 1/2] dt-bindings: iio: adc: Add the NXP SAR ADC " Daniel Lezcano
2025-09-10 15:57 ` [PATCH v2 2/2] iio: adc: Add the NXP SAR ADC support for the " Daniel Lezcano
2025-09-10 17:32 ` Jonathan Cameron
2025-09-11 12:55 ` Daniel Lezcano
2025-09-11 13:26 ` David Lechner
2025-09-12 14:17 ` Jonathan Cameron
2025-09-12 15:10 ` Nuno Sá [this message]
2025-09-12 14:18 ` Jonathan Cameron
2025-09-11 20:10 ` David Lechner
2025-09-11 23:03 ` Daniel Lezcano
2025-09-12 5:38 ` Andy Shevchenko
2025-09-12 8:19 ` Nuno Sá
2025-09-12 14:21 ` Jonathan Cameron
2025-09-12 6:00 ` Andy Shevchenko
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=6bf6a282ee8a4e55ebba21d89ec6dcf3fa499188.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=andy@kernel.org \
--cc=chester62515@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=ghennadi.procopciuc@oss.nxp.com \
--cc=jic23@kernel.org \
--cc=jonathan.cameron@huawei.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbrugger@suse.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=s32@nxp.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