From 2c3c1048746a4622d8c89a29670120dc8fab93c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:45 +0200 Subject: Adding upstream version 6.1.76. Signed-off-by: Daniel Baumann --- arch/arm/mach-s3c/setup-keypad-s3c64xx.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 arch/arm/mach-s3c/setup-keypad-s3c64xx.c (limited to 'arch/arm/mach-s3c/setup-keypad-s3c64xx.c') diff --git a/arch/arm/mach-s3c/setup-keypad-s3c64xx.c b/arch/arm/mach-s3c/setup-keypad-s3c64xx.c new file mode 100644 index 000000000..8463ad37c --- /dev/null +++ b/arch/arm/mach-s3c/setup-keypad-s3c64xx.c @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0 +// +// Copyright (c) 2010 Samsung Electronics Co., Ltd. +// http://www.samsung.com/ +// +// GPIO configuration for S3C64XX KeyPad device + +#include +#include "gpio-cfg.h" +#include "keypad.h" +#include "gpio-samsung.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_cfgrange_nopull(S3C64XX_GPK(8), rows, S3C_GPIO_SFN(3)); + + /* Set all the necessary GPL pins to special-function 3: KP_COL[x] */ + s3c_gpio_cfgrange_nopull(S3C64XX_GPL(0), cols, S3C_GPIO_SFN(3)); +} -- cgit v1.2.3