Skip to content

Commit

Permalink
pinctrl: Cleanup Meson8 driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Carlo Caione authored and Linus Walleij committed Apr 7, 2015
1 parent 25a853d commit 0cf6f3c
Show file tree
Hide file tree
Showing 2 changed files with 461 additions and 597 deletions.
8 changes: 5 additions & 3 deletions drivers/pinctrl/meson/pinctrl-meson.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ struct meson_pinctrl {
struct meson_domain *domains;
};

#define PIN(x, b) (b + x)

#define GROUP(grp, r, b) \
{ \
.name = #grp, \
Expand All @@ -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, \
}
Expand Down Expand Up @@ -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;
Loading

0 comments on commit 0cf6f3c

Please sign in to comment.