From patchwork Sat May 29 05:28:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cory Maccarrone X-Patchwork-Id: 103014 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4T5SiW1012535 for ; Sat, 29 May 2010 05:28:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751411Ab0E2F2t (ORCPT ); Sat, 29 May 2010 01:28:49 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:33300 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271Ab0E2F2s (ORCPT ); Sat, 29 May 2010 01:28:48 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so160874iwn.19 for ; Fri, 28 May 2010 22:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=8r5N/TvuVxNFPsd0X+bFjDJC/cN0JEUpsjZ9yFPJpnM=; b=dZ7L5YjKP5K11QKW3mu6zT302Au+j1Et7gaDZEaSJdgDhFw0F7EiWraeL2+CaGrk0R +MgbiPw/XkeGs83LcvejOU9vpXCmHknz2iVjHqfcK618VCUnvh3qcnUXzYOxOVw+E7Bw v7jzpmal3fCFta/gGROQZ4y6eEloC7zucqM9Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=utg7it5R/RUl3F8ukqbEDjGyiDD0z8akP2atpgfmVKjPmUAzp0AnItnY3QzkYCMwNg kvjpmf6I0zYOfQDRJEn/OTUl931K+vSPKQx0SbPM5qxmLmjFMSbYNxcXeYb1Is7Shuo7 RY5fjOfQzUMEtqfzDPiAtOL3gIUCL0lVDl0zU= Received: by 10.231.158.203 with SMTP id g11mr1667605ibx.24.1275110928522; Fri, 28 May 2010 22:28:48 -0700 (PDT) Received: from localhost (97-126-104-191.tukw.qwest.net [97.126.104.191]) by mx.google.com with ESMTPS id a8sm14341019ibi.23.2010.05.28.22.28.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 28 May 2010 22:28:48 -0700 (PDT) From: Cory Maccarrone To: linux-omap@vger.kernel.org Cc: linwizard-devel@lists.sf.net, Cory Maccarrone Subject: [PATCH 2/4] [OMAP] gpio: Allow for extended GPIO space Date: Fri, 28 May 2010 22:28:05 -0700 Message-Id: <1275110887-2918-3-git-send-email-darkstar6262@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1275110887-2918-1-git-send-email-darkstar6262@gmail.com> References: <1275110887-2918-1-git-send-email-darkstar6262@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 29 May 2010 05:28:50 +0000 (UTC) diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index 78b49a6..52f61f6 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -2,6 +2,24 @@ if ARCH_OMAP menu "TI OMAP Implementations" +config OMAP_GPIO_EXTRA + int + default 128 if OMAP_GPIO_EXTRA128 + default 64 if OMAP_GPIO_EXTRA64 + default 0 + +config OMAP_GPIO_EXTRA64 + bool + help + Add an extra 64 gpio numbers to the available GPIO pool. This is + available for boards that need extra gpios for external devices. + +config OMAP_GPIO_EXTRA128 + bool + help + Add an extra 128 gpio numbers to the available GPIO pool. This is + available for boards that need extra gpios for external devices. + config ARCH_OMAP_OTG bool diff --git a/arch/arm/plat-omap/include/plat/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index de1c604..d21b790 100644 --- a/arch/arm/plat-omap/include/plat/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h @@ -86,6 +86,13 @@ extern void omap_gpio_restore_context(void); * The original OMAP-specfic calls should eventually be removed. */ +/* + * Some boards require extra gpio capacity to support external + * devices that need GPIO. + */ + +#define ARCH_NR_GPIOS (256 + CONFIG_OMAP_GPIO_EXTRA) + #include #include