]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: Fix the clean up on pinconf_apply_setting failure
authorMukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Tue, 24 Dec 2024 08:44:41 +0000 (14:14 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 27 Dec 2024 16:07:56 +0000 (17:07 +0100)
commit001d7ef8e37074d2a2bce3a7210911a28f4530b7
tree617c16dc0734f77f84a38c30d88b4c56b43bcb4c
parente4ee0acff5b9909644e6b2cb7fb977f877f916c0
pinctrl: Fix the clean up on pinconf_apply_setting failure

When some client does devm_pinctrl_get() followed by
pinctrl_select_state() that does pinmux first successfully and later
during config setting it sets the wrong drive strenght to the pin due to
which pinconf_apply_setting fails. Currently, on failure during config
setting is implemented as if pinmux has failed for one of the pin but
that does not seem right and need to undo the pinmux for all the pin if
config setting fails.

Current commit does a bit refactor to reuse the code and tries to clean
up mux setting on config setting failure.

Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Link: https://lore.kernel.org/20241224084441.515870-1-mukesh.ojha@oss.qualcomm.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/core.c