* [PATCH 01/14] iio: adc: ad4030: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 02/14] iio: adc: ti-tsc2046: " David Lechner
` (13 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the ad4030 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/adc/ad4030.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/iio/adc/ad4030.c b/drivers/iio/adc/ad4030.c
index 5aa26dc3a2cefed9bcaec1b9f3cc127d06aff19a..1bc2f9a2247081e166680232aa6d4aebc5f41b89 100644
--- a/drivers/iio/adc/ad4030.c
+++ b/drivers/iio/adc/ad4030.c
@@ -244,7 +244,6 @@ static int ad4030_enter_config_mode(struct ad4030_state *st)
struct spi_transfer xfer = {
.tx_buf = st->tx_data,
- .bits_per_word = 8,
.len = 1,
.speed_hz = AD4030_SPI_MAX_REG_XFER_SPEED,
};
@@ -260,7 +259,6 @@ static int ad4030_exit_config_mode(struct ad4030_state *st)
struct spi_transfer xfer = {
.tx_buf = st->tx_data,
- .bits_per_word = 8,
.len = 3,
.speed_hz = AD4030_SPI_MAX_REG_XFER_SPEED,
};
@@ -276,7 +274,6 @@ static int ad4030_spi_read(void *context, const void *reg, size_t reg_size,
struct spi_transfer xfer = {
.tx_buf = st->tx_data,
.rx_buf = st->rx_data.raw,
- .bits_per_word = 8,
.len = reg_size + val_size,
.speed_hz = AD4030_SPI_MAX_REG_XFER_SPEED,
};
@@ -311,7 +308,6 @@ static int ad4030_spi_write(void *context, const void *data, size_t count)
((u8 *)data)[2] == 0x81;
struct spi_transfer xfer = {
.tx_buf = st->tx_data,
- .bits_per_word = 8,
.len = count,
.speed_hz = AD4030_SPI_MAX_REG_XFER_SPEED,
};
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 02/14] iio: adc: ti-tsc2046: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
2025-05-05 19:20 ` [PATCH 01/14] iio: adc: ad4030: remove bits_per_word = 8 David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-06 4:48 ` Oleksij Rempel
2025-05-05 19:20 ` [PATCH 03/14] iio: chemical: bme680_spi: " David Lechner
` (12 subsequent siblings)
14 siblings, 1 reply; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the ti-tsc2046 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/adc/ti-tsc2046.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/adc/ti-tsc2046.c b/drivers/iio/adc/ti-tsc2046.c
index 84a9a5e66526555b02497b105660c4822378483b..c2d2aada6772aae6fc8d01c3878d6e869d413bc7 100644
--- a/drivers/iio/adc/ti-tsc2046.c
+++ b/drivers/iio/adc/ti-tsc2046.c
@@ -761,7 +761,6 @@ static int tsc2046_adc_probe(struct spi_device *spi)
if (!dcfg)
return -EINVAL;
- spi->bits_per_word = 8;
spi->mode &= ~SPI_MODE_X_MASK;
spi->mode |= SPI_MODE_0;
ret = spi_setup(spi);
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 02/14] iio: adc: ti-tsc2046: remove bits_per_word = 8
2025-05-05 19:20 ` [PATCH 02/14] iio: adc: ti-tsc2046: " David Lechner
@ 2025-05-06 4:48 ` Oleksij Rempel
0 siblings, 0 replies; 18+ messages in thread
From: Oleksij Rempel @ 2025-05-06 4:48 UTC (permalink / raw)
To: David Lechner
Cc: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, kernel,
Song Qiang, linux-iio, linux-kernel
On Mon, May 05, 2025 at 02:20:29PM -0500, David Lechner wrote:
> Remove setting bits_per_word = 8 from the ti-tsc2046 driver. This is the
> default value for SPI transfers, so it is not necessary to explicitly
> set it.
>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Thank you!
Best Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 03/14] iio: chemical: bme680_spi: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
2025-05-05 19:20 ` [PATCH 01/14] iio: adc: ad4030: remove bits_per_word = 8 David Lechner
2025-05-05 19:20 ` [PATCH 02/14] iio: adc: ti-tsc2046: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 04/14] iio: dac: ad5761: " David Lechner
` (11 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the bme680 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Since no other SPI settings are changed, we can also remove the call to
spi_setup().
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/chemical/bme680_spi.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/iio/chemical/bme680_spi.c b/drivers/iio/chemical/bme680_spi.c
index ced5af23846a73e0378dc936b2cf8c9508760301..aa97645ba539f6a591112d6554b893814d1ac418 100644
--- a/drivers/iio/chemical/bme680_spi.c
+++ b/drivers/iio/chemical/bme680_spi.c
@@ -112,14 +112,6 @@ static int bme680_spi_probe(struct spi_device *spi)
const struct spi_device_id *id = spi_get_device_id(spi);
struct bme680_spi_bus_context *bus_context;
struct regmap *regmap;
- int ret;
-
- spi->bits_per_word = 8;
- ret = spi_setup(spi);
- if (ret < 0) {
- dev_err(&spi->dev, "spi_setup failed!\n");
- return ret;
- }
bus_context = devm_kzalloc(&spi->dev, sizeof(*bus_context), GFP_KERNEL);
if (!bus_context)
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 04/14] iio: dac: ad5761: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (2 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 03/14] iio: chemical: bme680_spi: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 05/14] iio: dac: ad5766: " David Lechner
` (10 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the ad5761 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/dac/ad5761.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/dac/ad5761.c b/drivers/iio/dac/ad5761.c
index 124571ba35d1021cccbcf6883cd16607ba108af9..b5d20f04f070a170d911aff65c88600bd2de5428 100644
--- a/drivers/iio/dac/ad5761.c
+++ b/drivers/iio/dac/ad5761.c
@@ -137,13 +137,11 @@ static int _ad5761_spi_read(struct ad5761_state *st, u8 addr, u16 *val)
struct spi_transfer xfers[] = {
{
.tx_buf = &st->data[0].d8[1],
- .bits_per_word = 8,
.len = 3,
.cs_change = true,
}, {
.tx_buf = &st->data[1].d8[1],
.rx_buf = &st->data[2].d8[1],
- .bits_per_word = 8,
.len = 3,
},
};
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 05/14] iio: dac: ad5766: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (3 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 04/14] iio: dac: ad5761: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 06/14] iio: dac: ad5791: " David Lechner
` (9 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the ad5766 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/dac/ad5766.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/dac/ad5766.c b/drivers/iio/dac/ad5766.c
index dc766c8fd37073457ad2cceeb9e57ec809d7aef4..f6a0a0d84fefd268b4693ecca1e2cc0e8f241fef 100644
--- a/drivers/iio/dac/ad5766.c
+++ b/drivers/iio/dac/ad5766.c
@@ -148,13 +148,11 @@ static int __ad5766_spi_read(struct ad5766_state *st, u8 dac, int *val)
struct spi_transfer xfers[] = {
{
.tx_buf = &st->data[0].d32,
- .bits_per_word = 8,
.len = 3,
.cs_change = 1,
}, {
.tx_buf = &st->data[1].d32,
.rx_buf = &st->data[2].d32,
- .bits_per_word = 8,
.len = 3,
},
};
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 06/14] iio: dac: ad5791: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (4 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 05/14] iio: dac: ad5766: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 07/14] iio: dac: ltc2688: " David Lechner
` (8 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the ad5791 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/dac/ad5791.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c
index 8214e524afdb1ac6b2f6baf69d6594694800b6a4..41582f2b90fb9d83ff82ccb27a0eea92d9d9b431 100644
--- a/drivers/iio/dac/ad5791.c
+++ b/drivers/iio/dac/ad5791.c
@@ -138,13 +138,11 @@ static int ad5791_spi_read(struct ad5791_state *st, u8 addr, u32 *val)
struct spi_transfer xfers[] = {
{
.tx_buf = &st->data[0].d8[1],
- .bits_per_word = 8,
.len = 3,
.cs_change = 1,
}, {
.tx_buf = &st->data[1].d8[1],
.rx_buf = &st->data[2].d8[1],
- .bits_per_word = 8,
.len = 3,
},
};
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 07/14] iio: dac: ltc2688: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (5 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 06/14] iio: dac: ad5791: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 08/14] iio: gyro: adxrs450: " David Lechner
` (7 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the ltc2688 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/dac/ltc2688.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/dac/ltc2688.c b/drivers/iio/dac/ltc2688.c
index 757b4831dc3e7c14574e3d811ba9a48d8350213a..1f24f07d1ad24ac1730da0e03b65207ca5f07884 100644
--- a/drivers/iio/dac/ltc2688.c
+++ b/drivers/iio/dac/ltc2688.c
@@ -104,13 +104,11 @@ static int ltc2688_spi_read(void *context, const void *reg, size_t reg_size,
struct spi_transfer xfers[] = {
{
.tx_buf = st->tx_data,
- .bits_per_word = 8,
.len = reg_size + val_size,
.cs_change = 1,
}, {
.tx_buf = st->tx_data + 3,
.rx_buf = st->rx_data,
- .bits_per_word = 8,
.len = reg_size + val_size,
},
};
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 08/14] iio: gyro: adxrs450: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (6 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 07/14] iio: dac: ltc2688: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 09/14] iio: imu: adis: " David Lechner
` (6 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the adxrs450 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/gyro/adxrs450.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/iio/gyro/adxrs450.c b/drivers/iio/gyro/adxrs450.c
index 5dadb88a4d92c27b4bcba121660198311c50150b..a1d8d3cb301b26a1b15fca2f6bb9bb1494ffce79 100644
--- a/drivers/iio/gyro/adxrs450.c
+++ b/drivers/iio/gyro/adxrs450.c
@@ -95,12 +95,10 @@ static int adxrs450_spi_read_reg_16(struct iio_dev *indio_dev,
struct spi_transfer xfers[] = {
{
.tx_buf = &st->tx,
- .bits_per_word = 8,
.len = sizeof(st->tx),
.cs_change = 1,
}, {
.rx_buf = &st->rx,
- .bits_per_word = 8,
.len = sizeof(st->rx),
},
};
@@ -169,12 +167,10 @@ static int adxrs450_spi_sensor_data(struct iio_dev *indio_dev, s16 *val)
struct spi_transfer xfers[] = {
{
.tx_buf = &st->tx,
- .bits_per_word = 8,
.len = sizeof(st->tx),
.cs_change = 1,
}, {
.rx_buf = &st->rx,
- .bits_per_word = 8,
.len = sizeof(st->rx),
},
};
@@ -209,7 +205,6 @@ static int adxrs450_spi_initial(struct adxrs450_state *st,
struct spi_transfer xfers = {
.tx_buf = &st->tx,
.rx_buf = &st->rx,
- .bits_per_word = 8,
.len = sizeof(st->tx),
};
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 09/14] iio: imu: adis: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (7 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 08/14] iio: gyro: adxrs450: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 10/14] iio: magnetometer: hmc5843_spi: " David Lechner
` (5 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the adis driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/imu/adis.c | 9 ---------
drivers/iio/imu/adis_buffer.c | 3 ---
2 files changed, 12 deletions(-)
diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
index 0ea072a4c966994ff8b1a6c7572bfe979ada43a1..d160147cce0ba7586ac7df69af58816b413bbd46 100644
--- a/drivers/iio/imu/adis.c
+++ b/drivers/iio/imu/adis.c
@@ -39,34 +39,29 @@ int __adis_write_reg(struct adis *adis, unsigned int reg, unsigned int value,
struct spi_transfer xfers[] = {
{
.tx_buf = adis->tx,
- .bits_per_word = 8,
.len = 2,
.cs_change = 1,
.delay.value = adis->data->write_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.tx_buf = adis->tx + 2,
- .bits_per_word = 8,
.len = 2,
.cs_change = 1,
.delay.value = adis->data->write_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.tx_buf = adis->tx + 4,
- .bits_per_word = 8,
.len = 2,
.cs_change = 1,
.delay.value = adis->data->write_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.tx_buf = adis->tx + 6,
- .bits_per_word = 8,
.len = 2,
.delay.value = adis->data->write_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.tx_buf = adis->tx + 8,
- .bits_per_word = 8,
.len = 2,
.delay.value = adis->data->write_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
@@ -133,14 +128,12 @@ int __adis_read_reg(struct adis *adis, unsigned int reg, unsigned int *val,
struct spi_transfer xfers[] = {
{
.tx_buf = adis->tx,
- .bits_per_word = 8,
.len = 2,
.cs_change = 1,
.delay.value = adis->data->write_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.tx_buf = adis->tx + 2,
- .bits_per_word = 8,
.len = 2,
.cs_change = 1,
.delay.value = adis->data->read_delay,
@@ -148,14 +141,12 @@ int __adis_read_reg(struct adis *adis, unsigned int reg, unsigned int *val,
}, {
.tx_buf = adis->tx + 4,
.rx_buf = adis->rx,
- .bits_per_word = 8,
.len = 2,
.cs_change = 1,
.delay.value = adis->data->read_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
}, {
.rx_buf = adis->rx + 2,
- .bits_per_word = 8,
.len = 2,
.delay.value = adis->data->read_delay,
.delay.unit = SPI_DELAY_UNIT_USECS,
diff --git a/drivers/iio/imu/adis_buffer.c b/drivers/iio/imu/adis_buffer.c
index fdfc0538734c5e781be9fd5b7183f3dfb51830b9..cd3db2388164b558b82c5da67423bd2ca142858b 100644
--- a/drivers/iio/imu/adis_buffer.c
+++ b/drivers/iio/imu/adis_buffer.c
@@ -49,12 +49,10 @@ static int adis_update_scan_mode_burst(struct iio_dev *indio_dev,
tx[1] = 0;
adis->xfer[0].tx_buf = tx;
- adis->xfer[0].bits_per_word = 8;
adis->xfer[0].len = 2;
if (adis->data->burst_max_speed_hz)
adis->xfer[0].speed_hz = adis->data->burst_max_speed_hz;
adis->xfer[1].rx_buf = adis->buffer;
- adis->xfer[1].bits_per_word = 8;
adis->xfer[1].len = burst_length;
if (adis->data->burst_max_speed_hz)
adis->xfer[1].speed_hz = adis->data->burst_max_speed_hz;
@@ -100,7 +98,6 @@ int adis_update_scan_mode(struct iio_dev *indio_dev,
spi_message_init(&adis->msg);
for (j = 0; j <= scan_count; j++) {
- adis->xfer[j].bits_per_word = 8;
if (j != scan_count)
adis->xfer[j].cs_change = 1;
adis->xfer[j].len = 2;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 10/14] iio: magnetometer: hmc5843_spi: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (8 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 09/14] iio: imu: adis: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 11/14] iio: magnetometer: rm3100-spi: " David Lechner
` (4 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the hmc5843 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/magnetometer/hmc5843_spi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/magnetometer/hmc5843_spi.c b/drivers/iio/magnetometer/hmc5843_spi.c
index b7fde331069d6a3d2f5cd2ecd636318d1e276222..6a55c1559b0d8c0c73b4360a9517707651df49b3 100644
--- a/drivers/iio/magnetometer/hmc5843_spi.c
+++ b/drivers/iio/magnetometer/hmc5843_spi.c
@@ -60,7 +60,6 @@ static int hmc5843_spi_probe(struct spi_device *spi)
spi->mode = SPI_MODE_3;
spi->max_speed_hz = 8000000;
- spi->bits_per_word = 8;
ret = spi_setup(spi);
if (ret)
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 11/14] iio: magnetometer: rm3100-spi: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (9 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 10/14] iio: magnetometer: hmc5843_spi: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 12/14] iio: pressure: bmp280-spi: " David Lechner
` (3 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the rm3100 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/magnetometer/rm3100-spi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/magnetometer/rm3100-spi.c b/drivers/iio/magnetometer/rm3100-spi.c
index dd6d48043740c12a45f1d10aa26c732128c7db27..2f60a41c07f7dfdc5e4a083f51b244f677547af8 100644
--- a/drivers/iio/magnetometer/rm3100-spi.c
+++ b/drivers/iio/magnetometer/rm3100-spi.c
@@ -32,7 +32,6 @@ static int rm3100_probe(struct spi_device *spi)
spi->mode = SPI_MODE_0;
/* Data rates cannot exceed 1Mbits. */
spi->max_speed_hz = 1000000;
- spi->bits_per_word = 8;
ret = spi_setup(spi);
if (ret)
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 12/14] iio: pressure: bmp280-spi: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (10 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 11/14] iio: magnetometer: rm3100-spi: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 13/14] iio: pressure: ms5611_spi: " David Lechner
` (2 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the bmp280 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Since no other SPI settings are changed, we can also remove the call to
spi_setup().
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/pressure/bmp280-spi.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c
index c4fded3398da53e60d4bc775dba351e31688755f..3b90384f17d735777d4aaefbaca085aa0ed20db4 100644
--- a/drivers/iio/pressure/bmp280-spi.c
+++ b/drivers/iio/pressure/bmp280-spi.c
@@ -81,14 +81,6 @@ static int bmp280_spi_probe(struct spi_device *spi)
const struct bmp280_chip_info *chip_info;
struct regmap_bus const *bmp_regmap_bus;
struct regmap *regmap;
- int ret;
-
- spi->bits_per_word = 8;
- ret = spi_setup(spi);
- if (ret < 0) {
- dev_err(&spi->dev, "spi_setup failed!\n");
- return ret;
- }
chip_info = spi_get_device_match_data(spi);
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 13/14] iio: pressure: ms5611_spi: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (11 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 12/14] iio: pressure: bmp280-spi: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-05 19:20 ` [PATCH 14/14] iio: pressure: zpa2326_spi: " David Lechner
2025-05-07 6:28 ` [PATCH 00/14] iio: remove bits_per_word = 8 assignments Nuno Sá
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the ms5611 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/pressure/ms5611_spi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/pressure/ms5611_spi.c b/drivers/iio/pressure/ms5611_spi.c
index b5a91e885793543bcd2e8f231a21ba91b8eac6c4..25c7bd2d8fdfd56a425a7cf3a82885962c097b7c 100644
--- a/drivers/iio/pressure/ms5611_spi.c
+++ b/drivers/iio/pressure/ms5611_spi.c
@@ -92,7 +92,6 @@ static int ms5611_spi_probe(struct spi_device *spi)
spi->mode = SPI_MODE_0;
spi->max_speed_hz = min(spi->max_speed_hz, 20000000U);
- spi->bits_per_word = 8;
ret = spi_setup(spi);
if (ret < 0)
return ret;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* [PATCH 14/14] iio: pressure: zpa2326_spi: remove bits_per_word = 8
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (12 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 13/14] iio: pressure: ms5611_spi: " David Lechner
@ 2025-05-05 19:20 ` David Lechner
2025-05-07 6:28 ` [PATCH 00/14] iio: remove bits_per_word = 8 assignments Nuno Sá
14 siblings, 0 replies; 18+ messages in thread
From: David Lechner @ 2025-05-05 19:20 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Nuno Sá,
Esteban Blanc, Jonathan Cameron, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang
Cc: linux-iio, linux-kernel, David Lechner
Remove setting bits_per_word = 8 from the zpa2326 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/pressure/zpa2326_spi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iio/pressure/zpa2326_spi.c b/drivers/iio/pressure/zpa2326_spi.c
index 8a695b065a5fa40caee128b7eb8afe8485e72659..af756e2b0f313ab749ac0e83c6915912db0ff333 100644
--- a/drivers/iio/pressure/zpa2326_spi.c
+++ b/drivers/iio/pressure/zpa2326_spi.c
@@ -47,7 +47,6 @@ static int zpa2326_probe_spi(struct spi_device *spi)
*/
spi->mode = SPI_MODE_3;
spi->max_speed_hz = min(spi->max_speed_hz, 1000000U);
- spi->bits_per_word = 8;
err = spi_setup(spi);
if (err < 0)
return err;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 00/14] iio: remove bits_per_word = 8 assignments
2025-05-05 19:20 [PATCH 00/14] iio: remove bits_per_word = 8 assignments David Lechner
` (13 preceding siblings ...)
2025-05-05 19:20 ` [PATCH 14/14] iio: pressure: zpa2326_spi: " David Lechner
@ 2025-05-07 6:28 ` Nuno Sá
2025-05-07 19:57 ` Jonathan Cameron
14 siblings, 1 reply; 18+ messages in thread
From: Nuno Sá @ 2025-05-07 6:28 UTC (permalink / raw)
To: David Lechner, Lars-Peter Clausen, Michael Hennerich,
Nuno Sá, Esteban Blanc, Jonathan Cameron, Andy Shevchenko,
Oleksij Rempel, kernel, Song Qiang
Cc: linux-iio, linux-kernel
On Mon, 2025-05-05 at 14:20 -0500, David Lechner wrote:
> While grepping the IIO subsystem for drivers that set bits_per_word to
> unusual values to check for potential bugs, I found it to be a bit of a
> nuisance that 2/3s of the matches were setting it to the default value
> of 8. So here is a series removing the unnecessary assignments.
>
> ---
LGTM,
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> David Lechner (14):
> iio: adc: ad4030: remove bits_per_word = 8
> iio: adc: ti-tsc2046: remove bits_per_word = 8
> iio: chemical: bme680_spi: remove bits_per_word = 8
> iio: dac: ad5761: remove bits_per_word = 8
> iio: dac: ad5766: remove bits_per_word = 8
> iio: dac: ad5791: remove bits_per_word = 8
> iio: dac: ltc2688: remove bits_per_word = 8
> iio: gyro: adxrs450: remove bits_per_word = 8
> iio: imu: adis: remove bits_per_word = 8
> iio: magnetometer: hmc5843_spi: remove bits_per_word = 8
> iio: magnetometer: rm3100-spi: remove bits_per_word = 8
> iio: pressure: bmp280-spi: remove bits_per_word = 8
> iio: pressure: ms5611_spi: remove bits_per_word = 8
> iio: pressure: zpa2326_spi: remove bits_per_word = 8
>
> drivers/iio/adc/ad4030.c | 4 ----
> drivers/iio/adc/ti-tsc2046.c | 1 -
> drivers/iio/chemical/bme680_spi.c | 8 --------
> drivers/iio/dac/ad5761.c | 2 --
> drivers/iio/dac/ad5766.c | 2 --
> drivers/iio/dac/ad5791.c | 2 --
> drivers/iio/dac/ltc2688.c | 2 --
> drivers/iio/gyro/adxrs450.c | 5 -----
> drivers/iio/imu/adis.c | 9 ---------
> drivers/iio/imu/adis_buffer.c | 3 ---
> drivers/iio/magnetometer/hmc5843_spi.c | 1 -
> drivers/iio/magnetometer/rm3100-spi.c | 1 -
> drivers/iio/pressure/bmp280-spi.c | 8 --------
> drivers/iio/pressure/ms5611_spi.c | 1 -
> drivers/iio/pressure/zpa2326_spi.c | 1 -
> 15 files changed, 50 deletions(-)
> ---
> base-commit: 7e9a82ab5b861d3c33c99a22c1245a5b262ee502
> change-id: 20250505-iio-remove-bits_per_word-8-db80654b1c17
>
> Best regards,
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH 00/14] iio: remove bits_per_word = 8 assignments
2025-05-07 6:28 ` [PATCH 00/14] iio: remove bits_per_word = 8 assignments Nuno Sá
@ 2025-05-07 19:57 ` Jonathan Cameron
0 siblings, 0 replies; 18+ messages in thread
From: Jonathan Cameron @ 2025-05-07 19:57 UTC (permalink / raw)
To: Nuno Sá
Cc: David Lechner, Lars-Peter Clausen, Michael Hennerich,
Nuno Sá, Esteban Blanc, Andy Shevchenko, Oleksij Rempel,
kernel, Song Qiang, linux-iio, linux-kernel
On Wed, 07 May 2025 07:28:12 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Mon, 2025-05-05 at 14:20 -0500, David Lechner wrote:
> > While grepping the IIO subsystem for drivers that set bits_per_word to
> > unusual values to check for potential bugs, I found it to be a bit of a
> > nuisance that 2/3s of the matches were setting it to the default value
> > of 8. So here is a series removing the unnecessary assignments.
> >
> > ---
>
> LGTM,
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Applied. Still time to comment if we missed anything though as for
now just pushed out for 0-day to poke at.
Thanks,
Jonathan
>
> > David Lechner (14):
> > iio: adc: ad4030: remove bits_per_word = 8
> > iio: adc: ti-tsc2046: remove bits_per_word = 8
> > iio: chemical: bme680_spi: remove bits_per_word = 8
> > iio: dac: ad5761: remove bits_per_word = 8
> > iio: dac: ad5766: remove bits_per_word = 8
> > iio: dac: ad5791: remove bits_per_word = 8
> > iio: dac: ltc2688: remove bits_per_word = 8
> > iio: gyro: adxrs450: remove bits_per_word = 8
> > iio: imu: adis: remove bits_per_word = 8
> > iio: magnetometer: hmc5843_spi: remove bits_per_word = 8
> > iio: magnetometer: rm3100-spi: remove bits_per_word = 8
> > iio: pressure: bmp280-spi: remove bits_per_word = 8
> > iio: pressure: ms5611_spi: remove bits_per_word = 8
> > iio: pressure: zpa2326_spi: remove bits_per_word = 8
> >
> > drivers/iio/adc/ad4030.c | 4 ----
> > drivers/iio/adc/ti-tsc2046.c | 1 -
> > drivers/iio/chemical/bme680_spi.c | 8 --------
> > drivers/iio/dac/ad5761.c | 2 --
> > drivers/iio/dac/ad5766.c | 2 --
> > drivers/iio/dac/ad5791.c | 2 --
> > drivers/iio/dac/ltc2688.c | 2 --
> > drivers/iio/gyro/adxrs450.c | 5 -----
> > drivers/iio/imu/adis.c | 9 ---------
> > drivers/iio/imu/adis_buffer.c | 3 ---
> > drivers/iio/magnetometer/hmc5843_spi.c | 1 -
> > drivers/iio/magnetometer/rm3100-spi.c | 1 -
> > drivers/iio/pressure/bmp280-spi.c | 8 --------
> > drivers/iio/pressure/ms5611_spi.c | 1 -
> > drivers/iio/pressure/zpa2326_spi.c | 1 -
> > 15 files changed, 50 deletions(-)
> > ---
> > base-commit: 7e9a82ab5b861d3c33c99a22c1245a5b262ee502
> > change-id: 20250505-iio-remove-bits_per_word-8-db80654b1c17
> >
> > Best regards,
>
^ permalink raw reply [flat|nested] 18+ messages in thread