171b9114dSArnd Bergmann // SPDX-License-Identifier: GPL-2.0
271b9114dSArnd Bergmann //
371b9114dSArnd Bergmann // Copyright (c) 2010 Samsung Electronics Co., Ltd.
471b9114dSArnd Bergmann //		http://www.samsung.com/
571b9114dSArnd Bergmann //
671b9114dSArnd Bergmann // GPIO configuration for S3C64XX KeyPad device
771b9114dSArnd Bergmann 
871b9114dSArnd Bergmann #include <linux/gpio.h>
9c6ff132dSArnd Bergmann #include "gpio-cfg.h"
10c6ff132dSArnd Bergmann #include "keypad.h"
11c6ff132dSArnd Bergmann #include "gpio-samsung.h"
1271b9114dSArnd Bergmann 
samsung_keypad_cfg_gpio(unsigned int rows,unsigned int cols)1371b9114dSArnd Bergmann void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols)
1471b9114dSArnd Bergmann {
1571b9114dSArnd Bergmann 	/* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */
1671b9114dSArnd Bergmann 	s3c_gpio_cfgrange_nopull(S3C64XX_GPK(8), rows, S3C_GPIO_SFN(3));
1771b9114dSArnd Bergmann 
1871b9114dSArnd Bergmann 	/* Set all the necessary GPL pins to special-function 3: KP_COL[x] */
1971b9114dSArnd Bergmann 	s3c_gpio_cfgrange_nopull(S3C64XX_GPL(0), cols, S3C_GPIO_SFN(3));
2071b9114dSArnd Bergmann }
21