Skip to contentSkip to conversation

pinctrl: Add OF dependency for PINCTRL_GENERIC_MUX

PATCH In review Frank Li 2 participants 2 messages May 12 – May 14

Subsystems (3)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

PATCH 1/1 pinctrl: Add OF dependency for PINCTRL_GENERIC_MUX

Add an explicit OF dependency for PINCTRL_GENERIC_MUX to ensure the generic mux support is only enabled when device tree is available.

Also fix the stub implementation of pinctrl_generic_to_map() by correcting its last argument to match the non-stub prototype.

---
Linus Walleij:
I am sorry for missed a previous fixes patch
(https://lore.kernel.org/imx/[email protected]/)
when rebase since it is located another fixes tree.

Frank

---
 drivers/pinctrl/Kconfig   | 1 +
 drivers/pinctrl/pinconf.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/Kconfig +1 -0
index 31d698fbaa01d..f4ffe1f3b720f 100644
@@ -275,6 +275,7 @@ config PINCTRL_GEMINI
 config PINCTRL_GENERIC_MUX
 	tristate "Generic Pinctrl driver by using multiplexer"
 	depends on MULTIPLEXER
+	depends on OF
 	select PINMUX
 	select GENERIC_PINCTRL
 	help
drivers/pinctrl/pinconf.h +1 -1
index fa8fb0d290d1d..9711d16c38b62 100644
@@ -195,7 +195,7 @@ pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *parent,
 		       unsigned int *num_maps, unsigned int *num_reserved_maps,
 		       const char **group_name, unsigned int ngroups,
 		       const char **functions, unsigned int *pins,
-		       void *function_data)
+		       unsigned int npins)
 {
 	return -ENOTSUPP;
 }
Signature · 1 line
2.43.0
#1 lore raw
Quoted 9 lines · Frank Li

Add an explicit OF dependency for PINCTRL_GENERIC_MUX to ensure the generic mux support is only enabled when device tree is available.

Also fix the stub implementation of pinctrl_generic_to_map() by correcting its last argument to match the non-stub prototype.

Having been baited into sending a fix for the incorrect signature cos the commit message here suggested that this was a dependency fix for just the driver, I think this should be split into two patches, especially since the commits fixed by each hunk here are different.

Additionally, looks like you're also missing fixes tags.

Cheers,
Conor.

Quoted 40 lines

---
Linus Walleij:
I am sorry for missed a previous fixes patch
(https://lore.kernel.org/imx/[email protected]/)
when rebase since it is located another fixes tree.

Frank

---
 drivers/pinctrl/Kconfig   | 1 +
 drivers/pinctrl/pinconf.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/Kconfig +1 -0
index 31d698fbaa01d..f4ffe1f3b720f 100644
@@ -275,6 +275,7 @@ config PINCTRL_GEMINI
 config PINCTRL_GENERIC_MUX
 	tristate "Generic Pinctrl driver by using multiplexer"
 	depends on MULTIPLEXER
+	depends on OF
 	select PINMUX
 	select GENERIC_PINCTRL
 	help
drivers/pinctrl/pinconf.h +1 -1
index fa8fb0d290d1d..9711d16c38b62 100644
@@ -195,7 +195,7 @@ pinctrl_generic_to_map(struct pinctrl_dev *pctldev, struct device_node *parent,
 		       unsigned int *num_maps, unsigned int *num_reserved_maps,
 		       const char **group_name, unsigned int ngroups,
 		       const char **functions, unsigned int *pins,
-		       void *function_data)
+		       unsigned int npins)
 {
 	return -ENOTSUPP;
 }
Signature · 1 line
2.43.0