diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-02-13 18:41:57 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-07-29 09:17:46 -0400 |
commit | 3ce0d7eba042b186cdf9e50f53320240ae36cf6b (patch) | |
tree | 0d0949a87261e187416f630afafad652e9d35dff /drivers/pinctrl/sh-pfc | |
parent | 16b915e4389ba8f55df31b03d9de973a3d014cf7 (diff) |
sh-pfc: Pass the pin number down to the port function macro
The PORT_1 macro invokes a macro passed as a parameter. Pass the pin
number down to that macro at the bottom of the call stack. This will be
used to compute the pin ranges automatically.
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')
-rw-r--r-- | drivers/pinctrl/sh-pfc/sh_pfc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h index 005b48221145..596ceb7faf78 100644 --- a/drivers/pinctrl/sh-pfc/sh_pfc.h +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h | |||
@@ -229,7 +229,7 @@ struct sh_pfc_soc_info { | |||
229 | * PORT style (linear pin space) | 229 | * PORT style (linear pin space) |
230 | */ | 230 | */ |
231 | 231 | ||
232 | #define PORT_1(pn, fn, pfx, sfx) fn(pfx, sfx) | 232 | #define PORT_1(pn, fn, pfx, sfx) fn(pn, pfx, sfx) |
233 | 233 | ||
234 | #define PORT_10(pn, fn, pfx, sfx) \ | 234 | #define PORT_10(pn, fn, pfx, sfx) \ |
235 | PORT_1(pn, fn, pfx##0, sfx), PORT_1(pn+1, fn, pfx##1, sfx), \ | 235 | PORT_1(pn, fn, pfx##0, sfx), PORT_1(pn+1, fn, pfx##1, sfx), \ |
@@ -246,7 +246,7 @@ struct sh_pfc_soc_info { | |||
246 | PORT_10(pn+90, fn, pfx##9, sfx) | 246 | PORT_10(pn+90, fn, pfx##9, sfx) |
247 | 247 | ||
248 | /* PORT_ALL(suffix) - Expand to a list of PORT_#_suffix */ | 248 | /* PORT_ALL(suffix) - Expand to a list of PORT_#_suffix */ |
249 | #define _PORT_ALL(pfx, sfx) pfx##_##sfx | 249 | #define _PORT_ALL(pn, pfx, sfx) pfx##_##sfx |
250 | #define PORT_ALL(str) CPU_ALL_PORT(_PORT_ALL, PORT, str) | 250 | #define PORT_ALL(str) CPU_ALL_PORT(_PORT_ALL, PORT, str) |
251 | 251 | ||
252 | /* PINMUX_GPIO - Expand to a sh_pfc_pin entry */ | 252 | /* PINMUX_GPIO - Expand to a sh_pfc_pin entry */ |
@@ -267,7 +267,7 @@ struct sh_pfc_soc_info { | |||
267 | /* PINMUX_DATA_ALL - Expand to a list of PORT_name_DATA, PORT_name_FN0, | 267 | /* PINMUX_DATA_ALL - Expand to a list of PORT_name_DATA, PORT_name_FN0, |
268 | * PORT_name_OUT, PORT_name_IN marks | 268 | * PORT_name_OUT, PORT_name_IN marks |
269 | */ | 269 | */ |
270 | #define _PORT_DATA(pfx, sfx) \ | 270 | #define _PORT_DATA(pn, pfx, sfx) \ |
271 | PINMUX_DATA(PORT##pfx##_DATA, PORT##pfx##_FN0, \ | 271 | PINMUX_DATA(PORT##pfx##_DATA, PORT##pfx##_FN0, \ |
272 | PORT##pfx##_OUT, PORT##pfx##_IN) | 272 | PORT##pfx##_OUT, PORT##pfx##_IN) |
273 | #define PINMUX_DATA_ALL() CPU_ALL_PORT(_PORT_DATA, , unused) | 273 | #define PINMUX_DATA_ALL() CPU_ALL_PORT(_PORT_DATA, , unused) |