diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-09-02 13:59:25 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2025-09-08 14:23:24 +0200 |
commit | cc85cb96e2e4489826e372cde645b7823c435de0 (patch) | |
tree | 50fb5cd10432854cbc98dfbf77399f9cfbfe500c | |
parent | 480dc195240422f78dae2edaa6666f85d56e2ade (diff) |
pinctrl: qcom: make the pinmuxing strict
The strict flag in struct pinmux_ops disallows the usage of the same pin
as a GPIO and for another function. Without it, a rouge user-space
process with enough privileges (or even a buggy driver) can request a
used pin as GPIO and drive it, potentially confusing devices or even
crashing the system. Set it globally for all pinctrl-msm users.
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>
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-msm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index a5f694648271..1751d838ce95 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -268,6 +268,7 @@ static const struct pinmux_ops msm_pinmux_ops = { .function_is_gpio = pinmux_generic_function_is_gpio, .gpio_request_enable = msm_pinmux_request_gpio, .set_mux = msm_pinmux_set_mux, + .strict = true, }; static int msm_config_reg(struct msm_pinctrl *pctrl, |