]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit34b30b7b88e239e3a229ded3075f77d0bae99dc7
tree6036bc4f2f876d647286b9fc8092acf9746fcf66
parent43dd0ba5d0f7791cd994b93a4f3c6027ec85c136
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