public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	Paul Mundt <lethal@linux-sh.org>,
	Magnus Damm <magnus.damm@gmail.com>,
	Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Kukjin Kim <kgene.kim@samsung.com>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	David Brown <davidb@codeaurora.org>,
	Rabin Vincent <rabin.vincent@stericsson.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-sh@vger.kernel.org>
Subject: [PATCH 1/3] ARM: ARCH_NR_GPIO: Make ARCH_NR_GPIO a Kconfig variable
Date: Thu, 3 Nov 2011 19:00:45 +0200	[thread overview]
Message-ID: <1320339647-30255-2-git-send-email-pdeschrijver@nvidia.com> (raw)
In-Reply-To: <1320339647-30255-1-git-send-email-pdeschrijver@nvidia.com>

Change ARCH_NR_GPIO into a Kconfig variable as suggested by Russel King. This
makes ARCH_NR_GPIO single zImage friendly. The default value for tegra is
defined as well.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
 arch/arm/Kconfig            |    9 +++++++++
 arch/arm/include/asm/gpio.h |    4 ++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7e8ffe7..924f685 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1507,6 +1507,15 @@ config LOCAL_TIMERS
 	  accounting to be spread across the timer interval, preventing a
 	  "thundering herd" at every timer tick.
 
+config ARCH_NR_GPIO
+	int
+	default 1024 if ARCH_TEGRA
+	default 0
+	help
+	  Maximum number of GPIOs in the system.
+
+	  If unsure, leave the default value.
+
 source kernel/Kconfig.preempt
 
 config HZ
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
index 11ad0bf..7151753 100644
--- a/arch/arm/include/asm/gpio.h
+++ b/arch/arm/include/asm/gpio.h
@@ -1,6 +1,10 @@
 #ifndef _ARCH_ARM_GPIO_H
 #define _ARCH_ARM_GPIO_H
 
+#if CONFIG_ARCH_NR_GPIO > 0
+#define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO
+#endif
+
 /* not all ARM platforms necessarily support this API ... */
 #include <mach/gpio.h>
 
-- 
1.7.7.rc0.72.g4b5ea.dirty


  reply	other threads:[~2011-11-03 17:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 17:00 [PATCH 0/3] Change ARCH_NR_GPIO into a Kconfig variable Peter De Schrijver
2011-11-03 17:00 ` Peter De Schrijver [this message]
2011-11-03 17:00 ` [PATCH 2/3] ARM: mach-shmobile: Use CONFIG_ARCH_NR_GPIO Peter De Schrijver
2011-11-03 17:00 ` [PATCH 3/3] ARM: mach-ux500 " Peter De Schrijver
2011-11-03 22:16 ` [PATCH 0/3] Change ARCH_NR_GPIO into a Kconfig variable Mike Frysinger
2011-11-03 22:44   ` Russell King - ARM Linux
2011-11-03 23:07     ` Mike Frysinger
2011-11-03 23:12       ` Mike Frysinger
2011-11-03 23:17       ` Russell King - ARM Linux
2011-11-04  2:05         ` Mike Frysinger
2011-11-29  6:46 ` Peter De Schrijver
2011-11-29  8:40   ` Linus Walleij
2011-11-29  9:15     ` Russell King - ARM Linux

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=1320339647-30255-2-git-send-email-pdeschrijver@nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=davidb@codeaurora.org \
    --cc=hsweeten@visionengravers.com \
    --cc=kgene.kim@samsung.com \
    --cc=lethal@linux-sh.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=magnus.damm@gmail.com \
    --cc=rabin.vincent@stericsson.com \
    --cc=srinidhi.kasagar@stericsson.com \
    /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