1*71b9114dSArnd Bergmann // SPDX-License-Identifier: GPL-2.0 2*71b9114dSArnd Bergmann // 3*71b9114dSArnd Bergmann // Copyright (c) 2010 Samsung Electronics Co., Ltd. 4*71b9114dSArnd Bergmann // http://www.samsung.com/ 5*71b9114dSArnd Bergmann // 6*71b9114dSArnd Bergmann // GPIO configuration for S3C64XX KeyPad device 7*71b9114dSArnd Bergmann 8*71b9114dSArnd Bergmann #include <linux/gpio.h> 9*71b9114dSArnd Bergmann #include <plat/gpio-cfg.h> 10*71b9114dSArnd Bergmann #include <plat/keypad.h> 11*71b9114dSArnd Bergmann #include <mach/gpio-samsung.h> 12*71b9114dSArnd Bergmann 13*71b9114dSArnd Bergmann void samsung_keypad_cfg_gpio(unsigned int rows, unsigned int cols) 14*71b9114dSArnd Bergmann { 15*71b9114dSArnd Bergmann /* Set all the necessary GPK pins to special-function 3: KP_ROW[x] */ 16*71b9114dSArnd Bergmann s3c_gpio_cfgrange_nopull(S3C64XX_GPK(8), rows, S3C_GPIO_SFN(3)); 17*71b9114dSArnd Bergmann 18*71b9114dSArnd Bergmann /* Set all the necessary GPL pins to special-function 3: KP_COL[x] */ 19*71b9114dSArnd Bergmann s3c_gpio_cfgrange_nopull(S3C64XX_GPL(0), cols, S3C_GPIO_SFN(3)); 20*71b9114dSArnd Bergmann } 21