Skip to contentSkip to conversation

pinctrl: add stubs for OF-specific pinconf functions

PATCH In review Bartosz Golaszewski 2 participants 2 messages May 7, 2025 – May 13, 2025

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

PATCH 1/1 pinctrl: add stubs for OF-specific pinconf functions

From: Bartosz Golaszewski <[email protected]>

Allow building drivers using these interfaces with COMPILE_TEST enabled and OF disabled by providing stub definitions.

---
 drivers/pinctrl/pinconf.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
drivers/pinctrl/pinconf.h +17 -0
index a171195b36159..e1ae716105261 100644
@@ -142,4 +142,21 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
 int pinconf_generic_parse_dt_pinmux(struct device_node *np, struct device *dev,
 				    unsigned int **pid, unsigned int **pmux,
 				    unsigned int *npins);
+#else
+static inline int
+pinconf_generic_parse_dt_config(struct device_node *np,
+				struct pinctrl_dev *pctldev,
+				unsigned long **configs,
+				unsigned int *nconfigs)
+{
+	return -ENOTSUPP;
+}
+
+static inline int
+pinconf_generic_parse_dt_pinmux(struct device_node *np, struct device *dev,
+				unsigned int **pid, unsigned int **pmux,
+				unsigned int *npins)
+{
+	return -ENOTSUPP;
+}
 #endif
Signature · 1 line
2.45.2