]> 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)
commitaf2c0aa2673ad03581f9ecb7cfe52e4e080573a6
tree6036bc4f2f876d647286b9fc8092acf9746fcf66
parentf7c1a29ffda78cef1b37e0789312e6d4bcfd5fd4
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