Skip to contentSkip to conversation

ARM: S5PC110: Assign the group number for GPIOs

PATCH New Kyungmin Park 1 participant 1 message Aug 5, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 5/5 ARM: S5PC110: Assign the group number for GPIOs

From: Kyungmin Park <[email protected]>

With this, it can calculate the proper GPIOs offset when support the GPIO interrupt.

---
 arch/arm/mach-s5pv210/gpiolib.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-s5pv210/gpiolib.c +5 -2
index 94d4fe2..ffb0d0d 100644
@@ -260,11 +260,14 @@ static __init int s5pv210_gpiolib_init(void)
 {
 	struct s3c_gpio_chip *chip = s5pv210_gpio_4bit;
 	int nr_chips = ARRAY_SIZE(s5pv210_gpio_4bit);
-	int i, extint = 0;
+	int i, extint = 0, group = 0;
 
 	for (i = 0; i < nr_chips; i++, chip++) {
-		if (chip->config == NULL)
+		if (chip->config == NULL) {
 			chip->config = &gpio_cfg;
+			/* Assign the GPIO interrupt group number */
+			chip->group = group++;
+		}
 		if (chip->config == &gpio_cfg_extint) {
 			chip->base = S5PV210_BANK_BASE(extint) + EXTINT_OFFSET;
 			/* Assign the external GPIO interrupt group number */
Signature · 1 line
1.5.3.3