mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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>
This commit is contained in:
parent
11aa02d6a9
commit
b65803da89
|
|
@ -265,6 +265,7 @@ static const struct pinmux_ops msm_pinmux_ops = {
|
|||
.get_functions_count = pinmux_generic_get_function_count,
|
||||
.get_function_name = pinmux_generic_get_function_name,
|
||||
.get_function_groups = pinmux_generic_get_function_groups,
|
||||
.function_is_gpio = pinmux_generic_function_is_gpio,
|
||||
.gpio_request_enable = msm_pinmux_request_gpio,
|
||||
.set_mux = msm_pinmux_set_mux,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@ struct pinctrl_pin_desc;
|
|||
fname##_groups, \
|
||||
ARRAY_SIZE(fname##_groups))
|
||||
|
||||
#define MSM_GPIO_PIN_FUNCTION(fname) \
|
||||
[msm_mux_##fname] = PINCTRL_GPIO_PINFUNCTION(#fname, \
|
||||
fname##_groups, \
|
||||
ARRAY_SIZE(fname##_groups))
|
||||
|
||||
#define QCA_PIN_FUNCTION(fname) \
|
||||
[qca_mux_##fname] = PINCTRL_PINFUNCTION(#fname, \
|
||||
fname##_groups, \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user