aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/meson/pinctrl-meson8.c
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2017-10-12 14:40:26 +0200
committerLinus Walleij <linus.walleij@linaro.org>2017-10-16 23:14:10 +0200
commitce385aa24a0dcccdc81dfcbc90cf7aa290d8b758 (patch)
treea819b80b58f149152363a31ed939b2a666016713 /drivers/pinctrl/meson/pinctrl-meson8.c
parentpinctrl: meson: separate soc drivers (diff)
downloadlinux-dev-ce385aa24a0dcccdc81dfcbc90cf7aa290d8b758.tar.xz
linux-dev-ce385aa24a0dcccdc81dfcbc90cf7aa290d8b758.zip
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>
Diffstat (limited to 'drivers/pinctrl/meson/pinctrl-meson8.c')
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson8.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/meson/pinctrl-meson8.c b/drivers/pinctrl/meson/pinctrl-meson8.c
index 68b345fc105a..49c7ce03547b 100644
--- a/drivers/pinctrl/meson/pinctrl-meson8.c
+++ b/drivers/pinctrl/meson/pinctrl-meson8.c
@@ -13,6 +13,7 @@
#include <dt-bindings/gpio/meson8-gpio.h>
#include "pinctrl-meson.h"
+#include "pinctrl-meson8-pmx.h"
static const struct pinctrl_pin_desc meson8_cbus_pins[] = {
MESON_PIN(GPIOX_0),
@@ -1054,6 +1055,7 @@ static struct meson_pinctrl_data meson8_cbus_pinctrl_data = {
.num_groups = ARRAY_SIZE(meson8_cbus_groups),
.num_funcs = ARRAY_SIZE(meson8_cbus_functions),
.num_banks = ARRAY_SIZE(meson8_cbus_banks),
+ .pmx_ops = &meson8_pmx_ops,
};
static struct meson_pinctrl_data meson8_aobus_pinctrl_data = {
@@ -1066,6 +1068,7 @@ static struct meson_pinctrl_data meson8_aobus_pinctrl_data = {
.num_groups = ARRAY_SIZE(meson8_aobus_groups),
.num_funcs = ARRAY_SIZE(meson8_aobus_functions),
.num_banks = ARRAY_SIZE(meson8_aobus_banks),
+ .pmx_ops = &meson8_pmx_ops,
};
static const struct of_device_id meson8_pinctrl_dt_match[] = {