diff options
| author | Axel Lin <[email protected]> | 2013-06-21 18:54:25 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2013-07-02 09:21:16 -0400 |
| commit | 87bd05d78f0f5765f3d3e1517c76794c82dab7cc (patch) | |
| tree | 197ab65403287f349ab82a37184be5d00dc1295d /drivers | |
| parent | e3f53104e234c3133e646ec644d6ca72223e1ffb (diff) | |
ARM: OMAP: GPIO: Fix valid range and enable usage of all GPIOs on OMAP5
The omap_gpio driver is used by AM33XX, OMAP3/4, OMAP54XX and DRA7XX SoCs.
These SoCs have different gpio count but currently omap_gpio driver uses hard
coded 192 which is wrong.
This patch fixes this issue by:
1. Move define of OMAP_MAX_GPIO to all arch/arm/include/asm/arch-omap*/gpio.h.
2. Update gpio bank settings and enable GPIO modules 7 & 8 clocks for OMAP5.
Thanks for Lubomir Popov to provide valuable comments to fix this issue.
Signed-off-by: Axel Lin <[email protected]>
Tested-by: Lubomir Popov <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpio/omap_gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index a30d7f0603e..f16e9ae4d2b 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -55,7 +55,7 @@ static inline int get_gpio_index(int gpio) int gpio_is_valid(int gpio) { - return (gpio >= 0) && (gpio < 192); + return (gpio >= 0) && (gpio < OMAP_MAX_GPIO); } static int check_gpio(int gpio) |
