summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/meson/pinctrl-meson.h
diff options
context:
space:
mode:
authorJerome Brunet2017-09-20 15:39:20 +0200
committerLinus Walleij2017-10-05 23:10:49 +0200
commit634e40b0c2bde81051e309cdfe4c26bbca3164ec (patch)
treebf28274ebc365da0649a351e1e0cdd4309435744 /drivers/pinctrl/meson/pinctrl-meson.h
parentpinctrl: cherryview fixed typo in comment (diff)
downloadkernel-qcow2-linux-634e40b0c2bde81051e309cdfe4c26bbca3164ec.tar.gz
kernel-qcow2-linux-634e40b0c2bde81051e309cdfe4c26bbca3164ec.tar.xz
kernel-qcow2-linux-634e40b0c2bde81051e309cdfe4c26bbca3164ec.zip
pinctrl: meson: remove offset from pinctrl
Offset on meson pinctrl and gpios is something that was carried from the vendor driver, where there is a weird link between the 2 controllers. Since these 2 controllers are independent, this offset adds an unnecessary complexity. This patch remove this manually set offset and rely on pinctrl to figure out the gpio base offset Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.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-meson.h')
-rw-r--r--drivers/pinctrl/meson/pinctrl-meson.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pinctrl/meson/pinctrl-meson.h b/drivers/pinctrl/meson/pinctrl-meson.h
index 890f296f5840..227b72a60c22 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.h
+++ b/drivers/pinctrl/meson/pinctrl-meson.h
@@ -124,8 +124,6 @@ struct meson_pinctrl {
struct device_node *of_node;
};
-#define PIN(x, b) (b + x)
-
#define GROUP(grp, r, b) \
{ \
.name = #grp, \
@@ -135,10 +133,10 @@ struct meson_pinctrl {
.bit = b, \
}
-#define GPIO_GROUP(gpio, b) \
+#define GPIO_GROUP(gpio) \
{ \
.name = #gpio, \
- .pins = (const unsigned int[]){ PIN(gpio, b) }, \
+ .pins = (const unsigned int[]){ gpio }, \
.num_pins = 1, \
.is_gpio = true, \
}
@@ -166,7 +164,7 @@ struct meson_pinctrl {
}, \
}
-#define MESON_PIN(x, b) PINCTRL_PIN(PIN(x, b), #x)
+#define MESON_PIN(x) PINCTRL_PIN(x, #x)
extern struct meson_pinctrl_data meson8_cbus_pinctrl_data;
extern struct meson_pinctrl_data meson8_aobus_pinctrl_data;