diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-07-09 22:59:29 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-07-09 22:59:29 -0400 |
commit | 72c7afa10f272710028f244da65d35e571144085 (patch) | |
tree | 801254dd87cac578e8380fc2138509a2406f54ee /include/linux/sh_pfc.h | |
parent | a18d7f9660a9037c4b9c41590220e6bb77768a5e (diff) |
sh: pfc: Dumb GPIO stringification.
This implements fairly simplistic stringification of existing pinmux
GPIOs for easy enum id -> string mapping, which will subsequently be used
by the pinctrl support code.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/sh_pfc.h')
-rw-r--r-- | include/linux/sh_pfc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h index f522550fc32b..8c4cbcb9064d 100644 --- a/include/linux/sh_pfc.h +++ b/include/linux/sh_pfc.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef __SH_PFC_H | 11 | #ifndef __SH_PFC_H |
12 | #define __SH_PFC_H | 12 | #define __SH_PFC_H |
13 | 13 | ||
14 | #include <linux/stringify.h> | ||
14 | #include <asm-generic/gpio.h> | 15 | #include <asm-generic/gpio.h> |
15 | 16 | ||
16 | typedef unsigned short pinmux_enum_t; | 17 | typedef unsigned short pinmux_enum_t; |
@@ -37,10 +38,11 @@ enum { | |||
37 | struct pinmux_gpio { | 38 | struct pinmux_gpio { |
38 | pinmux_enum_t enum_id; | 39 | pinmux_enum_t enum_id; |
39 | pinmux_flag_t flags; | 40 | pinmux_flag_t flags; |
41 | const char *name; | ||
40 | }; | 42 | }; |
41 | 43 | ||
42 | #define PINMUX_GPIO(gpio, data_or_mark) \ | 44 | #define PINMUX_GPIO(gpio, data_or_mark) \ |
43 | [gpio] = { .enum_id = data_or_mark, .flags = PINMUX_TYPE_NONE } | 45 | [gpio] = { .name = __stringify(gpio), .enum_id = data_or_mark, .flags = PINMUX_TYPE_NONE } |
44 | 46 | ||
45 | #define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0 | 47 | #define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0 |
46 | 48 | ||