From: Axel Lin <axel.lin@ingics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] gpio: omap_gpio: Fix valid gpio range for AM33XX
Date: Thu, 20 Jun 2013 23:26:56 +0800 [thread overview]
Message-ID: <1371742016.8005.5.camel@phoenix> (raw)
AM33XX has 4 gpio banks, thus the valid gpio range should be 0 ... 127.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/gpio/omap_gpio.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c
index a30d7f0..9aa6d41 100644
--- a/drivers/gpio/omap_gpio.c
+++ b/drivers/gpio/omap_gpio.c
@@ -55,7 +55,11 @@ static inline int get_gpio_index(int gpio)
int gpio_is_valid(int gpio)
{
+#if defined(CONFIG_AM33XX)
+ return (gpio >= 0) && (gpio < 128);
+#else
return (gpio >= 0) && (gpio < 192);
+#endif
}
static int check_gpio(int gpio)
--
1.8.1.2
next reply other threads:[~2013-06-20 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 15:26 Axel Lin [this message]
2013-06-20 15:35 ` [U-Boot] [PATCH] gpio: omap_gpio: Fix valid gpio range for AM33XX Tom Rini
2013-06-20 15:47 ` Stefan Roese
2013-06-20 19:42 ` Marek Vasut
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=1371742016.8005.5.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=u-boot@lists.denx.de \
/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