Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: Allow compile test of GPIO consumers if !GPIOLIB

The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
functionality only, can still be compiled if GPIOLIB is not enabled.

Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
appropriate.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Geert Uytterhoeven and committed by
Jonathan Cameron
84935853 3dd477ac

+3 -3
+1 -1
drivers/iio/humidity/Kconfig
··· 5 5 6 6 config DHT11 7 7 tristate "DHT11 (and compatible sensors) driver" 8 - depends on GPIOLIB 8 + depends on GPIOLIB || COMPILE_TEST 9 9 help 10 10 This driver supports reading data via a single interrupt 11 11 generating GPIO line. Currently tested are DHT11 and DHT22.
+2 -2
drivers/iio/magnetometer/Kconfig
··· 8 8 config AK8975 9 9 tristate "Asahi Kasei AK 3-Axis Magnetometer" 10 10 depends on I2C 11 - depends on GPIOLIB 11 + depends on GPIOLIB || COMPILE_TEST 12 12 help 13 13 Say yes here to build support for Asahi Kasei AK8975, AK8963, 14 14 AK09911 or AK09912 3-Axis Magnetometer. ··· 19 19 config AK09911 20 20 tristate "Asahi Kasei AK09911 3-axis Compass" 21 21 depends on I2C 22 - depends on GPIOLIB 22 + depends on GPIOLIB || COMPILE_TEST 23 23 select AK8975 24 24 help 25 25 Deprecated: AK09911 is now supported by AK8975 driver.