Commit 43a51cd5 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

pinctrl: sh-pfc: Add SH_PFC_PIN_GROUP_ALIAS()

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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
parent 66e9fe1e
...@@ -39,13 +39,14 @@ struct sh_pfc_pin { ...@@ -39,13 +39,14 @@ struct sh_pfc_pin {
unsigned int configs; unsigned int configs;
}; };
#define SH_PFC_PIN_GROUP(n) \ #define SH_PFC_PIN_GROUP_ALIAS(alias, n) \
{ \ { \
.name = #n, \ .name = #alias, \
.pins = n##_pins, \ .pins = n##_pins, \
.mux = n##_mux, \ .mux = n##_mux, \
.nr_pins = ARRAY_SIZE(n##_pins), \ .nr_pins = ARRAY_SIZE(n##_pins), \
} }
#define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
struct sh_pfc_pin_group { struct sh_pfc_pin_group {
const char *name; const char *name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment