|
@@ -176,11 +176,27 @@ static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static int msm_pinmux_request_gpio(struct pinctrl_dev *pctldev,
|
|
|
+ struct pinctrl_gpio_range *range,
|
|
|
+ unsigned offset)
|
|
|
+{
|
|
|
+ struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
|
|
|
+ const struct msm_pingroup *g = &pctrl->soc->groups[offset];
|
|
|
+
|
|
|
+ /* No funcs? Probably ACPI so can't do anything here */
|
|
|
+ if (!g->nfuncs)
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ /* For now assume function 0 is GPIO because it always is */
|
|
|
+ return msm_pinmux_set_mux(pctldev, 0, offset);
|
|
|
+}
|
|
|
+
|
|
|
static const struct pinmux_ops msm_pinmux_ops = {
|
|
|
.request = msm_pinmux_request,
|
|
|
.get_functions_count = msm_get_functions_count,
|
|
|
.get_function_name = msm_get_function_name,
|
|
|
.get_function_groups = msm_get_function_groups,
|
|
|
+ .gpio_request_enable = msm_pinmux_request_gpio,
|
|
|
.set_mux = msm_pinmux_set_mux,
|
|
|
};
|
|
|
|