diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-07-15 17:42:48 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-07-29 15:17:43 +0200 |
commit | df020272abd6e30673f397fea31e5e133a87c0fe (patch) | |
tree | d7064f9dd3e9f00be1eb509f9e979bca275bf4a0 /drivers/pinctrl/sh-pfc/pfc-sh7372.c | |
parent | sh-pfc: Consolidate PFC SoC data macros (diff) | |
download | linux-df020272abd6e30673f397fea31e5e133a87c0fe.tar.xz linux-df020272abd6e30673f397fea31e5e133a87c0fe.zip |
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-sh7372.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/pfc-sh7372.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-sh7372.c b/drivers/pinctrl/sh-pfc/pfc-sh7372.c index 9174ff26738e..17f1c17956c8 100644 --- a/drivers/pinctrl/sh-pfc/pfc-sh7372.c +++ b/drivers/pinctrl/sh-pfc/pfc-sh7372.c @@ -829,13 +829,6 @@ static const u16 pinmux_data[] = { PINMUX_DATA(MFIv4_MARK, MSEL4CR_6_1), }; -#define SH7372_PIN(pin, cfgs) \ - { \ - .name = __stringify(PORT##pin), \ - .enum_id = PORT##pin##_DATA, \ - .configs = cfgs, \ - } - #define __I (SH_PFC_PIN_CFG_INPUT) #define __O (SH_PFC_PIN_CFG_OUTPUT) #define __IO (SH_PFC_PIN_CFG_INPUT | SH_PFC_PIN_CFG_OUTPUT) @@ -843,15 +836,15 @@ static const u16 pinmux_data[] = { #define __PU (SH_PFC_PIN_CFG_PULL_UP) #define __PUD (SH_PFC_PIN_CFG_PULL_DOWN | SH_PFC_PIN_CFG_PULL_UP) -#define SH7372_PIN_I_PD(pin) SH7372_PIN(pin, __I | __PD) -#define SH7372_PIN_I_PU(pin) SH7372_PIN(pin, __I | __PU) -#define SH7372_PIN_I_PU_PD(pin) SH7372_PIN(pin, __I | __PUD) -#define SH7372_PIN_IO(pin) SH7372_PIN(pin, __IO) -#define SH7372_PIN_IO_PD(pin) SH7372_PIN(pin, __IO | __PD) -#define SH7372_PIN_IO_PU(pin) SH7372_PIN(pin, __IO | __PU) -#define SH7372_PIN_IO_PU_PD(pin) SH7372_PIN(pin, __IO | __PUD) -#define SH7372_PIN_O(pin) SH7372_PIN(pin, __O) -#define SH7372_PIN_O_PU_PD(pin) SH7372_PIN(pin, __O | __PUD) +#define SH7372_PIN_I_PD(pin) SH_PFC_PIN_CFG(pin, __I | __PD) +#define SH7372_PIN_I_PU(pin) SH_PFC_PIN_CFG(pin, __I | __PU) +#define SH7372_PIN_I_PU_PD(pin) SH_PFC_PIN_CFG(pin, __I | __PUD) +#define SH7372_PIN_IO(pin) SH_PFC_PIN_CFG(pin, __IO) +#define SH7372_PIN_IO_PD(pin) SH_PFC_PIN_CFG(pin, __IO | __PD) +#define SH7372_PIN_IO_PU(pin) SH_PFC_PIN_CFG(pin, __IO | __PU) +#define SH7372_PIN_IO_PU_PD(pin) SH_PFC_PIN_CFG(pin, __IO | __PUD) +#define SH7372_PIN_O(pin) SH_PFC_PIN_CFG(pin, __O) +#define SH7372_PIN_O_PU_PD(pin) SH_PFC_PIN_CFG(pin, __O | __PUD) static struct sh_pfc_pin pinmux_pins[] = { /* Table 57-1 (I/O and Pull U/D) */ |