Skip to content

Commit

Permalink
pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS()
Browse files Browse the repository at this point in the history
Add a macro to refer to another pin group with a different name.

This will be used to rename wrongly-named pin groups, while retaining
backwards compatibility with old DTBs.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
  • Loading branch information
Geert Uytterhoeven committed Mar 21, 2018
1 parent 66e9fe1 commit 43a51cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/pinctrl/sh-pfc/sh_pfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ struct sh_pfc_pin {
unsigned int configs;
};

#define SH_PFC_PIN_GROUP(n) \
#define SH_PFC_PIN_GROUP_ALIAS(alias, n) \
{ \
.name = #n, \
.name = #alias, \
.pins = n##_pins, \
.mux = n##_mux, \
.nr_pins = ARRAY_SIZE(n##_pins), \
}
#define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)

struct sh_pfc_pin_group {
const char *name;
Expand Down

0 comments on commit 43a51cd

Please sign in to comment.