pinctrl: renesas: Factor out common R-Mobile bias handling
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 3 Mar 2021 13:26:16 +0000 (14:26 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 24 Mar 2021 09:38:29 +0000 (10:38 +0100)
commitec0794a122db146ac58984afd198062d0349b92a
tree6036bc4f2f876d647286b9fc8092acf9746fcf66
parent4b6e6c19895b923b1ebfb5312902e905e2a1f91a
pinctrl: renesas: Factor out common R-Mobile bias handling

The pin control sub-drivers for SH/R-Mobile SoCs contain almost
identical bias handling.  The only SoC-specific part is the mapping from
pin numbers to PORTnCR registers.

Reduce code duplication by factoring out the bias handling to the common
pinctrl.c code.  Use a callback to handle the pin/register mapping.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20210303132619.3938128-4-geert+renesas@glider.be
drivers/pinctrl/renesas/pfc-r8a73a4.c
drivers/pinctrl/renesas/pfc-r8a7740.c
drivers/pinctrl/renesas/pfc-sh73a0.c
drivers/pinctrl/renesas/pinctrl.c
drivers/pinctrl/renesas/sh_pfc.h