Skip to contentSkip to conversation

w1: Allow compile test of GPIO consumers if !GPIOLIB

PATCH In review Geert Uytterhoeven 2 participants 4 messages Jun 21, 2018 – Jun 26, 2018 W1 dallas's 1-wire bus

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
v3:
- Add Acked-by,

v2:
- Add Acked-by.

---
 drivers/w1/masters/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/w1/masters/Kconfig +1 -1
index 1708b2300c7a9ca2..00827d2897b534bc 100644
@@ -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.
Signature · 1 line
2.17.1
#1 lore raw
Quoted 7 lines · 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.

Quoted 6 lines

---
v3:
- Add Acked-by,

I think my last change to w1 I just put into the GPIO tree.

Should I simply carry this patch in the GPIO tree?

Yours,
Linus Walleij

#2 lore raw

Hi Linus,

Quoted 15 lines · Linus Walleij
Quoted 7 lines · 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.

Quoted 6 lines

---
v3:
- Add Acked-by,

Quoted 3 lines

I think my last change to w1 I just put into the GPIO tree.

Should I simply carry this patch in the GPIO tree?

Fine for me ;-)

Thanks!

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
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
#3 lore raw
In reply to Geert Uytterhoeven
Quoted 4 lines · 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.

Quoted 8 lines

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

---
v3:

Patch applied to the GPIO tree.

Yours,
Linus Walleij