diff options
Diffstat (limited to 'arch/arm/mach-s3c64xx/setup-keypad.c')
-rw-r--r-- | arch/arm/mach-s3c64xx/setup-keypad.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/arm/mach-s3c64xx/setup-keypad.c b/arch/arm/mach-s3c64xx/setup-keypad.c index abc34e4e1a93..cc9b09c335f3 100644 --- a/arch/arm/mach-s3c64xx/setup-keypad.c +++ b/arch/arm/mach-s3c64xx/setup-keypad.c | |||
@@ -15,20 +15,11 @@ | |||
15 | 15 | ||
16 | void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) | 16 | void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) |
17 | { | 17 | { |
18 | unsigned int gpio; | ||
19 | unsigned int end; | ||
20 | |||
21 | /* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */ | 18 | /* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */ |
22 | end = S3C64XX_GPK(8 + rows); | 19 | s3c_gpio_cfgall_range(S3C64XX_GPK(8), 8 + rows, |
23 | for (gpio = S3C64XX_GPK(8); gpio < end; gpio++) { | 20 | S3C_GPIO_SFN(3), S3C_GPIO_PULL_NONE); |
24 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); | ||
25 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
26 | } | ||
27 | 21 | ||
28 | /* Set all the necessary GPL pins to special-function 3: KP_COL[x] */ | 22 | /* Set all the necessary GPL pins to special-function 3: KP_COL[x] */ |
29 | end = S3C64XX_GPL(0 + cols); | 23 | s3c_gpio_cfgall_range(S3C64XX_GPL(0), cols, |
30 | for (gpio = S3C64XX_GPL(0); gpio < end; gpio++) { | 24 | S3C_GPIO_SFN(3), S3C_GPIO_PULL_NONE); |
31 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(3)); | ||
32 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
33 | } | ||
34 | } | 25 | } |