Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 //
0003 // Copyright (c) 2010 Samsung Electronics Co., Ltd.
0004 //      http://www.samsung.com/
0005 //
0006 // GPIO configuration for S3C64XX KeyPad device
0007 
0008 #include <linux/gpio.h>
0009 #include "gpio-cfg.h"
0010 #include "keypad.h"
0011 #include "gpio-samsung.h"
0012 
0013 void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
0014 {
0015     /* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */
0016     s3c_gpio_cfgrange_nopull(S3C64XX_GPK(8), rows, S3C_GPIO_SFN(3));
0017 
0018     /* Set all the necessary GPL pins to special-function 3: KP_COL[x] */
0019     s3c_gpio_cfgrange_nopull(S3C64XX_GPL(0), cols, S3C_GPIO_SFN(3));
0020 }