Skip to content

Commit

Permalink
sh: pfc: Dumb GPIO stringification.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pmundt committed Jul 10, 2012
1 parent a18d7f9 commit 72c7afa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/sh_pfc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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

Expand Down

0 comments on commit 72c7afa

Please sign in to comment.