Skip to contentSkip to conversation

pinctrl: rockchip: depend on OF

PATCH In review Heiko Stuebner 2 participants 2 messages Sep 5, 2020 – Sep 12, 2020

Subsystems (3)
lore
Share & tools
lore

Heiko Stuebner

author maintainer
#0 lore raw

PATCH 1/1 pinctrl: rockchip: depend on OF

From: Heiko Stuebner <[email protected]>

The Rockchip pinctrl driver needs to handle information from Devicetree so only makes sense getting compiled on systems with CONFIG_OF enabled.

This also fixes a problem found by the "kernel-test-robot" when compiling the driver on test-builds that do not have CONFIG_OF enabled:

drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_parse_groups':

Quoted 1 line
Quoted 1 line

drivers/pinctrl/pinctrl-rockchip.c:2881:9: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]

    2881 |   ret = pinconf_generic_parse_dt_config(np_config, NULL,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         pinconf_generic_dump_config

drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_gpiolib_register':

Quoted 1 line
Quoted 1 line

drivers/pinctrl/pinctrl-rockchip.c:3473:5: error: 'struct gpio_chip' has no member named 'of_node'

    3473 |   gc->of_node = bank->of_node;
---
 drivers/pinctrl/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/Kconfig +2 -0
index 8828613c4e0e..4284f39a5c61 100644
@@ -208,10 +208,12 @@ config PINCTRL_OXNAS
 
 config PINCTRL_ROCKCHIP
 	bool
+	depends on OF
 	select PINMUX
 	select GENERIC_PINCONF
 	select GENERIC_IRQ_CHIP
 	select MFD_SYSCON
+	select OF_GPIO
 
 config PINCTRL_RZA1
 	bool "Renesas RZ/A1 gpio and pinctrl driver"
Signature · 1 line
2.28.0
#1 lore raw
Quoted 13 lines · Heiko Stuebner

From: Heiko Stuebner <[email protected]>

The Rockchip pinctrl driver needs to handle information from Devicetree so only makes sense getting compiled on systems with CONFIG_OF enabled.

This also fixes a problem found by the "kernel-test-robot" when compiling the driver on test-builds that do not have CONFIG_OF enabled:

drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_parse_groups':

Quoted 1 line
Quoted 1 line

drivers/pinctrl/pinctrl-rockchip.c:2881:9: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]

    2881 |   ret = pinconf_generic_parse_dt_config(np_config, NULL,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         pinconf_generic_dump_config
Quoted 6 lines

drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_gpiolib_register':

Quoted 1 line
Quoted 1 line

drivers/pinctrl/pinctrl-rockchip.c:3473:5: error: 'struct gpio_chip' has no member named 'of_node'

    3473 |   gc->of_node = bank->of_node;

Patch applied.

Yours,
Linus Walleij

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip