Skip to content

Commit 7e5cd69

Browse files
geertuWolfram Sang
authored andcommitted
i2c: 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 <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent bea6ff0 commit 7e5cd69

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

drivers/i2c/busses/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ config I2C_CADENCE
419419

420420
config I2C_CBUS_GPIO
421421
tristate "CBUS I2C driver"
422-
depends on GPIOLIB
422+
depends on GPIOLIB || COMPILE_TEST
423423
help
424424
Support for CBUS access using I2C API. Mostly relevant for Nokia
425425
Internet Tablets (770, N800 and N810).
@@ -525,7 +525,7 @@ config I2C_EXYNOS5
525525

526526
config I2C_GPIO
527527
tristate "GPIO-based bitbanging I2C"
528-
depends on GPIOLIB
528+
depends on GPIOLIB || COMPILE_TEST
529529
select I2C_ALGOBIT
530530
help
531531
This is a very simple bitbanging I2C driver utilizing the

drivers/i2c/muxes/Kconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ menu "Multiplexer I2C Chip support"
77

88
config I2C_ARB_GPIO_CHALLENGE
99
tristate "GPIO-based I2C arbitration"
10-
depends on GPIOLIB && OF
10+
depends on GPIOLIB || COMPILE_TEST
11+
depends on OF
1112
help
1213
If you say yes to this option, support will be included for an
1314
I2C multimaster arbitration scheme using GPIOs and a challenge &
@@ -40,7 +41,7 @@ config I2C_MUX_PCA9541
4041

4142
config I2C_MUX_PCA954x
4243
tristate "Philips PCA954x I2C Mux/switches"
43-
depends on GPIOLIB
44+
depends on GPIOLIB || COMPILE_TEST
4445
help
4546
If you say yes here you get support for the Philips PCA954x
4647
I2C mux/switch devices.

0 commit comments

Comments
 (0)