diff mbox

[PATCH/RFC,176/390] sh: pfc: Dumb GPIO stringification.

Message ID 1364525119-31791-177-git-send-email-horms+renesas@verge.net.au (mailing list archive)
State New, archived
Headers show

Commit Message

Simon Horman March 29, 2013, 2:41 a.m. UTC
From: Paul Mundt <lethal@linux-sh.org>

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>
(cherry picked from commit 72c7afa10f272710028f244da65d35e571144085)

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 include/linux/sh_pfc.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h
index f522550..8c4cbcb 100644
--- a/include/linux/sh_pfc.h
+++ b/include/linux/sh_pfc.h
@@ -11,6 +11,7 @@ 
 #ifndef __SH_PFC_H
 #define __SH_PFC_H
 
+#include <linux/stringify.h>
 #include <asm-generic/gpio.h>
 
 typedef unsigned short pinmux_enum_t;
@@ -37,10 +38,11 @@  enum {
 struct pinmux_gpio {
 	pinmux_enum_t enum_id;
 	pinmux_flag_t flags;
+	const char *name;
 };
 
 #define PINMUX_GPIO(gpio, data_or_mark) \
-	[gpio] = { .enum_id = data_or_mark, .flags = PINMUX_TYPE_NONE }
+	[gpio] = { .name = __stringify(gpio), .enum_id = data_or_mark, .flags = PINMUX_TYPE_NONE }
 
 #define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0