Commit 7ebaa410 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/071ec644de2555da593a4531ef5d3e4d79cf997d.1625064076.git.geert+renesas@glider.be
parent e73f0f0e
...@@ -898,17 +898,17 @@ void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin, ...@@ -898,17 +898,17 @@ void rcar_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
if (reg->puen) { if (reg->puen) {
enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit); enable = sh_pfc_read(pfc, reg->puen) & ~BIT(bit);
if (bias != PIN_CONFIG_BIAS_DISABLE) if (bias != PIN_CONFIG_BIAS_DISABLE) {
enable |= BIT(bit); enable |= BIT(bit);
if (reg->pud) { if (reg->pud) {
updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); updown = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
if (bias == PIN_CONFIG_BIAS_PULL_UP) if (bias == PIN_CONFIG_BIAS_PULL_UP)
updown |= BIT(bit); updown |= BIT(bit);
sh_pfc_write(pfc, reg->pud, updown); sh_pfc_write(pfc, reg->pud, updown);
}
} }
sh_pfc_write(pfc, reg->puen, enable); sh_pfc_write(pfc, reg->puen, enable);
} else { } else {
enable = sh_pfc_read(pfc, reg->pud) & ~BIT(bit); enable = sh_pfc_read(pfc, reg->pud) & ~BIT(bit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment