Skip to contentSkip to conversation

iio: remove bits_per_word = 8 assignments

PATCH Applied David Lechner 4 participants 18 messages May 5, 2025 – May 7, 2025

Subsystems (7)
lore
Share & tools
lore

David Lechner

author reviewer
#0 lore raw

cover iio: remove bits_per_word = 8 assignments

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.

---
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,

Signature · 1 line
David Lechner <[email protected]>
author reviewer
#1 lore raw

PATCH 1/14 iio: adc: ad4030: remove bits_per_word = 8

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.

---
 drivers/iio/adc/ad4030.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/iio/adc/ad4030.c +0 -4
index 5aa26dc3a2cefed9bcaec1b9f3cc127d06aff19a..1bc2f9a2247081e166680232aa6d4aebc5f41b89 100644
@@ -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,
 	};
Signature · 1 line
2.43.0
author reviewer
#2 lore raw

PATCH 2/14 iio: adc: ti-tsc2046: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/adc/ti-tsc2046.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/adc/ti-tsc2046.c +0 -1
index 84a9a5e66526555b02497b105660c4822378483b..c2d2aada6772aae6fc8d01c3878d6e869d413bc7 100644
@@ -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);
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 2/14
#3 lore raw

Re: [PATCH 02/14] iio: adc: ti-tsc2046: remove bits_per_word = 8

Quoted 5 lines · 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.

Thank you!

Best Regards,
Oleksij

Signature · 4 lines
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 |
author reviewer
#4 lore raw

PATCH 3/14 iio: chemical: bme680_spi: remove bits_per_word = 8

In reply to 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().

---
 drivers/iio/chemical/bme680_spi.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/iio/chemical/bme680_spi.c +0 -8
index ced5af23846a73e0378dc936b2cf8c9508760301..aa97645ba539f6a591112d6554b893814d1ac418 100644
@@ -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)
Signature · 1 line
2.43.0
author reviewer
#5 lore raw

PATCH 4/14 iio: dac: ad5761: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/dac/ad5761.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iio/dac/ad5761.c +0 -2
index 124571ba35d1021cccbcf6883cd16607ba108af9..b5d20f04f070a170d911aff65c88600bd2de5428 100644
@@ -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,
 		},
 	};
Signature · 1 line
2.43.0
author reviewer
#6 lore raw

PATCH 5/14 iio: dac: ad5766: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/dac/ad5766.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iio/dac/ad5766.c +0 -2
index dc766c8fd37073457ad2cceeb9e57ec809d7aef4..f6a0a0d84fefd268b4693ecca1e2cc0e8f241fef 100644
@@ -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,
 		},
 	};
Signature · 1 line
2.43.0
author reviewer
#7 lore raw

PATCH 6/14 iio: dac: ad5791: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/dac/ad5791.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iio/dac/ad5791.c +0 -2
index 8214e524afdb1ac6b2f6baf69d6594694800b6a4..41582f2b90fb9d83ff82ccb27a0eea92d9d9b431 100644
@@ -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,
 		},
 	};
Signature · 1 line
2.43.0
author reviewer
#8 lore raw

PATCH 7/14 iio: dac: ltc2688: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/dac/ltc2688.c | 2 --
 1 file changed, 2 deletions(-)
drivers/iio/dac/ltc2688.c +0 -2
index 757b4831dc3e7c14574e3d811ba9a48d8350213a..1f24f07d1ad24ac1730da0e03b65207ca5f07884 100644
@@ -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,
 		},
 	};
Signature · 1 line
2.43.0
author reviewer
#9 lore raw

PATCH 8/14 iio: gyro: adxrs450: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/gyro/adxrs450.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/iio/gyro/adxrs450.c +0 -5
index 5dadb88a4d92c27b4bcba121660198311c50150b..a1d8d3cb301b26a1b15fca2f6bb9bb1494ffce79 100644
@@ -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),
 	};
 
Signature · 1 line
2.43.0
author reviewer
#10 lore raw

PATCH 9/14 iio: imu: adis: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/imu/adis.c        | 9 ---------
 drivers/iio/imu/adis_buffer.c | 3 ---
 2 files changed, 12 deletions(-)
drivers/iio/imu/adis.c +0 -9
index 0ea072a4c966994ff8b1a6c7572bfe979ada43a1..d160147cce0ba7586ac7df69af58816b413bbd46 100644
@@ -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,
drivers/iio/imu/adis_buffer.c +0 -3
index fdfc0538734c5e781be9fd5b7183f3dfb51830b9..cd3db2388164b558b82c5da67423bd2ca142858b 100644
@@ -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;
Signature · 1 line
2.43.0
author reviewer
#11 lore raw

PATCH 10/14 iio: magnetometer: hmc5843_spi: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/magnetometer/hmc5843_spi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/magnetometer/hmc5843_spi.c +0 -1
index b7fde331069d6a3d2f5cd2ecd636318d1e276222..6a55c1559b0d8c0c73b4360a9517707651df49b3 100644
@@ -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;
Signature · 1 line
2.43.0
author reviewer
#12 lore raw

PATCH 11/14 iio: magnetometer: rm3100-spi: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/magnetometer/rm3100-spi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/magnetometer/rm3100-spi.c +0 -1
index dd6d48043740c12a45f1d10aa26c732128c7db27..2f60a41c07f7dfdc5e4a083f51b244f677547af8 100644
@@ -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;
Signature · 1 line
2.43.0
author reviewer
#13 lore raw

PATCH 12/14 iio: pressure: bmp280-spi: remove bits_per_word = 8

In reply to 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().

---
 drivers/iio/pressure/bmp280-spi.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/iio/pressure/bmp280-spi.c +0 -8
index c4fded3398da53e60d4bc775dba351e31688755f..3b90384f17d735777d4aaefbaca085aa0ed20db4 100644
@@ -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);
 
Signature · 1 line
2.43.0
author reviewer
#14 lore raw

PATCH 13/14 iio: pressure: ms5611_spi: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/pressure/ms5611_spi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/pressure/ms5611_spi.c +0 -1
index b5a91e885793543bcd2e8f231a21ba91b8eac6c4..25c7bd2d8fdfd56a425a7cf3a82885962c097b7c 100644
@@ -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;
Signature · 1 line
2.43.0
author reviewer
#15 lore raw

PATCH 14/14 iio: pressure: zpa2326_spi: remove bits_per_word = 8

In reply to 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.

---
 drivers/iio/pressure/zpa2326_spi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/iio/pressure/zpa2326_spi.c +0 -1
index 8a695b065a5fa40caee128b7eb8afe8485e72659..af756e2b0f313ab749ac0e83c6915912db0ff333 100644
@@ -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;
Signature · 1 line
2.43.0
Reviewed-by on the v1 series
#16 lore raw
In reply to David Lechner
Quoted 6 lines · David Lechner

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,

Quoted 37 lines

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,

maintainer Applied
#17 lore raw
Quoted 11 lines · On Wed, 07 May 2025 07:28:12 +0100 Nuno Sá <[email protected]> wrote:
Quoted 6 lines · David Lechner

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,

Applied. Still time to comment if we missed anything though as for now just pushed out for 0-day to poke at.

Thanks,

Jonathan

Quoted 39 lines
Quoted 38 lines

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,