iio: adc: ad7380: select REGMAP
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.
--- drivers/iio/adc/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/iio/adc/Kconfig +1 -0
@@ -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
Quoted 6 lines · Sam Moelius
The AD7380 driver uses generic regmap types and APIs. However, its
Kconfigentry 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
Jonathan Cameron
maintainerQuoted 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
Kconfigentry 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,
Reviewed-by Andy Shevchenko <[email protected]>
I replied late to v1. Unless I'm missing something makes more sense to select REGMAP_SPI
Jonathan
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
Kconfigentry 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,
Reviewed-by Andy Shevchenko <[email protected]>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.
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
Kconfigentry 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,
Reviewed-by Andy Shevchenko <[email protected]>
Quoted 8 lines
Quoted 2 lines
I replied late to v1. Unless I'm missing something makes more sense to select
REGMAP_SPI
REGMAP_SPIalso buildsdrivers/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.