pinctrl: renesas: r8a7778: Use common R-Car bias handling
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 28 Oct 2020 15:16:36 +0000 (16:16 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 13 Nov 2020 14:37:41 +0000 (15:37 +0100)
commita3ee0a246df1755af04d79cd6cd53939aeb6a0db
tree7f0140114953ecb34de38bdb0f39d58eb813c1bd
parent2d341cc3da8a0aef8b505ea7d2de39075e181088
pinctrl: renesas: r8a7778: Use common R-Car bias handling

Currently, the rcar_pinmux_[gs]et_bias() helpers handle only SoCs that
have separate LSI Pin Pull-Enable (PUEN) and Pull-Up/Down Control (PUD)
registers, like R-Car Gen3 and RZ/G2.  Update the function to handle
SoCs that have only LSI Pin Pull-Up Control Register (PUPR), like R-Car
Gen1/Gen2 and RZ/G1.

Reduce code duplication by converting the R-Car M1A pin control driver
to use the common handler.

Note that this changes behavior in case the (invalid!) option
"bias-pull-down" is used in an R-Car M1A DTS: before, it was ignored
silently; after this change, it is considered the same as
"bias-pull-up".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201028151637.1734130-8-geert+renesas@glider.be
drivers/pinctrl/renesas/pfc-r8a7778.c
drivers/pinctrl/renesas/pinctrl.c