diff options
author | Carlo Caione <carlo@endlessm.com> | 2015-03-19 22:34:10 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-04-07 11:40:42 +0200 |
commit | 0cf6f3c2b5ef0b5b3bb82f02edbeda4751b27763 (patch) | |
tree | 2255249d481a019a89680b23bcf308c477d1212e /drivers/pinctrl/meson/pinctrl-meson.h | |
parent | 25a853d037a40b7ac2c317adef6442ef92d8407e (diff) |
pinctrl: Cleanup Meson8 driver
This patch introduces a new PIN macro and few small modifications to
simplify and shorten the Meson pinctrl drivers and cleanup the support
file for the AmLogic Meson8 SoC.
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Acked-by: Beniamino Galvani <b.galvani@gmail.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.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pinctrl/meson/pinctrl-meson.h b/drivers/pinctrl/meson/pinctrl-meson.h index bfea8adc7953..bc48c781ca51 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.h +++ b/drivers/pinctrl/meson/pinctrl-meson.h @@ -155,6 +155,8 @@ struct meson_pinctrl { struct meson_domain *domains; }; +#define PIN(x, b) (b + x) + #define GROUP(grp, r, b) \ { \ .name = #grp, \ @@ -165,10 +167,10 @@ struct meson_pinctrl { .domain = 0, \ } -#define GPIO_GROUP(gpio) \ +#define GPIO_GROUP(gpio, b) \ { \ .name = #gpio, \ - .pins = (const unsigned int[]){ PIN_ ## gpio}, \ + .pins = (const unsigned int[]){ PIN(gpio, b) }, \ .num_pins = 1, \ .is_gpio = true, \ } @@ -204,6 +206,6 @@ struct meson_pinctrl { }, \ } -#define MESON_PIN(x) PINCTRL_PIN(PIN_ ## x, #x) +#define MESON_PIN(x, b) PINCTRL_PIN(PIN(x, b), #x) extern struct meson_pinctrl_data meson8_pinctrl_data; |