Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 7ebaa41

Browse files
committed
pinctrl: renesas: rcar: Avoid changing PUDn when disabling bias
When disabling pin bias, there is no need to touch the LSI pin pull-up/down control register (PUDn), which selects between pull-up and pull-down. Just disabling the pull-up/down function through the LSI pin pull-enable register (PUENn) is sufficient. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Link: https://lore.kernel.org/r/071ec644de2555da593a4531ef5d3e4d79cf997d.1625064076.git.geert+renesas@glider.be
1 parent e73f0f0 commit 7ebaa41

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/pinctrl/renesas/pinctrl.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -898,17 +898,17 @@ void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
898898

899899
if (reg->puen) {
900900
enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit);
901-
if (bias != PIN_CONFIG_BIAS_DISABLE)
901+
if (bias != PIN_CONFIG_BIAS_DISABLE) {
902902
enable |= BIT(bit);
903903

904-
if (reg->pud) {
905-
updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
906-
if (bias == PIN_CONFIG_BIAS_PULL_UP)
907-
updown |= BIT(bit);
904+
if (reg->pud) {
905+
updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
906+
if (bias == PIN_CONFIG_BIAS_PULL_UP)
907+
updown |= BIT(bit);
908908

909-
sh_pfc_write(pfc, reg->pud, updown);
909+
sh_pfc_write(pfc, reg->pud, updown);
910+
}
910911
}
911-
912912
sh_pfc_write(pfc, reg->puen, enable);
913913
} else {
914914
enable = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);

0 commit comments

Comments
 (0)