Skip to content

Commit 0fffed2

Browse files
Joonyoung Shimdtor
authored andcommitted
Input: samsung-keypad - Add samsung keypad driver
This patch adds support for keypad driver running on Samsung cpus. This driver is tested on GONI and Aquila board using S5PC110 cpu. [ch.naveen@samsung.com: tested on SMDK6410, SMDKC100, and SMDKV210] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Tested-by: Naveen Krishna Ch <ch.naveen@samsung.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 parent 1ca56e5 commit 0fffed2

4 files changed

Lines changed: 544 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Samsung Platform - Keypad platform data definitions
3+
*
4+
* Copyright (C) 2010 Samsung Electronics Co.Ltd
5+
* Author: Joonyoung Shim <jy0922.shim@samsung.com>
6+
*
7+
* This program is free software; you can redistribute it and/or modify it
8+
* under the terms of the GNU General Public License as published by the
9+
* Free Software Foundation; either version 2 of the License, or (at your
10+
* option) any later version.
11+
*/
12+
13+
#ifndef __PLAT_SAMSUNG_KEYPAD_H
14+
#define __PLAT_SAMSUNG_KEYPAD_H
15+
16+
#include <linux/input/matrix_keypad.h>
17+
18+
#define SAMSUNG_MAX_ROWS 8
19+
#define SAMSUNG_MAX_COLS 8
20+
21+
/**
22+
* struct samsung_keypad_platdata - Platform device data for Samsung Keypad.
23+
* @keymap_data: pointer to &matrix_keymap_data.
24+
* @rows: number of keypad row supported.
25+
* @cols: number of keypad col supported.
26+
* @no_autorepeat: disable key autorepeat.
27+
* @wakeup: controls whether the device should be set up as wakeup source.
28+
* @cfg_gpio: configure the GPIO.
29+
*
30+
* Initialisation data specific to either the machine or the platform
31+
* for the device driver to use or call-back when configuring gpio.
32+
*/
33+
struct samsung_keypad_platdata {
34+
const struct matrix_keymap_data *keymap_data;
35+
unsigned int rows;
36+
unsigned int cols;
37+
bool no_autorepeat;
38+
bool wakeup;
39+
40+
void (*cfg_gpio)(unsigned int rows, unsigned int cols);
41+
};
42+
43+
#endif /* __PLAT_SAMSUNG_KEYPAD_H */

‎drivers/input/keyboard/Kconfig‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,15 @@ config KEYBOARD_PXA930_ROTARY
354354
To compile this driver as a module, choose M here: the
355355
module will be called pxa930_rotary.
356356

357+
config KEYBOARD_SAMSUNG
358+
tristate "Samsung keypad support"
359+
depends on SAMSUNG_DEV_KEYPAD
360+
help
361+
Say Y here if you want to use the Samsung keypad.
362+
363+
To compile this driver as a module, choose M here: the
364+
module will be called samsung-keypad.
365+
357366
config KEYBOARD_STOWAWAY
358367
tristate "Stowaway keyboard"
359368
select SERIO

‎drivers/input/keyboard/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ obj-$(CONFIG_KEYBOARD_OPENCORES) += opencores-kbd.o
3333
obj-$(CONFIG_KEYBOARD_PXA27x) += pxa27x_keypad.o
3434
obj-$(CONFIG_KEYBOARD_PXA930_ROTARY) += pxa930_rotary.o
3535
obj-$(CONFIG_KEYBOARD_QT2160) += qt2160.o
36+
obj-$(CONFIG_KEYBOARD_SAMSUNG) += samsung-keypad.o
3637
obj-$(CONFIG_KEYBOARD_SH_KEYSC) += sh_keysc.o
3738
obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
3839
obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o

0 commit comments

Comments
 (0)