From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
kernel@pengutronix.de, "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 03/13] iio: adc: ti-tsc2046: Drop unused member from private data
Date: Mon, 22 Jun 2026 15:32:25 +0200 [thread overview]
Message-ID: <ajk3fihWcjRedEWa@monoceros> (raw)
In-Reply-To: <ajkOsT8QCAL-0_hK@ashevche-desk.local>
[-- Attachment #1: Type: text/plain, Size: 2268 bytes --]
On Mon, Jun 22, 2026 at 01:30:09PM +0300, Andy Shevchenko wrote:
> On Fri, Jun 19, 2026 at 05:54:31PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > .dcfg is a write only field and thus it can be dropped.
>
> Why isn't squashed with the previous one?
Because they are two different logical changes. But I don't feel strong
here and can squash them together.
> Also, what about struct field and the accompanying data type
> definition?
It took me a while to understand that suggestion. I guess you're talking
about
diff --git a/drivers/iio/adc/ti-tsc2046.c b/drivers/iio/adc/ti-tsc2046.c
index 97ecc429db27..125f6d7e2d84 100644
--- a/drivers/iio/adc/ti-tsc2046.c
+++ b/drivers/iio/adc/ti-tsc2046.c
@@ -121,11 +121,6 @@ struct tsc2046_adc_group_layout {
unsigned int skip;
};
-struct tsc2046_adc_dcfg {
- const struct iio_chan_spec *channels;
- unsigned int num_channels;
-};
-
struct tsc2046_adc_ch_cfg {
unsigned int settling_time_us;
unsigned int oversampling_ratio;
@@ -213,11 +208,6 @@ const struct iio_chan_spec name ## _channels[] = { \
static DECLARE_TI_TSC2046_8_CHANNELS(tsc2046_adc, 12);
-static const struct tsc2046_adc_dcfg tsc2046_adc_dcfg_tsc2046e = {
- .channels = tsc2046_adc_channels,
- .num_channels = ARRAY_SIZE(tsc2046_adc_channels),
-};
-
/*
* Convert time to a number of samples which can be transferred within this
* time.
@@ -738,7 +728,6 @@ static void tsc2046_adc_parse_fwnode(struct tsc2046_adc_priv *priv)
static int tsc2046_adc_probe(struct spi_device *spi)
{
- const struct tsc2046_adc_dcfg *dcfg = &tsc2046_adc_dcfg_tsc2046e;
struct device *dev = &spi->dev;
struct tsc2046_adc_priv *priv;
struct iio_dev *indio_dev;
@@ -767,8 +756,8 @@ static int tsc2046_adc_probe(struct spi_device *spi)
indio_dev->name = TI_TSC2046_NAME;
indio_dev->modes = INDIO_DIRECT_MODE;
- indio_dev->channels = dcfg->channels;
- indio_dev->num_channels = dcfg->num_channels;
+ indio_dev->channels = tsc2046_adc_channels;
+ indio_dev->num_channels = ARRAY_SIZE(tsc2046_adc_channels);
indio_dev->info = &tsc2046_adc_info;
ret = devm_regulator_get_enable_read_voltage(dev, "vref");
on top of my changes. Yes, that makes sense.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-06-22 13:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 15:54 [PATCH v1 00/13] iio: Use named initializers for device_id structures Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 01/13] iio: Initialize i2c_device_id arrays using member names (part 2) Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 02/13] iio: adc: ti-tsc2046: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 03/13] iio: adc: ti-tsc2046: Drop unused member from private data Uwe Kleine-König (The Capable Hub)
2026-06-22 10:30 ` Andy Shevchenko
2026-06-22 13:32 ` Uwe Kleine-König (The Capable Hub) [this message]
2026-06-19 15:54 ` [PATCH v1 04/13] iio: adc: max1241: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 05/13] iio: dac: max5522: " Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 06/13] iio: frequency: ad9523: Simplify driver a bit Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 07/13] iio: imu: adis16550: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 08/13] iio: magnetometer: hmc5843: " Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 09/13] iio: accel: bmc150: Explicitly set spi .driver_data Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 10/13] iio: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 11/13] iio: Initialize spi_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-06-19 20:19 ` Linus Walleij
2026-06-19 15:54 ` [PATCH v1 12/13] staging: iio: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 13/13] staging: iio: Initialize spi_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-06-22 11:43 ` [PATCH v1 00/13] iio: Use named initializers for device_id structures 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=ajk3fihWcjRedEWa@monoceros \
--to=u.kleine-koenig@baylibre.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=o.rempel@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