Skip to contentSkip to conversation

gpio: ingenic: add CONFIG_OF dependency

PATCH In review Arnd Bergmann 3 participants 5 messages May 29, 2017 – May 30, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gpio: ingenic: add CONFIG_OF dependency

The driver cannot access the of_node field when CONFIG_OF is disabled:

drivers/gpio/gpio-ingenic.c: In function 'ingenic_gpio_probe':
drivers/gpio/gpio-ingenic.c:324:10: error: 'struct gpio_chip' has no member named 'of_node'

Fixes b0653ce39a0d ("gpio: Add gpio-ingenic driver")
---
 drivers/gpio/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/Kconfig +1 -0
index fe25de1b187c..436c38cdb297 100644
@@ -245,6 +245,7 @@ config GPIO_ICH
 config GPIO_INGENIC
 	tristate "Ingenic JZ47xx SoCs GPIO support"
 	depends on MACH_INGENIC || COMPILE_TEST
+	depends on OF
 	select GPIOLIB_IRQCHIP
 	help
 	  Say yes here to support the GPIO functionality present on the
Signature · 1 line
2.9.0
#1 lore raw

PATCH 2/2 pinctrl: ingenic: add CONFIG_OF dependency

The driver failts to build when CONFIG_OF is disabled:

drivers/pinctrl/pinctrl-ingenic.c:467:20: error: 'pinconf_generic_dt_node_to_map_all' undeclared here (not in a function); did you mean 'pinconf_generic_dump_config'? drivers/pinctrl/pinctrl-ingenic.c:468:17: error: 'pinconf_generic_dt_free_map' undeclared here (not in a function); did you mean 'pinconf_generic_params'?

Fixes b5c23aa46537 ("pinctrl: add a pinctrl driver for the Ingenic jz47xx SoCs")
---
 drivers/pinctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pinctrl/Kconfig +1 -0
index abc1cef7ad96..332bd303da36 100644
@@ -313,6 +313,7 @@ config PINCTRL_INGENIC
 	bool "Pinctrl driver for the Ingenic JZ47xx SoCs"
 	default y
 	depends on MACH_INGENIC || COMPILE_TEST
+	depends on OF
 	select GENERIC_PINCONF
 	select GENERIC_PINCTRL_GROUPS
 	select GENERIC_PINMUX_FUNCTIONS
Signature · 1 line
2.9.0
#2 lore raw
In reply to Arnd Bergmann
Quoted 7 lines · Arnd Bergmann

The driver cannot access the of_node field when CONFIG_OF is disabled:

drivers/gpio/gpio-ingenic.c: In function 'ingenic_gpio_probe':
drivers/gpio/gpio-ingenic.c:324:10: error: 'struct gpio_chip' has no member named 'of_node'

Fixes b0653ce39a0d ("gpio: Add gpio-ingenic driver")

I already sent a combined patch fixing these two deps earlier today, good that we are several at it :)

Yours,
Linus Walleij

#3 lore raw
Quoted 4 lines · Linus Walleij
Quoted 2 lines · Arnd Bergmann

The driver cannot access the of_node field when CONFIG_OF is disabled:

Quoted 8 lines
Quoted 5 lines

drivers/gpio/gpio-ingenic.c: In function 'ingenic_gpio_probe':
drivers/gpio/gpio-ingenic.c:324:10: error: 'struct gpio_chip' has no member named 'of_node'

Fixes b0653ce39a0d ("gpio: Add gpio-ingenic driver")

I already sent a combined patch fixing these two deps earlier today, good that we are several at it :)

Hmm... issues like these are actually the reasons why the of_node member of struct device does not depend on CONFIG_OF?

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

#4 lore raw
Quoted 8 lines · Geert Uytterhoeven
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Arnd Bergmann

The driver cannot access the of_node field when CONFIG_OF is disabled:

drivers/gpio/gpio-ingenic.c: In function 'ingenic_gpio_probe':
drivers/gpio/gpio-ingenic.c:324:10: error: 'struct gpio_chip' has no member named 'of_node'

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Fixes b0653ce39a0d ("gpio: Add gpio-ingenic driver")

I already sent a combined patch fixing these two deps earlier today, good that we are several at it :)

Hmm... issues like these are actually the reasons why the of_node member of struct device does not depend on CONFIG_OF?

It's a bit of kludginess-vs-footprint thing I guess, you gain a pointer, you loose a bit of Kconfig and #ifdefs.

Yours,
Linus Walleij