Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: m.szyprowski@samsung.com, kyungmin.park@samsung.com,
	kgene.kim@samsung.com, ben-linux@fluff.org,
	jy0922.shim@samsung.com
Subject: [PATCH 2/6] ARM: S5PC110: add support for gpio interrupts
Date: Mon, 06 Sep 2010 11:12:23 +0200	[thread overview]
Message-ID: <1283764347-460-3-git-send-email-m.szyprowski@samsung.com> (raw)
In-Reply-To: <1283764347-460-1-git-send-email-m.szyprowski@samsung.com>

S5PV210/S5PC110 series can use common s5p gpio interrupt code. This
patch adds required defines and code to make use of it.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 arch/arm/mach-s5pv210/gpiolib.c           |    6 +++++-
 arch/arm/mach-s5pv210/include/mach/irqs.h |    6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s5pv210/gpiolib.c b/arch/arm/mach-s5pv210/gpiolib.c
index 0d45911..29dfb89 100644
--- a/arch/arm/mach-s5pv210/gpiolib.c
+++ b/arch/arm/mach-s5pv210/gpiolib.c
@@ -150,6 +150,7 @@ static struct s3c_gpio_chip s5pv210_gpio_4bit[] = {
 			.label	= "GPG3",
 		},
 	}, {
+		.config	= &gpio_cfg_noint,
 		.chip	= {
 			.base	= S5PV210_GPI(0),
 			.ngpio	= S5PV210_GPIO_I_NR,
@@ -259,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 gpioint_group = 0;
 	int i = 0;
 
 	for (i = 0; i < nr_chips; i++, chip++) {
-		if (chip->config == NULL)
+		if (chip->config == NULL) {
 			chip->config = &gpio_cfg;
+			chip->group = gpioint_group++;
+		}
 		if (chip->base == NULL)
 			chip->base = S5PV210_BANK_BASE(i);
 	}
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h
index cdb8ae4..bb7f277 100644
--- a/arch/arm/mach-s5pv210/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
@@ -121,8 +121,12 @@
 #define S5P_EINT_BASE1		(S5P_IRQ_VIC0(0))
 #define S5P_EINT_BASE2		(IRQ_VIC_END + 1)
 
+/* GPIO interrupt */
+#define S5P_GPIOINT_BASE	(IRQ_EINT(31) + 1)
+#define S5P_GPIOINT_GROUP_MAXNR	22
+
 /* Set the default NR_IRQS */
-#define NR_IRQS			(IRQ_EINT(31) + 1)
+#define NR_IRQS			(IRQ_EINT(31) + S5P_GPIOINT_COUNT + 1)
 
 /* Compatibility */
 #define IRQ_LCD_FIFO		IRQ_LCD0
-- 
1.7.2.2

  parent reply	other threads:[~2010-09-06  9:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06  9:12 [PATCH v3] ARM: S5P: Add support for gpio interrupts Marek Szyprowski
2010-09-06  9:12 ` [PATCH 1/6] ARM: Samsung: Add common s5p gpio interrupt support Marek Szyprowski
2010-09-28 14:03   ` Kukjin Kim
2010-09-28 14:24     ` Marek Szyprowski
2010-09-28 14:43       ` Kyungmin Park
2010-09-30  7:12       ` [PATCH v4] " Marek Szyprowski
2010-09-30 13:29         ` Kukjin Kim
2010-09-30 13:47           ` Kyungmin Park
2010-09-06  9:12 ` Marek Szyprowski [this message]
2010-09-06  9:12 ` [PATCH 3/6] ARM: S5PC100: Use generic S5P gpio interrupts interface Marek Szyprowski
2010-09-06  9:12 ` [PATCH 4/6] ARM: S5PC100: Move external interrupt defines Marek Szyprowski
2010-09-10 12:00   ` Kukjin Kim
2010-09-21  5:16     ` Marek Szyprowski
2010-09-06  9:12 ` [PATCH 5/6] ARM: Samsung: Add common samsung_gpiolib_to_irq function Marek Szyprowski
2010-10-01  4:49   ` Kukjin Kim
2010-10-01  5:19     ` Marek Szyprowski
2010-09-06  9:12 ` [PATCH 6/6] ARM: S5PC110: GONI: Add support for QT602240 TS driver Marek Szyprowski
2010-10-04  9:22   ` [PATCH RESEND] " Marek Szyprowski
2010-10-04  9:40     ` Kukjin Kim
2010-09-29  6:49 ` [PATCH v3] ARM: S5P: Add support for gpio interrupts Kukjin Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283764347-460-3-git-send-email-m.szyprowski@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=ben-linux@fluff.org \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox