From patchwork Tue Jul 20 04:05:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cory Maccarrone X-Patchwork-Id: 112949 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6K46G67018955 for ; Tue, 20 Jul 2010 04:06:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750786Ab0GTEGJ (ORCPT ); Tue, 20 Jul 2010 00:06:09 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:55711 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743Ab0GTEGI (ORCPT ); Tue, 20 Jul 2010 00:06:08 -0400 Received: by iwn7 with SMTP id 7so5352484iwn.19 for ; Mon, 19 Jul 2010 21:06:07 -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=UIeQgkUx18fPoG/OoLrRqnNVF9n83zIb9Jk/d6xrWxU=; b=ZchgIcZO+P6EBo6cEmTOl6deVQx9dpuEKraB3WdWYqVT4AITHVynqyIadxXQYNr9qv suuHx/qLh99homb5FqqHya8g5ovP/hmXvaHgTAooRLwZg03niCjOkWRbmY7RsaOuJOwy PGkLmuQhnpYjmi1isCpUx7O67emDCuvSjAVrY= 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=oMdxLSwhQ1CQ+8yT5Eag3WkxRVpYAUKpWP+wu2AnS76HzB4fDZc3+XyT9IlnQ19xDG oors9r5Hekla7AzgfyVy3acn+5Krl3Cbmjwue4SevYrMo3VoE6L5KfdOPiEiEHgmkO3j 6yoGZ4jOeujR4fscuN5/4jU/wdfb8ifRBUTqo= Received: by 10.231.156.66 with SMTP id v2mr6570035ibw.107.1279598766418; Mon, 19 Jul 2010 21:06:06 -0700 (PDT) Received: from localhost ([12.130.106.87]) by mx.google.com with ESMTPS id r3sm27094861ibk.19.2010.07.19.21.06.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 19 Jul 2010 21:06:05 -0700 (PDT) From: Cory Maccarrone To: linux-omap@vger.kernel.org Cc: Cory Maccarrone Subject: [PATCH 1/7] [OMAP] gpio: Allow for extended GPIO space Date: Mon, 19 Jul 2010 21:05:35 -0700 Message-Id: <1279598741-18607-2-git-send-email-darkstar6262@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1279598741-18607-1-git-send-email-darkstar6262@gmail.com> References: <1279598741-18607-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]); Tue, 20 Jul 2010 04:06:16 +0000 (UTC) diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index e2ed952..5bc7a79 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig @@ -2,6 +2,24 @@ if ARCH_OMAP menu "TI OMAP Common Features" +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