]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: adc: bd79124: Add GPIOLIB dependency
authorMatti Vaittinen <mazziesaccount@gmail.com>
Wed, 13 Aug 2025 09:16:06 +0000 (12:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:34:39 +0000 (16:34 +0200)
commit 8a6ededaad2d2dcaac8e545bffee1073dca9db95 upstream.

The bd79124 has ADC inputs which can be muxed to be GPIOs. The driver
supports this by registering a GPIO-chip for channels which aren't used
as ADC.

The Kconfig entry does not handle the dependency to GPIOLIB, which
causes errors:

ERROR: modpost: "devm_gpiochip_add_data_with_key" [drivers/iio/adc/rohm-bd79124.ko] undefined!
ERROR: modpost: "gpiochip_get_data" [drivers/iio/adc/rohm-bd79124.ko] undefined!

at linking phase if GPIOLIB is not configured to be used.

Fix this by adding dependency to the GPIOLIB.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508131533.5sSkq80B-lkp@intel.com/
Fixes: 3f57a3b9ab74 ("iio: adc: Support ROHM BD79124 ADC")
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://patch.msgid.link/6837249bddf358924e67566293944506206d2d62.1755076369.git.mazziesaccount@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/Kconfig

index ea3ba139739281de82848e25fd2b6ca479a939dc..a632c74c1fc510a22ae2d3fc939e36ab3d8a8380 100644 (file)
@@ -1257,7 +1257,7 @@ config RN5T618_ADC
 
 config ROHM_BD79124
        tristate "Rohm BD79124 ADC driver"
-       depends on I2C
+       depends on I2C && GPIOLIB
        select REGMAP_I2C
        select IIO_ADC_HELPER
        help