Skip to contentSkip to conversation

iio: adc: ad7380: select REGMAP

PATCH Applied Sam Moelius 3 participants 5 messages Jun 2 – Jun 3 IIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iio: adc: ad7380: select REGMAP

From: Samuel Moelius <[email protected]>

The AD7380 driver uses generic regmap types and APIs. However, its Kconfig entry does not select REGMAP.

As a result, AD7380 can be enabled from an allnoconfig-derived config with SPI_MASTER=y while REGMAP remains unset, causing ad7380.o to fail to build.

Fixes b095217c104b ("iio: adc: ad7380: new driver for AD7380 ADCs")
---
 drivers/iio/adc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/Kconfig +1 -0
index a9dedbb8eb46..c79341848698 100644
@@ -311,6 +311,7 @@ config AD7298
 config AD7380
 	tristate "Analog Devices AD7380 ADC driver"
 	depends on SPI_MASTER
+	select REGMAP
 	select SPI_OFFLOAD
 	select IIO_BUFFER
 	select IIO_BUFFER_DMAENGINE
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Sam Moelius

The AD7380 driver uses generic regmap types and APIs. However, its Kconfig entry does not select REGMAP.

As a result, AD7380 can be enabled from an allnoconfig-derived config with SPI_MASTER=y while REGMAP remains unset, causing ad7380.o to fail to build.

Okay,

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#2 lore raw
Quoted 5 lines · On Wed, 3 Jun 2026 04:14:54 +0300 Andy Shevchenko…
Quoted 3 lines · Sam Moelius

The AD7380 driver uses generic regmap types and APIs. However, its Kconfig entry does not select REGMAP.

Quoted 7 lines
Quoted 3 lines

As a result, AD7380 can be enabled from an allnoconfig-derived config with SPI_MASTER=y while REGMAP remains unset, causing ad7380.o to fail to build.

Okay,

I replied late to v1. Unless I'm missing something makes more sense to select REGMAP_SPI

Jonathan

#3 lore raw
Quoted 13 lines · Jonathan Cameron
Quoted 9 lines · On Wed, 3 Jun 2026 04:14:54 +0300 Andy Shevchenko…
Quoted 6 lines · Sam Moelius

The AD7380 driver uses generic regmap types and APIs. However, its Kconfig entry does not select REGMAP.

As a result, AD7380 can be enabled from an allnoconfig-derived config with SPI_MASTER=y while REGMAP remains unset, causing ad7380.o to fail to build.

Quoted 5 lines
Quoted 3 lines

Okay,

I replied late to v1. Unless I'm missing something makes more sense to select REGMAP_SPI

REGMAP_SPI also builds drivers/base/regmap/regmap-spi.o, which AD7380 does not use.

So, to merely fix the ad7380.o build failure, REGMAP seems to be the right choice.

maintainer Applied
#4 lore raw
Quoted 17 lines · On Wed, 3 Jun 2026 07:53:09 -0400 Samuel Moelius <[email protected]>…
Quoted 16 lines · Jonathan Cameron
Quoted 12 lines · On Wed, 3 Jun 2026 04:14:54 +0300 Andy Shevchenko…
Quoted 6 lines · Sam Moelius

The AD7380 driver uses generic regmap types and APIs. However, its Kconfig entry does not select REGMAP.

As a result, AD7380 can be enabled from an allnoconfig-derived config with SPI_MASTER=y while REGMAP remains unset, causing ad7380.o to fail to build.

Okay,

Quoted 8 lines
Quoted 2 lines

I replied late to v1. Unless I'm missing something makes more sense to select REGMAP_SPI

REGMAP_SPI also builds drivers/base/regmap/regmap-spi.o, which AD7380 does not use.

So, to merely fix the ad7380.o build failure, REGMAP seems to be the right choice.

Good point. I failed to notice it uses a custom regmap.

Applied to the fixes-togreg branch of iio.git and marked for stable.

Given timing I may well drag that into the queue for the merge window rather than ending a separate pull request for fixes.