android_kernel_asus_sm8350/arch/arm/mach-s3c64xx/setup-keypad.c
Kukjin Kim aef698a72f ARM: S3C64XX: 2nd Change to using s3c_gpio_cfgall_range()
This patch changes the code setting range of GPIO pins' configuration and
pull state to use the recently introduced s3c_gpio_cfgpin_range().
NOTE: This is for missed things from the previous patch.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2010-10-23 11:50:47 +09:00

26 lines
828 B
C

/* linux/arch/arm/mach-s3c64xx/setup-keypad.c
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*
* GPIO configuration for S3C64XX KeyPad device
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/gpio.h>
#include <plat/gpio-cfg.h>
void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
{
/* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */
s3c_gpio_cfgall_range(S3C64XX_GPK(8), 8 + rows,
S3C_GPIO_SFN(3), S3C_GPIO_PULL_NONE);
/* Set all the necessary GPL pins to special-function 3: KP_COL[x] */
s3c_gpio_cfgall_range(S3C64XX_GPL(0), cols,
S3C_GPIO_SFN(3), S3C_GPIO_PULL_NONE);
}