From: "Nuno Sá" <nuno.sa@analog.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux@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>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 3/6] iio: adc: ad7266: drop platform data support
Date: Thu, 26 Nov 2026 10:28:32 +0000 [thread overview]
Message-ID: <awgJVUpCo0fCxPNr@nsa> (raw)
In-Reply-To: <awa6rrFP3-dCpIC6@ashevche-desk.local>
On Wed, Nov 25, 2026 at 12:38:38PM +0200, Andy Shevchenko wrote:
> On Wed, Nov 25, 2026 at 10:19:19AM +0000, Nuno Sá wrote:
> > There are no in-tree users of struct ad7266_platform_data. Without it,
> > the driver already falls back to a fixed address, differential mode
> > and the 0V - VREF input range.
> >
> > Drop the platform data header and move the range and mode enums into
> > the driver. The code for the address GPIOs, the pseudo differential and
> > single-ended modes and the 0V - 2VREF range is kept so it can be
> > enabled again should someone need it and add firmware properties for
> > it.
>
> ...
>
> > + /*
> > + * The address GPIOs, the other sample modes and the 0V - 2VREF range
> > + * could only be selected through platform data, which had no users.
> > + * Keep the support around in case someone needs it and adds firmware
> > + * properties for it.
> > + */
>
> Same comment about the comment.
>
> ...
>
> > + if (!st->fixed_addr) {
> > + for (i = 0; i < ARRAY_SIZE(st->gpios); ++i) {
> > + st->gpios[i] = devm_gpiod_get(&spi->dev,
> > ad7266_gpio_labels[i],
> > GPIOD_OUT_LOW);
> > + if (IS_ERR(st->gpios[i]))
> > + return PTR_ERR(st->gpios[i]);
> > }
>
> Side note: Have you considered switching to GPIO array APIs?
Nope. One thing I've stated in the cover is that I really don't to fall
into a refactor trap. All of these are fairly old drivers so I'm sure
there's a lot of things to improve. I just don't have the bandwidth.
Even with AI :).
- Nuno Sá
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
next prev parent reply other threads:[~2026-11-26 10:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 10:19 [PATCH 0/6] iio: adc: drop platform data from some ADI ADC drivers Nuno Sá
2026-11-25 10:19 ` [PATCH 1/6] iio: adc: ad7887: fix on-chip reference enable logic Nuno Sá
2026-11-26 10:41 ` Joshua Crofts
2026-11-25 10:19 ` [PATCH 2/6] iio: adc: ad7887: drop platform data support Nuno Sá
2026-11-25 10:35 ` Andy Shevchenko
2026-11-26 10:30 ` Nuno Sá
2026-11-25 10:19 ` [PATCH 3/6] iio: adc: ad7266: " Nuno Sá
2026-11-25 10:38 ` Andy Shevchenko
2026-11-26 10:28 ` Nuno Sá [this message]
2026-11-25 10:19 ` [PATCH 4/6] iio: adc: ad7791: " Nuno Sá
2026-11-25 10:40 ` Andy Shevchenko
2026-11-25 10:19 ` [PATCH 5/6] dt-bindings: iio: adc: add AD7793 and similar ADCs Nuno Sá
2026-11-25 17:41 ` Conor Dooley
2026-11-26 12:24 ` Nuno Sá
2026-11-25 10:19 ` [PATCH 6/6] iio: adc: ad7793: add firmware support and drop platform data Nuno Sá
2026-11-25 10:43 ` Andy Shevchenko
2026-11-25 11:11 ` Nuno Sá
2026-11-26 2:00 ` Jonathan Cameron
2026-11-26 10:29 ` Nuno Sá
2026-11-26 2:00 ` Jonathan Cameron
2026-11-25 10:36 ` [PATCH 0/6] iio: adc: drop platform data from some ADI ADC drivers Arnd Bergmann
2026-11-25 11:01 ` 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=awgJVUpCo0fCxPNr@nsa \
--to=nuno.sa@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=conor+dt@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=linux-kernel@vger.kernel.org \
--cc=linux@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
all inboxes | Powered by JetHome®