Thread (25 messages) 25 messages, 6 authors, 2025-07-19

Re: [PATCH v2 08/12] pinctrl: qcom: use generic pin function helpers

From: Konrad Dybcio <hidden>
Date: 2025-07-10 12:25:19
Also in: linux-arm-msm, linux-gpio, linux-mediatek, linux-mips, lkml

On 7/9/25 4:39 PM, Bartosz Golaszewski wrote:
From: Bartosz Golaszewski <redacted>

Use the existing infrastructure for storing and looking up pin functions
in pinctrl core. Remove hand-crafted callbacks.

Signed-off-by: Bartosz Golaszewski <redacted>
---
[...]
quoted hunk ↗ jump to hunk
 int msm_pinctrl_probe(struct platform_device *pdev,
 		      const struct msm_pinctrl_soc_data *soc_data)
 {
+	const struct pinfunction *func;
 	struct msm_pinctrl *pctrl;
 	struct resource *res;
 	int ret;
@@ -1606,6 +1581,14 @@ int msm_pinctrl_probe(struct platform_device *pdev,
 		return PTR_ERR(pctrl->pctrl);
 	}
 
+	for (i = 0; i < soc_data->nfunctions; i++) {
+		func = &soc_data->functions[i];
+
+		ret = pinmux_generic_add_pinfunction(pctrl->pctrl, func, NULL);
+		if (ret < 0)
+			return ret;
+	}
It's good in principle, but we're now going to house two copies of
the function data in memory... Can we trust __initconst nowadays?

Konrad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help