From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ciprian Regus <ciprian.regus@analog.com>,
krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, u.kleine-koenig@pengutronix.de
Subject: Re: [PATCH 3/3] drivers: iio: adc: Rename the LTC249x iio device
Date: Mon, 22 Aug 2022 20:17:45 +0100 [thread overview]
Message-ID: <20220822201745.1e09fee7@jic23-huawei> (raw)
In-Reply-To: <0f778952-1909-1038-8f9a-3a7d7f12d6e1@metafoo.de>
On Mon, 22 Aug 2022 16:08:12 +0200
Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 8/22/22 14:51, Ciprian Regus wrote:
> > Set the iio device's name based on the chip used.
>
> While the change is correct it breaks the ABI. This needs a bit of a
> better explanation what is being done, why, what are the potential
> problems, why do we want to do it anyway.
+ it's a fix, so if we are doing this we need to enable backporting
by moving to first patch in series (obviously just for the
already supported parts).
Jonathan
>
> >
> > Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
> > ---
> > drivers/iio/adc/ltc2496.c | 1 +
> > drivers/iio/adc/ltc2497-core.c | 2 +-
> > drivers/iio/adc/ltc2497.c | 2 ++
> > drivers/iio/adc/ltc2497.h | 1 +
> > 4 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/ltc2496.c b/drivers/iio/adc/ltc2496.c
> > index 98338104c24a..86470f49e8ca 100644
> > --- a/drivers/iio/adc/ltc2496.c
> > +++ b/drivers/iio/adc/ltc2496.c
> > @@ -89,6 +89,7 @@ static void ltc2496_remove(struct spi_device *spi)
> >
> > static struct chip_info ltc2496_info = {
> > .resolution = 16,
> > + .name = "ltc2496"
> > };
> >
> > static const struct of_device_id ltc2496_of_match[] = {
> > diff --git a/drivers/iio/adc/ltc2497-core.c b/drivers/iio/adc/ltc2497-core.c
> > index b2752399402c..6dd9ab601904 100644
> > --- a/drivers/iio/adc/ltc2497-core.c
> > +++ b/drivers/iio/adc/ltc2497-core.c
> > @@ -169,7 +169,7 @@ int ltc2497core_probe(struct device *dev, struct iio_dev *indio_dev)
> > struct ltc2497core_driverdata *ddata = iio_priv(indio_dev);
> > int ret;
> >
> > - indio_dev->name = dev_name(dev);
> > + indio_dev->name = ddata->chip_info->name;
> > indio_dev->info = <c2497core_info;
> > indio_dev->modes = INDIO_DIRECT_MODE;
> > indio_dev->channels = ltc2497core_channel;
> > diff --git a/drivers/iio/adc/ltc2497.c b/drivers/iio/adc/ltc2497.c
> > index bb5e0d4301e2..a0aad71c8130 100644
> > --- a/drivers/iio/adc/ltc2497.c
> > +++ b/drivers/iio/adc/ltc2497.c
> > @@ -99,9 +99,11 @@ static int ltc2497_remove(struct i2c_client *client)
> > static struct chip_info ltc2497_info[] = {
> > [TYPE_LTC2497] = {
> > .resolution = 16,
> > + .name = "ltc2497"
> > },
> > [TYPE_LTC2499] = {
> > .resolution = 24,
> > + .name = "ltc2499"
> > }
> > };
> >
> > diff --git a/drivers/iio/adc/ltc2497.h b/drivers/iio/adc/ltc2497.h
> > index f4d939cfd48b..0e86e38248ee 100644
> > --- a/drivers/iio/adc/ltc2497.h
> > +++ b/drivers/iio/adc/ltc2497.h
> > @@ -12,6 +12,7 @@ enum chip_type {
> >
> > struct chip_info {
> > u32 resolution;
> > + char *name;
> > };
> >
> > struct ltc2497core_driverdata {
>
>
next prev parent reply other threads:[~2022-08-22 19:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-22 12:51 [PATCH 0/3] Add support for LTC2499 ADC Ciprian Regus
2022-08-22 12:51 ` [PATCH 1/3] dt-bindings: iio: adc: Add docs for LTC2499 Ciprian Regus
2022-08-22 19:24 ` Jonathan Cameron
2022-08-22 19:39 ` Jonathan Cameron
2022-08-22 19:40 ` Rob Herring
2022-08-22 12:51 ` [PATCH 2/3] drivers: iio: adc: LTC2499 support Ciprian Regus
2022-08-22 19:37 ` Jonathan Cameron
2022-08-23 15:21 ` Andy Shevchenko
2022-08-24 12:15 ` Jonathan Cameron
2022-08-29 6:30 ` Regus, Ciprian
2022-08-29 16:47 ` Jonathan Cameron
2022-08-22 12:51 ` [PATCH 3/3] drivers: iio: adc: Rename the LTC249x iio device Ciprian Regus
2022-08-22 14:08 ` Lars-Peter Clausen
2022-08-22 19:17 ` Jonathan Cameron [this message]
2022-08-29 6:13 ` Regus, Ciprian
2022-08-29 16:03 ` Jonathan Cameron
2022-08-23 11:09 ` Krzysztof Kozlowski
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=20220822201745.1e09fee7@jic23-huawei \
--to=jic23@kernel.org \
--cc=ciprian.regus@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/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).