diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-07-15 11:42:48 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-07-29 09:17:43 -0400 |
commit | df020272abd6e30673f397fea31e5e133a87c0fe (patch) | |
tree | d7064f9dd3e9f00be1eb509f9e979bca275bf4a0 /drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | |
parent | e3d93b46718f12924128e5e70e2f3f992a95fa3b (diff) |
sh-pfc: Consolidate pin definition macros
Move the pin definition macros to a common header file.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pfc-r8a73a4.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c index d8115331e6d3..288821b63323 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c +++ b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | |||
@@ -1266,19 +1266,12 @@ static const u16 pinmux_data[] = { | |||
1266 | PINMUX_DATA(IRQ57_MARK, PORT329_FN0), | 1266 | PINMUX_DATA(IRQ57_MARK, PORT329_FN0), |
1267 | }; | 1267 | }; |
1268 | 1268 | ||
1269 | #define R8A73A4_PIN(pin, cfgs) \ | ||
1270 | { \ | ||
1271 | .name = __stringify(PORT##pin), \ | ||
1272 | .enum_id = PORT##pin##_DATA, \ | ||
1273 | .configs = cfgs, \ | ||
1274 | } | ||
1275 | |||
1276 | #define __O (SH_PFC_PIN_CFG_OUTPUT) | 1269 | #define __O (SH_PFC_PIN_CFG_OUTPUT) |
1277 | #define __IO (SH_PFC_PIN_CFG_INPUT | SH_PFC_PIN_CFG_OUTPUT) | 1270 | #define __IO (SH_PFC_PIN_CFG_INPUT | SH_PFC_PIN_CFG_OUTPUT) |
1278 | #define __PUD (SH_PFC_PIN_CFG_PULL_DOWN | SH_PFC_PIN_CFG_PULL_UP) | 1271 | #define __PUD (SH_PFC_PIN_CFG_PULL_DOWN | SH_PFC_PIN_CFG_PULL_UP) |
1279 | 1272 | ||
1280 | #define R8A73A4_PIN_IO_PU_PD(pin) R8A73A4_PIN(pin, __IO | __PUD) | 1273 | #define R8A73A4_PIN_IO_PU_PD(pin) SH_PFC_PIN_CFG(pin, __IO | __PUD) |
1281 | #define R8A73A4_PIN_O(pin) R8A73A4_PIN(pin, __O) | 1274 | #define R8A73A4_PIN_O(pin) SH_PFC_PIN_CFG(pin, __O) |
1282 | 1275 | ||
1283 | static struct sh_pfc_pin pinmux_pins[] = { | 1276 | static struct sh_pfc_pin pinmux_pins[] = { |
1284 | R8A73A4_PIN_IO_PU_PD(0), R8A73A4_PIN_IO_PU_PD(1), | 1277 | R8A73A4_PIN_IO_PU_PD(0), R8A73A4_PIN_IO_PU_PD(1), |