Skip to contentSkip to conversation

iio: adc: add missing 'select REGMAP' to Kconfig

PATCH Applied Joshua Crofts 4 participants 11 messages Jul 8 – Jul 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover iio: adc: add missing 'select REGMAP' to Kconfig

This series adds missing select REGMAP and select REGMAP_I2C to the AD7380/MAX34408/MAX14001 Kconfig entries. Without these, some builds may result in a failure.

Steps to reproduce build failure:
1. Run make allnoconfig.
2. Run make menuconfig and select I2C/SPI, IIO and any of said drivers.
3. Run make . and make will end with regmap-related errors.

---
Joshua Crofts (3):
iio: adc: ad7380: add missing 'select REGMAP' to Kconfig
iio: adc: max34408: add missing 'select REGMAP_I2C' to Kconfig
iio: adc: max14001: add missing 'select REGMAP' to Kconfig

 drivers/iio/adc/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

---
base-commit: 093239070573637ad2b4cb56abc9c4c7ee109294
change-id: 20260707-add-missing-regmap-b6c199a5cf6f

Best regards,

Signature · 3 lines
Kind regards

CJD
#1 lore raw

PATCH 1/3 iio: adc: ad7380: add missing 'select REGMAP' to Kconfig

The Kconfig entry for the AD7380 is missing a 'select REGMAP' parameter, causing build failures.

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 d1b198cb8a80..6d1170bc4c7c 100644
@@ -330,6 +330,7 @@ config AD7380
 	tristate "Analog Devices AD7380 ADC driver"
 	depends on SPI_MASTER
 	select SPI_OFFLOAD
+	select REGMAP
 	select IIO_BUFFER
 	select IIO_BUFFER_DMAENGINE
 	select IIO_TRIGGER
Signature · 1 line
2.54.0
reviewer
#2 lore raw

Re: [PATCH 1/3] iio: adc: ad7380: add missing 'select REGMAP' to Kconfig

Quoted 2 lines · Joshua Crofts

The Kconfig entry for the AD7380 is missing a 'select REGMAP' parameter, causing build failures.

This one has already been fixed.

https://lore.kernel.org/linux-iio/20260603134955.2f1d5ede@jic23-huawei/

Suggest to use linux-next for development so you get both the fixes-togreg branch and the regular togreg branch.

Quoted 21 lines
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 d1b198cb8a80..6d1170bc4c7c 100644
@@ -330,6 +330,7 @@ config AD7380
 	tristate "Analog Devices AD7380 ADC driver"
 	depends on SPI_MASTER
 	select SPI_OFFLOAD
+	select REGMAP
 	select IIO_BUFFER
 	select IIO_BUFFER_DMAENGINE
 	select IIO_TRIGGER
#3 lore raw

Re: [PATCH 1/3] iio: adc: ad7380: add missing 'select REGMAP' to Kconfig

Quoted 10 lines · On Wed, 8 Jul 2026 09:32:24 -0500 David Lechner <[email protected]> wrote:
Quoted 2 lines · Joshua Crofts

The Kconfig entry for the AD7380 is missing a 'select REGMAP' parameter, causing build failures.

This one has already been fixed.

https://lore.kernel.org/linux-iio/20260603134955.2f1d5ede@jic23-huawei/

Suggest to use linux-next for development so you get both the fixes-togreg branch and the regular togreg branch.

Ugh, my bad, I only use the testing branch in the IIO tree.

Thanks

Signature · 3 lines
Kind regards

CJD
#4 lore raw

PATCH 2/3 iio: adc: max34408: add missing 'select REGMAP_I2C' to Kconfig

In reply to Joshua Crofts

The Kconfig entry for the MAX34408 is missing a 'select REGMAP_I2C', causing build failures.

Fixes cf27775838c5 ("iio: adc: Add driver support for MAX34408/9")
---
 drivers/iio/adc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/Kconfig +1 -0
index 6d1170bc4c7c..01e48d6701ee 100644
@@ -1085,6 +1085,7 @@ config MAX14001
 config MAX34408
 	tristate "Maxim max34408/max344089 ADC driver"
 	depends on I2C
+	select REGMAP_I2C
 	help
 	  Say yes here to build support for Maxim max34408/max34409 current sense
 	  monitor with 8-bits ADC interface with overcurrent delay/threshold and
Signature · 1 line
2.54.0
#5 lore raw

PATCH 3/3 iio: adc: max14001: add missing 'select REGMAP' to Kconfig

In reply to Joshua Crofts

The Kconfig entry for the MAX14001 is missing a 'select REGMAP', causing build failures.

Fixes 59795109fa67 ("iio: adc: max14001: New driver")
---
 drivers/iio/adc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/iio/adc/Kconfig +1 -0
index 01e48d6701ee..91a39860c676 100644
@@ -1075,6 +1075,7 @@ config MAX1363
 config MAX14001
 	tristate "Analog Devices MAX14001/MAX14002 ADC driver"
 	depends on SPI
+	select REGMAP
 	help
 	  Say yes here to build support for Analog Devices MAX14001/MAX14002
 	  Configurable, Isolated 10-bit ADCs for Multi-Range Binary Inputs.
Signature · 1 line
2.54.0
#6 lore raw
In reply to Joshua Crofts
Quoted 8 lines · Joshua Crofts

This series adds missing select REGMAP and select REGMAP_I2C to the AD7380/MAX34408/MAX14001 Kconfig entries. Without these, some builds may result in a failure.

Steps to reproduce build failure:
1. Run make allnoconfig.
2. Run make menuconfig and select I2C/SPI, IIO and any of said drivers.
3. Run make . and make will end with regmap-related errors.

Repeating same mistake from the previous similar contribution. Where is the actual excerpt of the failure? Please, provide one.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#7 lore raw
Quoted 5 lines · On Wed, 8 Jul 2026 10:47:48 +0300 Andy Shevchenko…
Quoted 3 lines · Joshua Crofts

This series adds missing select REGMAP and select REGMAP_I2C to the AD7380/MAX34408/MAX14001 Kconfig entries. Without these, some builds may result in a failure.

Quoted 8 lines
Quoted 4 lines

Steps to reproduce build failure:
1. Run make allnoconfig.
2. Run make menuconfig and select I2C/SPI, IIO and any of said drivers.
3. Run make . and make will end with regmap-related errors.

Repeating same mistake from the previous similar contribution. Where is the actual excerpt of the failure? Please, provide one.

Here is one of the several errors when compiling.

drivers/iio/adc/max14001.c: In function ‘max14001_probe’:
drivers/iio/adc/max14001.c:315:22: error: implicit declaration of function ‘devm_regmap_init’ [-Wimplicit-function-declaration]

  315 |         st->regmap = devm_regmap_init(dev, NULL, st, &max14001_regmap_config);
      |                      ^~~~~~~~~~~~~~~~

drivers/iio/adc/max14001.c:315:20: error: assignment to ‘struct regmap *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
315 | st->regmap = devm_regmap_init(dev, NULL, st, &max14001_regmap_config);
| ^

Funny how I essentially copied the cover letter from the series where I added missing IIO_TRIGGER_BUFFER entries to Kconfig - to which you didn't require an example build error :-)

Shall I do a v2 or is this reply enough?

Thanks

Signature · 3 lines
Kind regards

CJD
#8 lore raw
Quoted 27 lines · Joshua Crofts
Quoted 5 lines · On Wed, 8 Jul 2026 10:47:48 +0300 Andy Shevchenko…
Quoted 3 lines · Joshua Crofts

This series adds missing select REGMAP and select REGMAP_I2C to the AD7380/MAX34408/MAX14001 Kconfig entries. Without these, some builds may result in a failure.

Quoted 8 lines
Quoted 4 lines

Steps to reproduce build failure:
1. Run make allnoconfig.
2. Run make menuconfig and select I2C/SPI, IIO and any of said drivers.
3. Run make . and make will end with regmap-related errors.

Repeating same mistake from the previous similar contribution. Where is the actual excerpt of the failure? Please, provide one.

Here is one of the several errors when compiling.

drivers/iio/adc/max14001.c: In function ‘max14001_probe’:
drivers/iio/adc/max14001.c:315:22: error: implicit declaration of function ‘devm_regmap_init’ [-Wimplicit-function-declaration]

  315 |         st->regmap = devm_regmap_init(dev, NULL, st, &max14001_regmap_config);
      |                      ^~~~~~~~~~~~~~~~

drivers/iio/adc/max14001.c:315:20: error: assignment to ‘struct regmap *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
315 | st->regmap = devm_regmap_init(dev, NULL, st, &max14001_regmap_config);
| ^

Quoted 5 lines

Funny how I essentially copied the cover letter from the series where I added missing IIO_TRIGGER_BUFFER entries to Kconfig - to which you didn't require an example build error :-)

Shall I do a v2 or is this reply enough?

For now this reply is enough, but in the future add it to the initial contribution from the start.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on the v1 series
#9 lore raw
In reply to Joshua Crofts
Quoted 8 lines · Joshua Crofts

This series adds missing select REGMAP and select REGMAP_I2C to the AD7380/MAX34408/MAX14001 Kconfig entries. Without these, some builds may result in a failure.

Steps to reproduce build failure:
1. Run make allnoconfig.
2. Run make menuconfig and select I2C/SPI, IIO and any of said drivers.
3. Run make . and make will end with regmap-related errors.

Taking into account the real build failures as pointed in the replies, the fixes LGTM,

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Applied
#10 lore raw
Quoted 5 lines · On Wed, 8 Jul 2026 13:55:31 +0300 Andy Shevchenko…
Quoted 4 lines · Joshua Crofts

This series adds missing select REGMAP and select REGMAP_I2C to the AD7380/MAX34408/MAX14001 Kconfig entries. Without these, some builds may result in a failure.

Quoted 9 lines
Quoted 4 lines

Steps to reproduce build failure:
1. Run make allnoconfig.
2. Run make menuconfig and select I2C/SPI, IIO and any of said drivers.
3. Run make . and make will end with regmap-related errors.

Taking into account the real build failures as pointed in the replies, the fixes LGTM,

Applied patches 2 and 3 to the fixes-togreg branch of iio.git.

Thanks,

Jonathan