From 634e40b0c2bde81051e309cdfe4c26bbca3164ec Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Wed, 20 Sep 2017 15:39:20 +0200 Subject: 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 Signed-off-by: Jerome Brunet Signed-off-by: Linus Walleij --- drivers/pinctrl/meson/pinctrl-meson.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/pinctrl/meson/pinctrl-meson.h') 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; -- cgit v1.2.3-55-g7522