[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131217023755.24573.96747.sendpatchset@w520>
Date: Tue, 17 Dec 2013 11:37:55 +0900
From: Magnus Damm <magnus.damm@...il.com>
To: linux-kernel@...r.kernel.org
Cc: linux-sh@...r.kernel.org, linus.walleij@...aro.org,
wsa@...-dreams.de, horms@...ge.net.au,
laurent.pinchart@...asonboard.com,
Magnus Damm <magnus.damm@...il.com>
Subject: [PATCH 01/05 v2] pinctrl: sh-pfc: Rework _GP_GPIO, introduce _GP_GPIO32
From: Magnus Damm <damm@...nsource.se>
Rework _GP_GPIO to take banksize as argument, introduce
_GP_GPIO32 for SoCs with 32-bit GPIO banks.
Signed-off-by: Magnus Damm <damm@...nsource.se>
---
Developed on top of renesas git tag renesas-devel-v3.13-rc3-20131214v2
drivers/pinctrl/sh-pfc/sh_pfc.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- 0001/drivers/pinctrl/sh-pfc/sh_pfc.h
+++ work/drivers/pinctrl/sh-pfc/sh_pfc.h 2013-12-16 19:35:12.000000000 +0900
@@ -214,13 +214,14 @@ struct sh_pfc_soc_info {
#define GP_ALL(str) CPU_ALL_PORT(_GP_ALL, str)
/* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */
-#define _GP_GPIO(bank, _pin, _name, sfx) \
- [(bank * 32) + _pin] = { \
- .pin = (bank * 32) + _pin, \
+#define _GP_GPIO(banksize, bank, _pin, _name, sfx) \
+ [(bank * banksize) + _pin] = { \
+ .pin = (bank * banksize) + _pin, \
.name = __stringify(_name), \
.enum_id = _name##_DATA, \
}
-#define PINMUX_GPIO_GP_ALL() CPU_ALL_PORT(_GP_GPIO, unused)
+#define _GP_GPIO32(bank, _pin, _name, sfx) _GP_GPIO(32, bank, _pin, _name, sfx)
+#define PINMUX_GPIO_GP_ALL() CPU_ALL_PORT(_GP_GPIO32, unused)
/* PINMUX_DATA_GP_ALL - Expand to a list of name_DATA, name_FN marks */
#define _GP_DATA(bank, pin, name, sfx) PINMUX_DATA(name##_DATA, name##_FN)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists