This patch move PORT_DATA_xx helper macro to sh_pfc.h. and pfc-sh7372.c used it
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -104,4 +104,40 @@ struct pinmux_info { · 103 unmodified lines | ||
| 104 | 104 | int register_pinmux(struct pinmux_info *pip); |
| 105 | 105 | int unregister_pinmux(struct pinmux_info *pip); |
| 106 | 106 | |
| 107 | +/* helper macro for pinmux_enum_t */ | |
| 108 | +#define PORT_DATA_I(nr) \ | |
| 109 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) | |
| 110 | + | |
| 111 | +#define PORT_DATA_I_PD(nr) \ | |
| 112 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | |
| 113 | + PORT##nr##_IN, PORT##nr##_IN_PD) | |
| 114 | + | |
| 115 | +#define PORT_DATA_I_PU(nr) \ | |
| 116 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | |
| 117 | + PORT##nr##_IN, PORT##nr##_IN_PU) | |
| 118 | + | |
| 119 | +#define PORT_DATA_I_PU_PD(nr) \ | |
| 120 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ | |
| 121 | + PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | |
| 122 | + | |
| 123 | +#define PORT_DATA_O(nr) \ | |
| 124 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT) | |
| 125 | + | |
| 126 | +#define PORT_DATA_IO(nr) \ | |
| 127 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | |
| 128 | + PORT##nr##_IN) | |
| 129 | + | |
| 130 | +#define PORT_DATA_IO_PD(nr) \ | |
| 131 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | |
| 132 | + PORT##nr##_IN, PORT##nr##_IN_PD) | |
| 133 | + | |
| 134 | +#define PORT_DATA_IO_PU(nr) \ | |
| 135 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | |
| 136 | + PORT##nr##_IN, PORT##nr##_IN_PU) | |
| 137 | + | |
| 138 | +#define PORT_DATA_IO_PU_PD(nr) \ | |
| 139 | + PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | |
| 140 | + PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | |
| 141 | + | |
| 142 | + | |
| 107 | 143 | #endif /* __SH_PFC_H */ |