summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChethan Krishna N <chethan.krishna@stericsson.com>2011-09-05 15:28:17 +0530
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 16:05:56 +0200
commit4b7eaf5a13fcabcfc208359b68f9dcf4f90bcc46 (patch)
treef0230f2722a13bdbe4e6dd6d19d6dc5ed03c21ce
parent133b8f0ecb5bd13e19b0b7b6b2f2f3f38559c9da (diff)
board-u5500: correct pin behavior for db5500_keypad
correct pin enable disable behavior for db5500_keypad. Change-Id: Ic0b52ac6c52d66ece454541d350fb1d49813b62f Signed-off-by: Chethan Krishna N <chethan.krishna@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/27192 Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30088 Reviewed-by: Naga RADHESH Y <naga.radheshy@stericsson.com> Tested-by: Naga RADHESH Y <naga.radheshy@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-u5500.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c
index 44a00c4478f..15f53543461 100644
--- a/arch/arm/mach-ux500/board-u5500.c
+++ b/arch/arm/mach-ux500/board-u5500.c
@@ -246,13 +246,13 @@ static int db5500_set_gpio_row(int gpio)
{
int ret = -1;
- if (db5500_config)
- return ret;
- ret = gpio_request(gpio, "db5500_kpd");
- if (ret < 0) {
- pr_err("db5500_set_gpio_row: gpio request failed\n");
- return ret;
+ if (!db5500_config) {
+ ret = gpio_request(gpio, "db5500_kpd");
+ if (ret < 0) {
+ pr_err("db5500_set_gpio_row: gpio request failed\n");
+ return ret;
+ }
}
ret = gpio_direction_output(gpio, 1);
@@ -277,14 +277,12 @@ static int db5500_kp_init(void)
ret = db5500_set_gpio_row(db5500_kp_rows[i]);
if (ret < 0) {
pr_err("db5500_kp_init: failed init\n");
- ux500_pins_disable(pins);
return ret;
}
}
- BUG_ON(db5500_config);
-
- db5500_config = true;
+ if (!db5500_config)
+ db5500_config = true;
return 0;
}