pinctrl: meson: rework pinmux ops
authorJerome Brunet <jbrunet@baylibre.com>
Thu, 12 Oct 2017 12:40:26 +0000 (14:40 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 16 Oct 2017 21:14:10 +0000 (23:14 +0200)
commitce385aa24a0dcccdc81dfcbc90cf7aa290d8b758
treea819b80b58f149152363a31ed939b2a666016713
parent277d14eb815fdfb95a72ea126bc09f75a2bd58fd
pinctrl: meson: rework pinmux ops

This change prepare the introduction of new meson SoC. This new SoC will
share the same gpio/pinconf registers but the pinmux part will be
different. While the format of the data associated with each pinmux group
will change, the way to handle pinmuxing will be similar.

To deal with this new situation, the meson_pmx_struture is kept but the
data associated to it is now generic. This allows to reuse the basic
functions which would otherwise be copy/pasted in each pinmux driver
(such as getting the name a count of groups and functions) Only the
functions actually using this specific data is taken out of the common
code and is handling the SoC pinmuxing

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/meson/Kconfig
drivers/pinctrl/meson/Makefile
drivers/pinctrl/meson/pinctrl-meson-gxbb.c
drivers/pinctrl/meson/pinctrl-meson-gxl.c
drivers/pinctrl/meson/pinctrl-meson.c
drivers/pinctrl/meson/pinctrl-meson.h
drivers/pinctrl/meson/pinctrl-meson8-pmx.c [new file with mode: 0644]
drivers/pinctrl/meson/pinctrl-meson8-pmx.h [new file with mode: 0644]
drivers/pinctrl/meson/pinctrl-meson8.c
drivers/pinctrl/meson/pinctrl-meson8b.c