Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: qcom: add infrastructure for marking pin functions as GPIOs

Add a helper macro that wraps PINCTRL_GPIO_PINFUNCTION() for pinctrl-msm
pin functions and assign the .function_is_gpio() callback in pinmux_ops.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Bartosz Golaszewski and committed by
Linus Walleij
b65803da 11aa02d6

+6
+1
drivers/pinctrl/qcom/pinctrl-msm.c
··· 265 265 .get_functions_count = pinmux_generic_get_function_count, 266 266 .get_function_name = pinmux_generic_get_function_name, 267 267 .get_function_groups = pinmux_generic_get_function_groups, 268 + .function_is_gpio = pinmux_generic_function_is_gpio, 268 269 .gpio_request_enable = msm_pinmux_request_gpio, 269 270 .set_mux = msm_pinmux_set_mux, 270 271 };
+5
drivers/pinctrl/qcom/pinctrl-msm.h
··· 29 29 fname##_groups, \ 30 30 ARRAY_SIZE(fname##_groups)) 31 31 32 + #define MSM_GPIO_PIN_FUNCTION(fname) \ 33 + [msm_mux_##fname] = PINCTRL_GPIO_PINFUNCTION(#fname, \ 34 + fname##_groups, \ 35 + ARRAY_SIZE(fname##_groups)) 36 + 32 37 #define QCA_PIN_FUNCTION(fname) \ 33 38 [qca_mux_##fname] = PINCTRL_PINFUNCTION(#fname, \ 34 39 fname##_groups, \