pinctrl: sh-pfc: Split R-Car H3 support in two independent drivers
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 30 Dec 2019 08:31:56 +0000 (09:31 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 8 Jan 2020 08:56:28 +0000 (09:56 +0100)
commitf2bc07562748c23609743ded0630ec965f9e4fec
treead3a43e9ecfd222f017c1802637cd94cce450093
parentb4fba344a293076947fcf3d60dda51f955e19c77
pinctrl: sh-pfc: Split R-Car H3 support in two independent drivers

Despite using the same compatible values ("r8a7795"-based) because of
historical reasons, R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+
(R8A77951) are really different SoCs, with different part numbers, and
with different Pin Function Controller blocks.

Reflect this in the pinctrl configuration, by replacing the existing
CONFIG_PINCTRL_PFC_R8A7795 symbol by two new config symbols:
CONFIG_PINCTRL_PFC_R8A77950 and CONFIG_PINCTRL_PFC_R8A77951.  The latter
are selected automatically, depending on the soon-to-be-introduced
corresponding SoC-specific config options, and on the current common
config option, to relax dependencies.

Rename the individual pin control driver source files from
pfc-r8a7795-es1.c to pfc-r8a77950.c, and from pfc-r8a7795.c to
pfc-r8a77951.c, and make them truly independent.
As both SoCs share the same compatible value, special care must be taken
to match them to the correct pin control driver, if support for it is
included in the running kernel.

This will allow making support for early R-Car H3 revisions optional,
the largest share of which is taken by the pin control driver.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191230083156.19191-1-geert+renesas@glider.be
drivers/pinctrl/sh-pfc/Kconfig
drivers/pinctrl/sh-pfc/Makefile
drivers/pinctrl/sh-pfc/core.c
drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c [deleted file]
drivers/pinctrl/sh-pfc/pfc-r8a7795.c [deleted file]
drivers/pinctrl/sh-pfc/pfc-r8a77950.c [new file with mode: 0644]
drivers/pinctrl/sh-pfc/pfc-r8a77951.c [new file with mode: 0644]
drivers/pinctrl/sh-pfc/sh_pfc.h