2015-05-05 16:07:21

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 00/27] gpio: Allow compile test of GPIO consumers if !GPIOLIB

Hi all,

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.

This patch series relaxes the dependencies on GPIOLIB if COMPILE_TEST is
enabled, where appropriate:
- Patches 1-2 add missing dependencies on GPIOLIB || COMPILE_TEST,
- Patches 3-27 relax existing dependencies on GPIOLIB.
In some cases (patches 1,2, and 4), this required adding a missing
include (<linux/gpio/consumer.h>), as this may not be included if
asm-generic/gpio.h is not used.

There are a few more drivers that depend on GPIOLIB and that may be
eligible for COMPILE_TEST. These I didn't handle yet, as I couldn't
enable them with m68k/all{mod,yes}config due to other dependencies.

This series is against v4.1-rc2 and next-20150505 with the exception of
patch 21, which has an additional dependency (mentioned in the patch
itself, incl. resolution instructions if the dependency isn't
satisified).

Thanks!

Geert Uytterhoeven (27):
drm/bridge: ptn3460: #include <linux/gpio/consumer.h>, depend on
GPIOLIB
drm/bridge: ps8622: #include <linux/gpio/consumer.h>, depend on
GPIOLIB
tpm: Allow compile test of GPIO consumers if !GPIOLIB
extcon: Allow compile test of GPIO consumers if !GPIOLIB
hwmon: Allow compile test of GPIO consumers if !GPIOLIB
i2c: Allow compile test of GPIO consumers if !GPIOLIB
iio: Allow compile test of GPIO consumers if !GPIOLIB
input: Allow compile test of GPIO consumers if !GPIOLIB
leds: Allow compile test of GPIO consumers if !GPIOLIB
[media] wl128x: Allow compile test of GPIO consumers if !GPIOLIB
mfd: Allow compile test of GPIO consumers if !GPIOLIB
misc: ti-st: Allow compile test of GPIO consumers if !GPIOLIB
mtd: Allow compile test of GPIO consumers if !GPIOLIB
net: phy: Allow compile test of GPIO consumers if !GPIOLIB
power: Allow compile test of GPIO consumers if !GPIOLIB
regulator: Allow compile test of GPIO consumers if !GPIOLIB
spi: Allow compile test of GPIO consumers if !GPIOLIB
staging: android: Allow compile test of GPIO consumers if !GPIOLIB
staging: fbtft: Allow compile test of GPIO consumers if !GPIOLIB
Staging: iio: Allow compile test of GPIO consumers if !GPIOLIB
serial: Allow compile test of GPIO consumers if !GPIOLIB
usb: phy: Allow compile test of GPIO consumers if !GPIOLIB
backlight: Allow compile test of GPIO consumers if !GPIOLIB
fbdev: Allow compile test of GPIO consumers if !GPIOLIB
w1: Allow compile test of GPIO consumers if !GPIOLIB
watchdog: Allow compile test of GPIO consumers if !GPIOLIB
net: rfkill: Allow compile test of GPIO consumers if !GPIOLIB

drivers/char/tpm/st33zp24/Kconfig | 2 +-
drivers/extcon/Kconfig | 4 ++--
drivers/extcon/extcon-usb-gpio.c | 1 +
drivers/gpu/drm/bridge/Kconfig | 8 ++++----
drivers/gpu/drm/bridge/ps8622.c | 1 +
drivers/gpu/drm/bridge/ptn3460.c | 1 +
drivers/hwmon/Kconfig | 4 ++--
drivers/i2c/busses/Kconfig | 4 ++--
drivers/i2c/muxes/Kconfig | 5 +++--
drivers/iio/humidity/Kconfig | 2 +-
drivers/iio/magnetometer/Kconfig | 4 ++--
drivers/input/keyboard/Kconfig | 4 ++--
drivers/input/misc/Kconfig | 11 ++++++-----
drivers/input/mouse/Kconfig | 2 +-
drivers/input/touchscreen/Kconfig | 8 ++++----
drivers/leds/Kconfig | 2 +-
drivers/leds/trigger/Kconfig | 2 +-
drivers/media/radio/wl128x/Kconfig | 4 ++--
drivers/mfd/Kconfig | 6 ++++--
drivers/misc/ti-st/Kconfig | 3 ++-
drivers/mtd/maps/Kconfig | 2 +-
drivers/mtd/nand/Kconfig | 2 +-
drivers/net/phy/Kconfig | 3 ++-
drivers/power/Kconfig | 8 +++++---
drivers/regulator/Kconfig | 2 +-
drivers/spi/Kconfig | 4 ++--
drivers/staging/android/Kconfig | 3 ++-
drivers/staging/fbtft/Kconfig | 3 ++-
drivers/staging/iio/accel/Kconfig | 2 +-
drivers/staging/iio/adc/Kconfig | 6 +++---
drivers/staging/iio/addac/Kconfig | 2 +-
drivers/staging/iio/resolver/Kconfig | 4 ++--
drivers/tty/serial/Kconfig | 3 ++-
drivers/usb/phy/Kconfig | 2 +-
drivers/video/backlight/Kconfig | 8 +++++---
drivers/video/fbdev/Kconfig | 2 +-
drivers/w1/masters/Kconfig | 2 +-
drivers/watchdog/Kconfig | 2 +-
net/rfkill/Kconfig | 3 ++-
39 files changed, 79 insertions(+), 62 deletions(-)

--
1.9.1

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


2015-05-05 16:42:45

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 01/27] drm/bridge: ptn3460: #include <linux/gpio/consumer.h>, depend on GPIOLIB

If GPIOLIB=n and asm-generic/gpio.h is not used:

drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’:
drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’
drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’:
drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’
drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast
drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’
drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast

Add the missing #include <linux/gpio/consumer.h> to fix this.

As the resulting driver won't work with GPIOLIB=n anyway, make
DRM_PTN3460 depend on GPIOLIB || COMPILE_TEST.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
---
drivers/gpu/drm/bridge/Kconfig | 4 ++--
drivers/gpu/drm/bridge/ptn3460.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index acef3223772cb899..6cdcd2ec4848edec 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -5,8 +5,8 @@ config DRM_DW_HDMI

config DRM_PTN3460
tristate "PTN3460 DP/LVDS bridge"
- depends on DRM
- depends on OF
+ depends on DRM && OF
+ depends on GPIOLIB || COMPILE_TEST
select DRM_KMS_HELPER
select DRM_PANEL
---help---
diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c
index 9d2f053382e1889a..63a09e4079f358ff 100644
--- a/drivers/gpu/drm/bridge/ptn3460.c
+++ b/drivers/gpu/drm/bridge/ptn3460.c
@@ -15,6 +15,7 @@

#include <linux/delay.h>
#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
--
1.9.1

2015-05-05 16:36:10

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 02/27] drm/bridge: ps8622: #include <linux/gpio/consumer.h>, depend on GPIOLIB

If GPIOLIB=n and asm-generic/gpio.h is not used:

drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_pre_enable’:
drivers/gpu/drm/bridge/ps8622.c:368: error: implicit declaration of function ‘gpiod_set_value’
drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_probe’:
drivers/gpu/drm/bridge/ps8622.c:584: error: implicit declaration of function ‘devm_gpiod_get’
drivers/gpu/drm/bridge/ps8622.c:584: warning: assignment makes pointer from integer without a cast
drivers/gpu/drm/bridge/ps8622.c:590: error: implicit declaration of function ‘gpiod_direction_output’
drivers/gpu/drm/bridge/ps8622.c:596: warning: assignment makes pointer from integer without a cast

Add the missing #include <linux/gpio/consumer.h> to fix this.

As the resulting driver won't work with GPIOLIB=n anyway, make
DRM_PS8622 depend on GPIOLIB || COMPILE_TEST.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
---
drivers/gpu/drm/bridge/Kconfig | 4 ++--
drivers/gpu/drm/bridge/ps8622.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
index 6cdcd2ec4848edec..3e562d3f37973efc 100644
--- a/drivers/gpu/drm/bridge/Kconfig
+++ b/drivers/gpu/drm/bridge/Kconfig
@@ -14,8 +14,8 @@ config DRM_PTN3460

config DRM_PS8622
tristate "Parade eDP/LVDS bridge"
- depends on DRM
- depends on OF
+ depends on DRM && OF
+ depends on GPIOLIB || COMPILE_TEST
select DRM_PANEL
select DRM_KMS_HELPER
select BACKLIGHT_LCD_SUPPORT
diff --git a/drivers/gpu/drm/bridge/ps8622.c b/drivers/gpu/drm/bridge/ps8622.c
index e895aa7ea353164a..a9c38f8edf172bb9 100644
--- a/drivers/gpu/drm/bridge/ps8622.c
+++ b/drivers/gpu/drm/bridge/ps8622.c
@@ -18,6 +18,7 @@
#include <linux/err.h>
#include <linux/fb.h>
#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
--
1.9.1

2015-05-05 16:42:47

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 03/27] tpm: 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]>
Cc: Peter Huewe <[email protected]>
Cc: Marcel Selhorst <[email protected]>
Cc: [email protected]
---
drivers/char/tpm/st33zp24/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/tpm/st33zp24/Kconfig b/drivers/char/tpm/st33zp24/Kconfig
index 09cb727864f0950f..19c007461d1cbd7a 100644
--- a/drivers/char/tpm/st33zp24/Kconfig
+++ b/drivers/char/tpm/st33zp24/Kconfig
@@ -1,6 +1,6 @@
config TCG_TIS_ST33ZP24
tristate "STMicroelectronics TPM Interface Specification 1.2 Interface"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
---help---
STMicroelectronics ST33ZP24 core driver. It implements the core
TPM1.2 logic and hooks into the TPM kernel APIs. Physical layers will
--
1.9.1

2015-05-05 16:33:09

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 04/27] extcon: 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.

If GPIOLIB=n and asm-generic/gpio.h is not used:

drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_detect_cable’:
drivers/extcon/extcon-usb-gpio.c:63: error: implicit declaration of function ‘gpiod_get_value_cansleep’
drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_probe’:
drivers/extcon/extcon-usb-gpio.c:116: error: implicit declaration of function ‘devm_gpiod_get’
drivers/extcon/extcon-usb-gpio.c:116: warning: assignment makes pointer from integer without a cast
drivers/extcon/extcon-usb-gpio.c:122: error: implicit declaration of function ‘gpiod_set_debounce’
drivers/extcon/extcon-usb-gpio.c:129: error: implicit declaration of function ‘gpiod_to_irq’

Add the missing #include <linux/gpio/consumer.h> to fix this.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Cc: MyungJoo Ham <[email protected]>
Cc: Chanwoo Choi <[email protected]>
---
drivers/extcon/Kconfig | 4 ++--
drivers/extcon/extcon-usb-gpio.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
index fdc0bf0543ce43ec..5d8d7244349870ca 100644
--- a/drivers/extcon/Kconfig
+++ b/drivers/extcon/Kconfig
@@ -30,7 +30,7 @@ config EXTCON_ARIZONA

config EXTCON_GPIO
tristate "GPIO extcon support"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here to enable GPIO based extcon support. Note that GPIO
extcon supports single state per extcon instance.
@@ -105,7 +105,7 @@ config EXTCON_SM5502

config EXTCON_USB_GPIO
tristate "USB GPIO extcon support"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here to enable GPIO based USB cable detection extcon support.
Used typically if GPIO is used for USB ID pin detection.
diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c
index de67fce189840eee..6c6fc33029826132 100644
--- a/drivers/extcon/extcon-usb-gpio.c
+++ b/drivers/extcon/extcon-usb-gpio.c
@@ -15,6 +15,7 @@
*/

#include <linux/extcon.h>
+#include <linux/gpio/consumer.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
--
1.9.1

2015-05-05 16:42:51

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 05/27] hwmon: 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]>
Cc: Jean Delvare <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: [email protected]
---
drivers/hwmon/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 25d9e72627e9df97..9d29f42db1856747 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -509,7 +509,7 @@ config SENSORS_G762

config SENSORS_GPIO_FAN
tristate "GPIO fan"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
depends on THERMAL || THERMAL=n
help
If you say yes here you get support for fans connected to GPIO lines.
@@ -1186,7 +1186,7 @@ config SENSORS_PWM_FAN

config SENSORS_SHT15
tristate "Sensiron humidity and temperature sensors. SHT15 and compat."
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
If you say yes here you get support for the Sensiron SHT10, SHT11,
SHT15, SHT71, SHT75 humidity and temperature sensors.
--
1.9.1

2015-05-05 16:40:59

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 06/27] 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]>
Cc: Wolfram Sang <[email protected]>
Cc: [email protected]
---
drivers/i2c/busses/Kconfig | 4 ++--
drivers/i2c/muxes/Kconfig | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 2255af23b9c70e69..5c9750ac486cdfa5 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -419,7 +419,7 @@ config I2C_CADENCE

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

config I2C_GPIO
tristate "GPIO-based bitbanging I2C"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select I2C_ALGOBIT
help
This is a very simple bitbanging I2C driver utilizing the
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index f6d313e528de3453..fdd0769c84a31a02 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -7,7 +7,8 @@ menu "Multiplexer I2C Chip support"

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

config I2C_MUX_PCA954x
tristate "Philips PCA954x I2C Mux/switches"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
If you say yes here you get support for the Philips PCA954x
I2C mux/switch devices.
--
1.9.1

2015-05-05 16:33:05

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 07/27] 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 <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: [email protected]
---
drivers/iio/humidity/Kconfig | 2 +-
drivers/iio/magnetometer/Kconfig | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/humidity/Kconfig b/drivers/iio/humidity/Kconfig
index 4813b793b9f7f944..688c0d1cb47dea36 100644
--- a/drivers/iio/humidity/Kconfig
+++ b/drivers/iio/humidity/Kconfig
@@ -5,7 +5,7 @@ menu "Humidity sensors"

config DHT11
tristate "DHT11 (and compatible sensors) driver"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
This driver supports reading data via a single interrupt
generating GPIO line. Currently tested are DHT11 and DHT22.
diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
index a5d6de72c523bab2..00297bbb7e4b4a0b 100644
--- a/drivers/iio/magnetometer/Kconfig
+++ b/drivers/iio/magnetometer/Kconfig
@@ -8,7 +8,7 @@ menu "Magnetometer sensors"
config AK8975
tristate "Asahi Kasei AK 3-Axis Magnetometer"
depends on I2C
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say yes here to build support for Asahi Kasei AK8975, AK8963,
AK09911 or AK09912 3-Axis Magnetometer.
@@ -19,7 +19,7 @@ config AK8975
config AK09911
tristate "Asahi Kasei AK09911 3-axis Compass"
depends on I2C
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select AK8975
help
Deprecated: AK09911 is now supported by AK8975 driver.
--
1.9.1

2015-05-05 16:42:44

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 08/27] input: 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]>
Cc: Dmitry Torokhov <[email protected]>
Cc: [email protected]
---
drivers/input/keyboard/Kconfig | 4 ++--
drivers/input/misc/Kconfig | 11 ++++++-----
drivers/input/mouse/Kconfig | 2 +-
drivers/input/touchscreen/Kconfig | 8 ++++----
4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 106fbac7f8c5b024..353598ad519893f9 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -187,7 +187,7 @@ config KEYBOARD_EP93XX

config KEYBOARD_GPIO
tristate "GPIO Buttons"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
This driver implements support for buttons connected
to GPIO pins of various CPUs (and some other chips).
@@ -253,7 +253,7 @@ config KEYBOARD_TCA8418

config KEYBOARD_MATRIX
tristate "GPIO driven matrix keypad support"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select INPUT_MATRIXKMAP
help
Enable support for GPIO driven matrix keypad.
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index 4436ab1b9735d608..c38a356d5a478af5 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -259,7 +259,7 @@ config INPUT_APANEL
config INPUT_GP2A
tristate "Sharp GP2AP002A00F I2C Proximity/Opto sensor driver"
depends on I2C
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here if you have a Sharp GP2AP002A00F proximity/als combo-chip
hooked to an I2C bus.
@@ -269,7 +269,7 @@ config INPUT_GP2A

config INPUT_GPIO_BEEPER
tristate "Generic GPIO Beeper support"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here if you have a beeper connected to a GPIO pin.

@@ -278,7 +278,7 @@ config INPUT_GPIO_BEEPER

config INPUT_GPIO_TILT_POLLED
tristate "Polled GPIO tilt switch"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select INPUT_POLLDEV
help
This driver implements support for tilt switches connected
@@ -569,7 +569,7 @@ config INPUT_PWM_BEEPER

config INPUT_GPIO_ROTARY_ENCODER
tristate "Rotary encoders connected to GPIO pins"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here to add support for rotary encoders connected to GPIO lines.
Check file:Documentation/input/rotary-encoder.txt for more
@@ -766,7 +766,8 @@ config INPUT_SOC_BUTTON_ARRAY

config INPUT_DRV260X_HAPTICS
tristate "TI DRV260X haptics support"
- depends on INPUT && I2C && GPIOLIB
+ depends on INPUT && I2C
+ depends on GPIOLIB || COMPILE_TEST
select INPUT_FF_MEMLESS
select REGMAP_I2C
help
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 7462d2fc8cfed8d4..1d1f8e9b19054d00 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -341,7 +341,7 @@ config MOUSE_VSXXXAA

config MOUSE_GPIO
tristate "GPIO mouse"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select INPUT_POLLDEV
help
This driver simulates a mouse on GPIO lines of various CPUs (and some
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 05e4c6ffbe363690..b60079468a3e0780 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -118,7 +118,7 @@ config TOUCHSCREEN_ATMEL_MXT
config TOUCHSCREEN_AUO_PIXCIR
tristate "AUO in-cell touchscreen using Pixcir ICs"
depends on I2C
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here if you have a AUO display with in-cell touchscreen
using Pixcir ICs.
@@ -142,7 +142,7 @@ config TOUCHSCREEN_BU21013

config TOUCHSCREEN_CHIPONE_ICN8318
tristate "chipone icn8318 touchscreen controller"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
depends on I2C
depends on OF
help
@@ -156,7 +156,7 @@ config TOUCHSCREEN_CHIPONE_ICN8318
config TOUCHSCREEN_CY8CTMG110
tristate "cy8ctmg110 touchscreen"
depends on I2C
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here if you have a cy8ctmg110 capacitive touchscreen on
an AAVA device.
@@ -1016,7 +1016,7 @@ config TOUCHSCREEN_TPS6507X
config TOUCHSCREEN_ZFORCE
tristate "Neonode zForce infrared touchscreens"
depends on I2C
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here if you have a touchscreen using the zforce
infraread technology from Neonode.
--
1.9.1

2015-05-05 16:42:50

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 09/27] leds: 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]>
Cc: Bryan Wu <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: [email protected]
---
drivers/leds/Kconfig | 2 +-
drivers/leds/trigger/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 966b9605f5f0660c..8161cddc3f8d597a 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -395,7 +395,7 @@ config LEDS_INTEL_SS4200
config LEDS_LT3593
tristate "LED driver for LT3593 controllers"
depends on LEDS_CLASS
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
This option enables support for LEDs driven by a Linear Technology
LT3593 controller. This controller uses a special one-wire pulse
diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
index 49794b47b51c498d..5bda6a9b56bbd90b 100644
--- a/drivers/leds/trigger/Kconfig
+++ b/drivers/leds/trigger/Kconfig
@@ -72,7 +72,7 @@ config LEDS_TRIGGER_CPU
config LEDS_TRIGGER_GPIO
tristate "LED GPIO Trigger"
depends on LEDS_TRIGGERS
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
This allows LEDs to be controlled by gpio events. It's good
when using gpios as switches and triggering the needed LEDs
--
1.9.1

2015-05-05 16:33:11

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 10/27] [media] wl128x: 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]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: [email protected]
---
drivers/media/radio/wl128x/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/radio/wl128x/Kconfig b/drivers/media/radio/wl128x/Kconfig
index 9d6574bebf78b4f6..c9e349b169c44c07 100644
--- a/drivers/media/radio/wl128x/Kconfig
+++ b/drivers/media/radio/wl128x/Kconfig
@@ -4,8 +4,8 @@
menu "Texas Instruments WL128x FM driver (ST based)"
config RADIO_WL128X
tristate "Texas Instruments WL128x FM Radio"
- depends on VIDEO_V4L2 && RFKILL && GPIOLIB && TTY
- depends on TI_ST
+ depends on VIDEO_V4L2 && RFKILL && TTY && TI_ST
+ depends on GPIOLIB || COMPILE_TEST
help
Choose Y here if you have this FM radio chip.

--
1.9.1

2015-05-05 16:42:49

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 11/27] mfd: 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]>
Cc: Samuel Ortiz <[email protected]>
Cc: Lee Jones <[email protected]>
---
drivers/mfd/Kconfig | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 7eaa5488892524ba..3ee86248aa7cad8b 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -52,7 +52,8 @@ config PMIC_ADP5520
config MFD_AAT2870_CORE
bool "AnalogicTech AAT2870"
select MFD_CORE
- depends on I2C=y && GPIOLIB
+ depends on I2C=y
+ depends on GPIOLIB || COMPILE_TEST
help
If you say yes here you get support for the AAT2870.
This driver provides common support for accessing the device,
@@ -1115,7 +1116,8 @@ config MFD_TPS6586X

config MFD_TPS65910
bool "TI TPS65910 Power Management chip"
- depends on I2C=y && GPIOLIB
+ depends on I2C=y
+ depends on GPIOLIB || COMPILE_TEST
select MFD_CORE
select REGMAP_I2C
select REGMAP_IRQ
--
1.9.1

2015-05-05 16:41:05

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 12/27] misc: ti-st: 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]>
Cc: Arnd Bergmann <[email protected]>
---
drivers/misc/ti-st/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/ti-st/Kconfig b/drivers/misc/ti-st/Kconfig
index f34dcc51473052cf..5bb92698bc80f450 100644
--- a/drivers/misc/ti-st/Kconfig
+++ b/drivers/misc/ti-st/Kconfig
@@ -5,7 +5,8 @@
menu "Texas Instruments shared transport line discipline"
config TI_ST
tristate "Shared transport core driver"
- depends on NET && GPIOLIB && TTY
+ depends on NET && TTY
+ depends on GPIOLIB || COMPILE_TEST
select FW_LOADER
help
This enables the shared transport core driver for TI
--
1.9.1

2015-05-05 16:33:59

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 13/27] mtd: 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]>
Cc: David Woodhouse <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: [email protected]
---
drivers/mtd/maps/Kconfig | 2 +-
drivers/mtd/nand/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index e715ae90632f82e6..7c95a656f9e47933 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -326,7 +326,7 @@ config MTD_BFIN_ASYNC

config MTD_GPIO_ADDR
tristate "GPIO-assisted Flash Chip Support"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
depends on MTD_COMPLEX_MAPPINGS
help
Map driver which allows flashes to be partially physically addressed
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 5897d8d8fa5a962d..f318e1b5bf973267 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -76,7 +76,7 @@ config MTD_NAND_DENALI_SCRATCH_REG_ADDR

config MTD_NAND_GPIO
tristate "GPIO assisted NAND Flash driver"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
This enables a NAND flash driver where control signals are
connected to GPIO pins, and commands and data are communicated
--
1.9.1

2015-05-05 16:32:59

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 14/27] net: phy: 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]>
Cc: Florian Fainelli <[email protected]>
Cc: [email protected]
---
drivers/net/phy/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 8fadaa14b9f0fbd9..f57ccd880ffe30c5 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -138,7 +138,8 @@ config MDIO_BITBANG

config MDIO_GPIO
tristate "Support for GPIO lib-based bitbanged MDIO buses"
- depends on MDIO_BITBANG && GPIOLIB
+ depends on MDIO_BITBANG
+ depends on GPIOLIB || COMPILE_TEST
---help---
Supports GPIO lib-based MDIO busses.

--
1.9.1

2015-05-05 16:35:18

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 15/27] power: 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]>
Cc: Sebastian Reichel <[email protected]>
Cc: Dmitry Eremin-Solenikov <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: [email protected]
---
drivers/power/Kconfig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 4091fb092d067aca..19bb57c2623882df 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -326,7 +326,7 @@ config CHARGER_LP8788

config CHARGER_GPIO
tristate "GPIO charger"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y to include support for chargers which report their online status
through a GPIO pin.
@@ -384,13 +384,15 @@ config CHARGER_BQ2415X

config CHARGER_BQ24190
tristate "TI BQ24190 battery charger driver"
- depends on I2C && GPIOLIB
+ depends on I2C
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y to enable support for the TI BQ24190 battery charger.

config CHARGER_BQ24735
tristate "TI BQ24735 battery charger support"
- depends on I2C && GPIOLIB
+ depends on I2C
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y to enable support for the TI BQ24735 battery charger.

--
1.9.1

2015-05-05 16:36:08

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 16/27] regulator: 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]>
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
---
drivers/regulator/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index a6f116aa523532b5..91aa2302b74afa4d 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -233,7 +233,7 @@ config REGULATOR_FAN53555

config REGULATOR_GPIO
tristate "GPIO regulator support"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
This driver provides support for regulators that can be
controlled via gpios.
--
1.9.1

2015-05-05 16:41:03

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 17/27] spi: 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]>
Cc: Mark Brown <[email protected]>
Cc: [email protected]
---
drivers/spi/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index a509f91e31c071d6..e8e84b63bc151852 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -221,7 +221,7 @@ config SPI_FALCON

config SPI_GPIO
tristate "GPIO-based bitbanging SPI Master"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select SPI_BITBANG
help
This simple GPIO bitbanging SPI master uses the arch-neutral GPIO
@@ -333,7 +333,7 @@ config SPI_OCSIMPLE

config SPI_OC_TINY
tristate "OpenCores tiny SPI"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select SPI_BITBANG
help
This is the driver for OpenCores tiny SPI master controller.
--
1.9.1

2015-05-05 16:38:18

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 18/27] staging: android: 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]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
drivers/staging/android/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
index 8feb9048e62ffa45..19fcc3fc15d4468b 100644
--- a/drivers/staging/android/Kconfig
+++ b/drivers/staging/android/Kconfig
@@ -20,7 +20,8 @@ config ANDROID_TIMED_OUTPUT

config ANDROID_TIMED_GPIO
tristate "Android timed gpio driver"
- depends on GPIOLIB && ANDROID_TIMED_OUTPUT
+ depends on GPIOLIB || COMPILE_TEST
+ depends on ANDROID_TIMED_OUTPUT
default n

config ANDROID_LOW_MEMORY_KILLER
--
1.9.1

2015-05-05 16:40:53

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 19/27] staging: fbtft: 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]>
Cc: Thomas Petazzoni <[email protected]>
Cc: Noralf Trønnes <[email protected]>
Cc: [email protected]
---
drivers/staging/fbtft/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig
index 6cf0c58f538bc7a3..992b0302a3a47091 100644
--- a/drivers/staging/fbtft/Kconfig
+++ b/drivers/staging/fbtft/Kconfig
@@ -1,6 +1,7 @@
menuconfig FB_TFT
tristate "Support for small TFT LCD display modules"
- depends on FB && SPI && GPIOLIB
+ depends on FB && SPI
+ depends on GPIOLIB || COMPILE_TEST
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
select FB_SYS_IMAGEBLIT
--
1.9.1

2015-05-05 16:40:55

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 20/27] Staging: 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 <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/staging/iio/accel/Kconfig | 2 +-
drivers/staging/iio/adc/Kconfig | 6 +++---
drivers/staging/iio/addac/Kconfig | 2 +-
drivers/staging/iio/resolver/Kconfig | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/iio/accel/Kconfig b/drivers/staging/iio/accel/Kconfig
index 07b7ffa00ab53c86..fa67da9408b6b3b7 100644
--- a/drivers/staging/iio/accel/Kconfig
+++ b/drivers/staging/iio/accel/Kconfig
@@ -79,7 +79,7 @@ config LIS3L02DQ
depends on SPI
select IIO_TRIGGER if IIO_BUFFER
depends on !IIO_BUFFER || IIO_KFIFO_BUF
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here to build SPI support for the ST microelectronics
accelerometer. The driver supplies direct access via sysfs files
diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
index d0016ce6e65840e6..94ae4232ee773497 100644
--- a/drivers/staging/iio/adc/Kconfig
+++ b/drivers/staging/iio/adc/Kconfig
@@ -5,7 +5,7 @@ menu "Analog to digital converters"

config AD7606
tristate "Analog Devices AD7606 ADC driver"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help
@@ -39,7 +39,7 @@ config AD7606_IFACE_SPI
config AD7780
tristate "Analog Devices AD7780 and similar ADCs driver"
depends on SPI
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select AD_SIGMA_DELTA
help
Say yes here to build support for Analog Devices AD7170, AD7171,
@@ -52,7 +52,7 @@ config AD7780
config AD7816
tristate "Analog Devices AD7816/7/8 temperature sensor and ADC driver"
depends on SPI
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say yes here to build support for Analog Devices AD7816/7/8
temperature sensors and ADC.
diff --git a/drivers/staging/iio/addac/Kconfig b/drivers/staging/iio/addac/Kconfig
index 0ed7e13e2283edb0..ba18b8432d9cce6e 100644
--- a/drivers/staging/iio/addac/Kconfig
+++ b/drivers/staging/iio/addac/Kconfig
@@ -5,7 +5,7 @@ menu "Analog digital bi-direction converters"

config ADT7316
tristate "Analog Devices ADT7316/7/8 ADT7516/7/9 temperature sensor, ADC and DAC driver"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say yes here to build support for Analog Devices ADT7316, ADT7317, ADT7318
and ADT7516, ADT7517, ADT7519 temperature sensors, ADC and DAC.
diff --git a/drivers/staging/iio/resolver/Kconfig b/drivers/staging/iio/resolver/Kconfig
index c7a742ec122727b0..1c7e2860d6b75d56 100644
--- a/drivers/staging/iio/resolver/Kconfig
+++ b/drivers/staging/iio/resolver/Kconfig
@@ -16,7 +16,7 @@ config AD2S90
config AD2S1200
tristate "Analog Devices ad2s1200/ad2s1205 driver"
depends on SPI
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say yes here to build support for Analog Devices spi resolver
to digital converters, ad2s1200 and ad2s1205, provides direct access
@@ -28,7 +28,7 @@ config AD2S1200
config AD2S1210
tristate "Analog Devices ad2s1210 driver"
depends on SPI
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say yes here to build support for Analog Devices spi resolver
to digital converters, ad2s1210, provides direct access via sysfs.
--
1.9.1

2015-05-05 16:39:25

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 21/27] serial: 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]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
This depends on "serial: SERIAL_IFX6X60 should depend on HAS_DMA".
Without that patch, just drop " && HAS_DMA".
---
drivers/tty/serial/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index daee183386368149..bf6a73864ee80f1f 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1349,7 +1349,8 @@ config SERIAL_ALTERA_UART_CONSOLE

config SERIAL_IFX6X60
tristate "SPI protocol driver for Infineon 6x60 modem (EXPERIMENTAL)"
- depends on GPIOLIB && SPI && HAS_DMA
+ depends on GPIOLIB || COMPILE_TEST
+ depends on SPI && HAS_DMA
help
Support for the IFX6x60 modem devices on Intel MID platforms.

--
1.9.1

2015-05-05 16:38:22

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 22/27] usb: phy: 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]>
Cc: Felipe Balbi <[email protected]>
Cc: [email protected]
---
drivers/usb/phy/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 2175678e674ebf44..cb0da41db542113b 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -91,7 +91,7 @@ config TWL6030_USB

config USB_GPIO_VBUS
tristate "GPIO based peripheral-only VBUS sensing 'transceiver'"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select USB_PHY
help
Provides simple GPIO VBUS sensing for controllers with an
--
1.9.1

2015-05-05 16:36:04

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 23/27] backlight: 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]>
Cc: Jingoo Han <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Jean-Christophe Plagniol-Villard <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: [email protected]
---
drivers/video/backlight/Kconfig | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 2d9923a60076e380..0505b796d743250e 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -36,14 +36,16 @@ config LCD_CORGI

config LCD_L4F00242T03
tristate "Epson L4F00242T03 LCD"
- depends on SPI_MASTER && GPIOLIB
+ depends on SPI_MASTER
+ depends on GPIOLIB || COMPILE_TEST
help
SPI driver for Epson L4F00242T03. This provides basic support
for init and powering the LCD up/down through a sysfs interface.

config LCD_LMS283GF05
tristate "Samsung LMS283GF05 LCD"
- depends on SPI_MASTER && GPIOLIB
+ depends on SPI_MASTER
+ depends on GPIOLIB || COMPILE_TEST
help
SPI driver for Samsung LMS283GF05. This provides basic support
for powering the LCD up/down through a sysfs interface.
@@ -434,7 +436,7 @@ config BACKLIGHT_AS3711

config BACKLIGHT_GPIO
tristate "Generic GPIO based Backlight Driver"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
If you have a LCD backlight adjustable by GPIO, say Y to enable
this driver.
--
1.9.1

2015-05-05 16:39:19

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 24/27] fbdev: 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]>
Cc: Jean-Christophe Plagniol-Villard <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: [email protected]
---
drivers/video/fbdev/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 1094623030879dcd..bc94c782370f2156 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -2471,7 +2471,7 @@ config FB_SSD1307
tristate "Solomon SSD1307 framebuffer support"
depends on FB && I2C
depends on OF
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
select FB_SYS_FOPS
select FB_SYS_FILLRECT
select FB_SYS_COPYAREA
--
1.9.1

2015-05-05 16:39:21

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 25/27] w1: 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]>
Cc: Evgeniy Polyakov <[email protected]>
---
drivers/w1/masters/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
index 1708b2300c7a9ca2..00827d2897b534bc 100644
--- a/drivers/w1/masters/Kconfig
+++ b/drivers/w1/masters/Kconfig
@@ -49,7 +49,7 @@ config W1_MASTER_DS1WM

config W1_MASTER_GPIO
tristate "GPIO 1-wire busmaster"
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Say Y here if you want to communicate with your 1-wire devices using
GPIO pins. This driver uses the GPIO API to control the wire.
--
1.9.1

2015-05-05 16:39:23

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 26/27] watchdog: 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]>
Cc: Wim Van Sebroeck <[email protected]>
Cc: [email protected]
---
drivers/watchdog/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index e5e7c5505de7dc8f..d0f03ee22425011f 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1343,7 +1343,7 @@ config BOOKE_WDT_DEFAULT_TIMEOUT
config MEN_A21_WDT
tristate "MEN A21 VME CPU Carrier Board Watchdog Timer"
select WATCHDOG_CORE
- depends on GPIOLIB
+ depends on GPIOLIB || COMPILE_TEST
help
Watchdog driver for MEN A21 VMEbus CPU Carrier Boards.

--
1.9.1

2015-05-05 16:36:13

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH 27/27] net: rfkill: 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]>
Cc: Johannes Berg <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: [email protected]
---
net/rfkill/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/rfkill/Kconfig b/net/rfkill/Kconfig
index 4c10e7e6c9f6ae53..598d374f6a35f714 100644
--- a/net/rfkill/Kconfig
+++ b/net/rfkill/Kconfig
@@ -36,7 +36,8 @@ config RFKILL_REGULATOR

config RFKILL_GPIO
tristate "GPIO RFKILL driver"
- depends on RFKILL && GPIOLIB
+ depends on RFKILL
+ depends on GPIOLIB || COMPILE_TEST
default n
help
If you say yes here you get support of a generic gpio RFKILL
--
1.9.1

2015-05-05 19:31:26

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 05/27] hwmon: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, May 05, 2015 at 06:32:21PM +0200, Geert Uytterhoeven wrote:
> 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]>
> Cc: Jean Delvare <[email protected]>
> Cc: Guenter Roeck <[email protected]>
> Cc: [email protected]

Applied to -next.

Thanks,
Guenter

2015-05-05 19:31:53

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH 26/27] watchdog: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, May 05, 2015 at 06:32:42PM +0200, Geert Uytterhoeven wrote:
> 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]>
> Cc: Wim Van Sebroeck <[email protected]>
> Cc: [email protected]

Reviewed-by: Guenter Roeck <[email protected]>

2015-05-05 21:03:35

by Peter Huewe

[permalink] [raw]
Subject: Re: [PATCH 03/27] tpm: Allow compile test of GPIO consumers if !GPIOLIB

Am Dienstag, 5. Mai 2015, 18:32:19 schrieb Geert Uytterhoeven:
> 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]>
> Cc: Peter Huewe <[email protected]>
> Cc: Marcel Selhorst <[email protected]>
> Cc: [email protected]
Acked-by: Peter Huewe <[email protected]>

2015-05-06 05:38:19

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH 04/27] extcon: Allow compile test of GPIO consumers if !GPIOLIB

Hi Geert,

On 05/06/2015 01:32 AM, Geert Uytterhoeven wrote:
> 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.
>
> If GPIOLIB=n and asm-generic/gpio.h is not used:
>
> drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_detect_cable’:
> drivers/extcon/extcon-usb-gpio.c:63: error: implicit declaration of function ‘gpiod_get_value_cansleep’
> drivers/extcon/extcon-usb-gpio.c: In function ‘usb_extcon_probe’:
> drivers/extcon/extcon-usb-gpio.c:116: error: implicit declaration of function ‘devm_gpiod_get’
> drivers/extcon/extcon-usb-gpio.c:116: warning: assignment makes pointer from integer without a cast
> drivers/extcon/extcon-usb-gpio.c:122: error: implicit declaration of function ‘gpiod_set_debounce’
> drivers/extcon/extcon-usb-gpio.c:129: error: implicit declaration of function ‘gpiod_to_irq’
>
> Add the missing #include <linux/gpio/consumer.h> to fix this.
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> Cc: MyungJoo Ham <[email protected]>
> Cc: Chanwoo Choi <[email protected]>
> ---
> drivers/extcon/Kconfig | 4 ++--
> drivers/extcon/extcon-usb-gpio.c | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)

Applied it on -next branch.

Thanks,
Chanwoo Choi

2015-05-06 07:59:00

by Jacek Anaszewski

[permalink] [raw]
Subject: Re: [PATCH 09/27] leds: Allow compile test of GPIO consumers if !GPIOLIB

Hi Geert,

Why don't you apply the same modification to all LED Kconfig
entries with GPIOLIB dependency?

On 05/05/2015 06:32 PM, Geert Uytterhoeven wrote:
> 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]>
> Cc: Bryan Wu <[email protected]>
> Cc: Richard Purdie <[email protected]>
> Cc: [email protected]
> ---
> drivers/leds/Kconfig | 2 +-
> drivers/leds/trigger/Kconfig | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 966b9605f5f0660c..8161cddc3f8d597a 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -395,7 +395,7 @@ config LEDS_INTEL_SS4200
> config LEDS_LT3593
> tristate "LED driver for LT3593 controllers"
> depends on LEDS_CLASS
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> This option enables support for LEDs driven by a Linear Technology
> LT3593 controller. This controller uses a special one-wire pulse
> diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
> index 49794b47b51c498d..5bda6a9b56bbd90b 100644
> --- a/drivers/leds/trigger/Kconfig
> +++ b/drivers/leds/trigger/Kconfig
> @@ -72,7 +72,7 @@ config LEDS_TRIGGER_CPU
> config LEDS_TRIGGER_GPIO
> tristate "LED GPIO Trigger"
> depends on LEDS_TRIGGERS
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> This allows LEDs to be controlled by gpio events. It's good
> when using gpios as switches and triggering the needed LEDs
>


--
Best Regards,
Jacek Anaszewski

2015-05-06 08:31:51

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 09/27] leds: Allow compile test of GPIO consumers if !GPIOLIB

Hi Jacek,

On Wed, May 6, 2015 at 9:58 AM, Jacek Anaszewski
<[email protected]> wrote:
> Why don't you apply the same modification to all LED Kconfig
> entries with GPIOLIB dependency?

LEDS_PCA9532_GPIO is a GPIO provider, not a consumer. There are no
dummies for GPIO providers.
LEDS_GPIO doesn't compile if !GPIOLIB, but I missed that it's just due to
a missing dummy for devm_get_gpiod_from_child() and a missing include.
Will fix.

Thanks!

> On 05/05/2015 06:32 PM, Geert Uytterhoeven wrote:
>> 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.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2015-05-06 15:20:53

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 16/27] regulator: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, May 05, 2015 at 06:32:32PM +0200, Geert Uytterhoeven wrote:
> 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.

Applied, thanks.


Attachments:
(No filename) (306.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2015-05-06 15:21:35

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 17/27] spi: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, May 05, 2015 at 06:32:33PM +0200, Geert Uytterhoeven wrote:
> 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.

Applied, thanks.


Attachments:
(No filename) (306.00 B)
signature.asc (473.00 B)
Digital signature
Download all attachments

2015-05-07 07:37:36

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 23/27] backlight: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, 05 May 2015, Geert Uytterhoeven wrote:

> 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]>
> Cc: Jingoo Han <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: Jean-Christophe Plagniol-Villard <[email protected]>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: [email protected]
> ---
> drivers/video/backlight/Kconfig | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)

Looks good. Applied, thanks.

> diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
> index 2d9923a60076e380..0505b796d743250e 100644
> --- a/drivers/video/backlight/Kconfig
> +++ b/drivers/video/backlight/Kconfig
> @@ -36,14 +36,16 @@ config LCD_CORGI
>
> config LCD_L4F00242T03
> tristate "Epson L4F00242T03 LCD"
> - depends on SPI_MASTER && GPIOLIB
> + depends on SPI_MASTER
> + depends on GPIOLIB || COMPILE_TEST
> help
> SPI driver for Epson L4F00242T03. This provides basic support
> for init and powering the LCD up/down through a sysfs interface.
>
> config LCD_LMS283GF05
> tristate "Samsung LMS283GF05 LCD"
> - depends on SPI_MASTER && GPIOLIB
> + depends on SPI_MASTER
> + depends on GPIOLIB || COMPILE_TEST
> help
> SPI driver for Samsung LMS283GF05. This provides basic support
> for powering the LCD up/down through a sysfs interface.
> @@ -434,7 +436,7 @@ config BACKLIGHT_AS3711
>
> config BACKLIGHT_GPIO
> tristate "Generic GPIO based Backlight Driver"
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> If you have a LCD backlight adjustable by GPIO, say Y to enable
> this driver.

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2015-05-07 07:37:46

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 11/27] mfd: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, 05 May 2015, Geert Uytterhoeven wrote:

> 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]>
> Cc: Samuel Ortiz <[email protected]>
> Cc: Lee Jones <[email protected]>
> ---
> drivers/mfd/Kconfig | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 7eaa5488892524ba..3ee86248aa7cad8b 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -52,7 +52,8 @@ config PMIC_ADP5520
> config MFD_AAT2870_CORE
> bool "AnalogicTech AAT2870"
> select MFD_CORE
> - depends on I2C=y && GPIOLIB
> + depends on I2C=y
> + depends on GPIOLIB || COMPILE_TEST
> help
> If you say yes here you get support for the AAT2870.
> This driver provides common support for accessing the device,
> @@ -1115,7 +1116,8 @@ config MFD_TPS6586X
>
> config MFD_TPS65910
> bool "TI TPS65910 Power Management chip"
> - depends on I2C=y && GPIOLIB
> + depends on I2C=y
> + depends on GPIOLIB || COMPILE_TEST
> select MFD_CORE
> select REGMAP_I2C
> select REGMAP_IRQ

--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

2015-05-07 23:34:53

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 07/27] iio: Allow compile test of GPIO consumers if !GPIOLIB

On 05/05/15 17:32, Geert Uytterhoeven wrote:
> 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]>
> Cc: Jonathan Cameron <[email protected]>
> Cc: [email protected]
Not entirely convinced that the extra build coverage from this is going
to be that extensive, but it does no harm, so why not?

Applied to the togreg branch of iio.git, will sometime be pushed out
as testing, for the autobuilders to play with it, as I am travelling.

Jonathan
> ---
> drivers/iio/humidity/Kconfig | 2 +-
> drivers/iio/magnetometer/Kconfig | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/humidity/Kconfig b/drivers/iio/humidity/Kconfig
> index 4813b793b9f7f944..688c0d1cb47dea36 100644
> --- a/drivers/iio/humidity/Kconfig
> +++ b/drivers/iio/humidity/Kconfig
> @@ -5,7 +5,7 @@ menu "Humidity sensors"
>
> config DHT11
> tristate "DHT11 (and compatible sensors) driver"
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> This driver supports reading data via a single interrupt
> generating GPIO line. Currently tested are DHT11 and DHT22.
> diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig
> index a5d6de72c523bab2..00297bbb7e4b4a0b 100644
> --- a/drivers/iio/magnetometer/Kconfig
> +++ b/drivers/iio/magnetometer/Kconfig
> @@ -8,7 +8,7 @@ menu "Magnetometer sensors"
> config AK8975
> tristate "Asahi Kasei AK 3-Axis Magnetometer"
> depends on I2C
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> Say yes here to build support for Asahi Kasei AK8975, AK8963,
> AK09911 or AK09912 3-Axis Magnetometer.
> @@ -19,7 +19,7 @@ config AK8975
> config AK09911
> tristate "Asahi Kasei AK09911 3-axis Compass"
> depends on I2C
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> select AK8975
> help
> Deprecated: AK09911 is now supported by AK8975 driver.
>

2015-05-07 23:34:50

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 20/27] Staging: iio: Allow compile test of GPIO consumers if !GPIOLIB

On 05/05/15 17:32, Geert Uytterhoeven wrote:
> 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]>
> Cc: Jonathan Cameron <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
Applied to the togreg branch of iio.git - to be pushed out as testing
'soonish'.
> ---
> drivers/staging/iio/accel/Kconfig | 2 +-
> drivers/staging/iio/adc/Kconfig | 6 +++---
> drivers/staging/iio/addac/Kconfig | 2 +-
> drivers/staging/iio/resolver/Kconfig | 4 ++--
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/Kconfig b/drivers/staging/iio/accel/Kconfig
> index 07b7ffa00ab53c86..fa67da9408b6b3b7 100644
> --- a/drivers/staging/iio/accel/Kconfig
> +++ b/drivers/staging/iio/accel/Kconfig
> @@ -79,7 +79,7 @@ config LIS3L02DQ
> depends on SPI
> select IIO_TRIGGER if IIO_BUFFER
> depends on !IIO_BUFFER || IIO_KFIFO_BUF
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> Say Y here to build SPI support for the ST microelectronics
> accelerometer. The driver supplies direct access via sysfs files
> diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
> index d0016ce6e65840e6..94ae4232ee773497 100644
> --- a/drivers/staging/iio/adc/Kconfig
> +++ b/drivers/staging/iio/adc/Kconfig
> @@ -5,7 +5,7 @@ menu "Analog to digital converters"
>
> config AD7606
> tristate "Analog Devices AD7606 ADC driver"
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> select IIO_BUFFER
> select IIO_TRIGGERED_BUFFER
> help
> @@ -39,7 +39,7 @@ config AD7606_IFACE_SPI
> config AD7780
> tristate "Analog Devices AD7780 and similar ADCs driver"
> depends on SPI
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> select AD_SIGMA_DELTA
> help
> Say yes here to build support for Analog Devices AD7170, AD7171,
> @@ -52,7 +52,7 @@ config AD7780
> config AD7816
> tristate "Analog Devices AD7816/7/8 temperature sensor and ADC driver"
> depends on SPI
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> Say yes here to build support for Analog Devices AD7816/7/8
> temperature sensors and ADC.
> diff --git a/drivers/staging/iio/addac/Kconfig b/drivers/staging/iio/addac/Kconfig
> index 0ed7e13e2283edb0..ba18b8432d9cce6e 100644
> --- a/drivers/staging/iio/addac/Kconfig
> +++ b/drivers/staging/iio/addac/Kconfig
> @@ -5,7 +5,7 @@ menu "Analog digital bi-direction converters"
>
> config ADT7316
> tristate "Analog Devices ADT7316/7/8 ADT7516/7/9 temperature sensor, ADC and DAC driver"
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> Say yes here to build support for Analog Devices ADT7316, ADT7317, ADT7318
> and ADT7516, ADT7517, ADT7519 temperature sensors, ADC and DAC.
> diff --git a/drivers/staging/iio/resolver/Kconfig b/drivers/staging/iio/resolver/Kconfig
> index c7a742ec122727b0..1c7e2860d6b75d56 100644
> --- a/drivers/staging/iio/resolver/Kconfig
> +++ b/drivers/staging/iio/resolver/Kconfig
> @@ -16,7 +16,7 @@ config AD2S90
> config AD2S1200
> tristate "Analog Devices ad2s1200/ad2s1205 driver"
> depends on SPI
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> Say yes here to build support for Analog Devices spi resolver
> to digital converters, ad2s1200 and ad2s1205, provides direct access
> @@ -28,7 +28,7 @@ config AD2S1200
> config AD2S1210
> tristate "Analog Devices ad2s1210 driver"
> depends on SPI
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> Say yes here to build support for Analog Devices spi resolver
> to digital converters, ad2s1210, provides direct access via sysfs.
>

2015-05-07 12:14:30

by Jacek Anaszewski

[permalink] [raw]
Subject: Re: [PATCH 09/27] leds: Allow compile test of GPIO consumers if !GPIOLIB

On 05/05/2015 06:32 PM, Geert Uytterhoeven wrote:
> 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]>
> Cc: Bryan Wu <[email protected]>
> Cc: Richard Purdie <[email protected]>
> Cc: [email protected]
> ---
> drivers/leds/Kconfig | 2 +-
> drivers/leds/trigger/Kconfig | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 966b9605f5f0660c..8161cddc3f8d597a 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -395,7 +395,7 @@ config LEDS_INTEL_SS4200
> config LEDS_LT3593
> tristate "LED driver for LT3593 controllers"
> depends on LEDS_CLASS
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> This option enables support for LEDs driven by a Linear Technology
> LT3593 controller. This controller uses a special one-wire pulse
> diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
> index 49794b47b51c498d..5bda6a9b56bbd90b 100644
> --- a/drivers/leds/trigger/Kconfig
> +++ b/drivers/leds/trigger/Kconfig
> @@ -72,7 +72,7 @@ config LEDS_TRIGGER_CPU
> config LEDS_TRIGGER_GPIO
> tristate "LED GPIO Trigger"
> depends on LEDS_TRIGGERS
> - depends on GPIOLIB
> + depends on GPIOLIB || COMPILE_TEST
> help
> This allows LEDs to be controlled by gpio events. It's good
> when using gpios as switches and triggering the needed LEDs
>

Acked-by: Jacek Anaszewski <[email protected]>

--
Best Regards,
Jacek Anaszewski

2015-05-12 10:20:22

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 00/27] gpio: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, May 5, 2015 at 4:33 PM, Geert Uytterhoeven <[email protected]> wrote:

> Hi all,
>
> 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.
>
> This patch series relaxes the dependencies on GPIOLIB if COMPILE_TEST is
> enabled, where appropriate:
> - Patches 1-2 add missing dependencies on GPIOLIB || COMPILE_TEST,
> - Patches 3-27 relax existing dependencies on GPIOLIB.
> In some cases (patches 1,2, and 4), this required adding a missing
> include (<linux/gpio/consumer.h>), as this may not be included if
> asm-generic/gpio.h is not used.
>
> There are a few more drivers that depend on GPIOLIB and that may be
> eligible for COMPILE_TEST. These I didn't handle yet, as I couldn't
> enable them with m68k/all{mod,yes}config due to other dependencies.
>
> This series is against v4.1-rc2 and next-20150505 with the exception of
> patch 21, which has an additional dependency (mentioned in the patch
> itself, incl. resolution instructions if the dependency isn't
> satisified).

FWIW: the series:
Acked-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2015-05-12 13:23:24

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 06/27] i2c: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, May 05, 2015 at 06:32:22PM +0200, Geert Uytterhoeven wrote:
> 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]>
> Cc: Wolfram Sang <[email protected]>
> Cc: [email protected]

Applied to for-next, thanks!


Attachments:
(No filename) (538.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2015-05-20 22:52:01

by Brian Norris

[permalink] [raw]
Subject: Re: [PATCH 13/27] mtd: Allow compile test of GPIO consumers if !GPIOLIB

On Tue, May 05, 2015 at 06:32:29PM +0200, Geert Uytterhoeven wrote:
> 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]>
> Cc: David Woodhouse <[email protected]>
> Cc: Brian Norris <[email protected]>
> Cc: [email protected]

Pushed to l2-mtd.git.

Brian

2015-06-05 11:21:18

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 01/27] drm/bridge: ptn3460: #include <linux/gpio/consumer.h>, depend on GPIOLIB

On Tue, May 05, 2015 at 06:32:17PM +0200, Geert Uytterhoeven wrote:
> If GPIOLIB=n and asm-generic/gpio.h is not used:
>
> drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’:
> drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’
> drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’:
> drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’
> drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast
> drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’
> drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast
>
> Add the missing #include <linux/gpio/consumer.h> to fix this.
>
> As the resulting driver won't work with GPIOLIB=n anyway, make
> DRM_PTN3460 depend on GPIOLIB || COMPILE_TEST.
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: [email protected]
> ---
> drivers/gpu/drm/bridge/Kconfig | 4 ++--
> drivers/gpu/drm/bridge/ptn3460.c | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks. Note that I dropped the part about adding the GPIOLIB
dependency because that had been attempted previously to fix this, but
it causes recursive dependencies on PowerPC (ppc64_defconfig). I don't
know of a way to untangle those (I tried and failed miserably), so I
think adding the include is really as good as it'll get.

Thierry


Attachments:
(No filename) (1.59 kB)
(No filename) (819.00 B)
Download all attachments

2015-06-05 11:22:10

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 02/27] drm/bridge: ps8622: #include <linux/gpio/consumer.h>, depend on GPIOLIB

On Tue, May 05, 2015 at 06:32:18PM +0200, Geert Uytterhoeven wrote:
> If GPIOLIB=n and asm-generic/gpio.h is not used:
>
> drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_pre_enable’:
> drivers/gpu/drm/bridge/ps8622.c:368: error: implicit declaration of function ‘gpiod_set_value’
> drivers/gpu/drm/bridge/ps8622.c: In function ‘ps8622_probe’:
> drivers/gpu/drm/bridge/ps8622.c:584: error: implicit declaration of function ‘devm_gpiod_get’
> drivers/gpu/drm/bridge/ps8622.c:584: warning: assignment makes pointer from integer without a cast
> drivers/gpu/drm/bridge/ps8622.c:590: error: implicit declaration of function ‘gpiod_direction_output’
> drivers/gpu/drm/bridge/ps8622.c:596: warning: assignment makes pointer from integer without a cast
>
> Add the missing #include <linux/gpio/consumer.h> to fix this.
>
> As the resulting driver won't work with GPIOLIB=n anyway, make
> DRM_PS8622 depend on GPIOLIB || COMPILE_TEST.
>
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> Cc: David Airlie <[email protected]>
> Cc: [email protected]
> ---
> drivers/gpu/drm/bridge/Kconfig | 4 ++--
> drivers/gpu/drm/bridge/ps8622.c | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks. With the same modifications as patch 1/27. I wonder if
there's any reason to keep the linux/gpio.h include, since consumer.h
seems to expose all the API that the drivers need.

Thierry


Attachments:
(No filename) (1.43 kB)
(No filename) (819.00 B)
Download all attachments

2015-06-05 11:42:16

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 01/27] drm/bridge: ptn3460: #include <linux/gpio/consumer.h>, depend on GPIOLIB

Hi Thierry,

On Fri, Jun 5, 2015 at 1:20 PM, Thierry Reding <[email protected]> wrote:
> On Tue, May 05, 2015 at 06:32:17PM +0200, Geert Uytterhoeven wrote:
>> If GPIOLIB=n and asm-generic/gpio.h is not used:
>>
>> drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_pre_enable’:
>> drivers/gpu/drm/bridge/ptn3460.c:135: error: implicit declaration of function ‘gpiod_set_value’
>> drivers/gpu/drm/bridge/ptn3460.c: In function ‘ptn3460_probe’:
>> drivers/gpu/drm/bridge/ptn3460.c:333: error: implicit declaration of function ‘devm_gpiod_get’
>> drivers/gpu/drm/bridge/ptn3460.c:333: warning: assignment makes pointer from integer without a cast
>> drivers/gpu/drm/bridge/ptn3460.c:340: error: implicit declaration of function ‘gpiod_direction_output’
>> drivers/gpu/drm/bridge/ptn3460.c:346: warning: assignment makes pointer from integer without a cast
>>
>> Add the missing #include <linux/gpio/consumer.h> to fix this.
>>
>> As the resulting driver won't work with GPIOLIB=n anyway, make
>> DRM_PTN3460 depend on GPIOLIB || COMPILE_TEST.
>>
>> Signed-off-by: Geert Uytterhoeven <[email protected]>
>> Cc: David Airlie <[email protected]>
>> Cc: [email protected]
>> ---
>> drivers/gpu/drm/bridge/Kconfig | 4 ++--
>> drivers/gpu/drm/bridge/ptn3460.c | 1 +
>> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> Applied, thanks. Note that I dropped the part about adding the GPIOLIB
> dependency because that had been attempted previously to fix this, but
> it causes recursive dependencies on PowerPC (ppc64_defconfig). I don't
> know of a way to untangle those (I tried and failed miserably), so I
> think adding the include is really as good as it'll get.

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds