mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "First round of updates for the input subsystem. You will get a new touchsreen driver for Cypress 4th generation devices, a driver for a special controller implementing PS/2 protocol in OLPC devices, and a driver for power key for SiRFprimaII PWRC. HID and bcm5497 now support for the 2013 MacBook Air. EVIOCGKEY and the rest of evdev ioctls now flush events of matching type from the client's event queue so that clients can be sure any events received after issuing EVIOCG* ioctl are new events. And a host of cleanups and improvements in other drivers" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits) Input: cyttsp4 - kfree xfer_buf on error path in probe() Input: tps6507x-ts - select INPUT_POLLDEV Input: bcm5974 - add support for the 2013 MacBook Air HID: apple: Add support for the 2013 Macbook Air Input: cyttsp4 - leak on error path in probe() Input: cyttsp4 - silence NULL dereference warning Input: cyttsp4 - silence shift wrap warning Input: tps6507x-ts - convert to polled input device infrastructure ARM: davinci: da850-evm: remove vref from touchscreen platform data Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices Input: cyttsp4 - I2C driver for Cypress TMA4XX touchscreen devices Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devices Input: cyttsp - I2C driver split into two modules Input: add OLPC AP-SP driver Input: nspire-keypad - remove redundant dev_err call in nspire_keypad_probe() Input: tps6507x-ts - remove vref from platform data Input: tps6507x-ts - use bool for booleans Input: tps6507x-ts - remove bogus unreachable code Input: samsung-keypad - let device core setup the default pin configuration Input: wacom_i2c - implement hovering capability ...
This commit is contained in:
commit
f5b63ac0f7
105 files changed
+4795
-514
No files matched your search
@@ -0,0 +1,60 @@
|
||||
* Marvell PXA Keypad controller
|
||||
|
||||
Required Properties
|
||||
- compatible : should be "marvell,pxa27x-keypad"
|
||||
- reg : Address and length of the register set for the device
|
||||
- interrupts : The interrupt for the keypad controller
|
||||
- marvell,debounce-interval : How long time the key will be
|
||||
recognized when it is pressed. It is a u32 value, and bit[31:16]
|
||||
is debounce interval for direct key and bit[15:0] is debounce
|
||||
interval for matrix key. The value is in binary number of 2ms
|
||||
|
||||
Optional Properties For Matrix Keyes
|
||||
Please refer to matrix-keymap.txt
|
||||
|
||||
Optional Properties for Direct Keyes
|
||||
- marvell,direct-key-count : How many direct keyes are used.
|
||||
- marvell,direct-key-mask : The mask indicates which keyes
|
||||
are used. If bit[X] of the mask is set, the direct key X
|
||||
is used.
|
||||
- marvell,direct-key-low-active : Direct key status register
|
||||
tells the level of pins that connects to the direct keyes.
|
||||
When this property is set, it means that when the pin level
|
||||
is low, the key is pressed(active).
|
||||
- marvell,direct-key-map : It is a u16 array. Each item indicates
|
||||
the linux key-code for the direct key.
|
||||
|
||||
Optional Properties For Rotary
|
||||
- marvell,rotary0 : It is a u32 value. Bit[31:16] is the
|
||||
linux key-code for rotary up. Bit[15:0] is the linux key-code
|
||||
for rotary down. It is for rotary 0.
|
||||
- marvell,rotary1 : Same as marvell,rotary0. It is for rotary 1.
|
||||
- marvell,rotary-rel-key : When rotary is used for relative axes
|
||||
in the device, the value indicates the key-code for relative
|
||||
axes measurement in the device. It is a u32 value. Bit[31:16]
|
||||
is for rotary 1, and Bit[15:0] is for rotary 0.
|
||||
|
||||
Examples:
|
||||
keypad: keypad@d4012000 {
|
||||
keypad,num-rows = <3>;
|
||||
keypad,num-columns = <5>;
|
||||
linux,keymap = <0x0000000e /* KEY_BACKSPACE */
|
||||
0x0001006b /* KEY_END */
|
||||
0x00020061 /* KEY_RIGHTCTRL */
|
||||
0x0003000b /* KEY_0 */
|
||||
0x00040002 /* KEY_1 */
|
||||
0x0100008b /* KEY_MENU */
|
||||
0x01010066 /* KEY_HOME */
|
||||
0x010200e7 /* KEY_SEND */
|
||||
0x01030009 /* KEY_8 */
|
||||
0x0104000a /* KEY_9 */
|
||||
0x02000160 /* KEY_OK */
|
||||
0x02010003 /* KEY_2 */
|
||||
0x02020004 /* KEY_3 */
|
||||
0x02030005 /* KEY_4 */
|
||||
0x02040006>; /* KEY_5 */
|
||||
marvell,rotary0 = <0x006c0067>; /* KEY_UP & KEY_DOWN */
|
||||
marvell,direct-key-count = <1>;
|
||||
marvell,direct-key-map = <0x001c>;
|
||||
marvell,debounce-interval = <0x001e001e>;
|
||||
};
|
||||
@@ -25,14 +25,6 @@ Required Board Specific Properties:
|
||||
- samsung,keypad-num-columns: Number of column lines connected to the
|
||||
keypad controller.
|
||||
|
||||
- row-gpios: List of gpios used as row lines. The gpio specifier for
|
||||
this property depends on the gpio controller to which these row lines
|
||||
are connected.
|
||||
|
||||
- col-gpios: List of gpios used as column lines. The gpio specifier for
|
||||
this property depends on the gpio controller to which these column
|
||||
lines are connected.
|
||||
|
||||
- Keys represented as child nodes: Each key connected to the keypad
|
||||
controller is represented as a child node to the keypad controller
|
||||
device node and should include the following properties.
|
||||
@@ -41,6 +33,9 @@ Required Board Specific Properties:
|
||||
- linux,code: the key-code to be reported when the key is pressed
|
||||
and released.
|
||||
|
||||
- pinctrl-0: Should specify pin control groups used for this controller.
|
||||
- pinctrl-names: Should contain only one value - "default".
|
||||
|
||||
Optional Properties specific to linux:
|
||||
- linux,keypad-no-autorepeat: do no enable autorepeat feature.
|
||||
- linux,keypad-wakeup: use any event on keypad as wakeup event.
|
||||
@@ -56,17 +51,8 @@ Example:
|
||||
linux,input-no-autorepeat;
|
||||
linux,input-wakeup;
|
||||
|
||||
row-gpios = <&gpx2 0 3 3 0
|
||||
&gpx2 1 3 3 0>;
|
||||
|
||||
col-gpios = <&gpx1 0 3 0 0
|
||||
&gpx1 1 3 0 0
|
||||
&gpx1 2 3 0 0
|
||||
&gpx1 3 3 0 0
|
||||
&gpx1 4 3 0 0
|
||||
&gpx1 5 3 0 0
|
||||
&gpx1 6 3 0 0
|
||||
&gpx1 7 3 0 0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&keypad_rows &keypad_columns>;
|
||||
|
||||
key_1 {
|
||||
keypad,row = <0>;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
TI-NSPIRE Keypad
|
||||
|
||||
Required properties:
|
||||
- compatible: Compatible property value should be "ti,nspire-keypad".
|
||||
|
||||
- reg: Physical base address of the peripheral and length of memory mapped
|
||||
region.
|
||||
|
||||
- interrupts: The interrupt number for the peripheral.
|
||||
|
||||
- scan-interval: How often to scan in us. Based on a APB speed of 33MHz, the
|
||||
maximum and minimum delay time is ~2000us and ~500us respectively
|
||||
|
||||
- row-delay: How long to wait before scanning each row.
|
||||
|
||||
- clocks: The clock this peripheral is attached to.
|
||||
|
||||
- linux,keymap: The keymap to use
|
||||
(see Documentation/devicetree/bindings/input/matrix-keymap.txt)
|
||||
|
||||
Optional properties:
|
||||
- active-low: Specify that the keypad is active low (i.e. logical low signifies
|
||||
a key press).
|
||||
|
||||
Example:
|
||||
|
||||
input {
|
||||
compatible = "ti,nspire-keypad";
|
||||
reg = <0x900E0000 0x1000>;
|
||||
interrupts = <16>;
|
||||
|
||||
scan-interval = <1000>;
|
||||
row-delay = <200>;
|
||||
|
||||
clocks = <&apb_pclk>;
|
||||
|
||||
linux,keymap = <
|
||||
0x0000001c 0x0001001c 0x00040039
|
||||
0x0005002c 0x00060015 0x0007000b
|
||||
0x0008000f 0x0100002d 0x01010011
|
||||
0x0102002f 0x01030004 0x01040016
|
||||
0x01050014 0x0106001f 0x01070002
|
||||
0x010a006a 0x02000013 0x02010010
|
||||
0x02020019 0x02030007 0x02040018
|
||||
0x02050031 0x02060032 0x02070005
|
||||
0x02080028 0x0209006c 0x03000026
|
||||
0x03010025 0x03020024 0x0303000a
|
||||
0x03040017 0x03050023 0x03060022
|
||||
0x03070008 0x03080035 0x03090069
|
||||
0x04000021 0x04010012 0x04020020
|
||||
0x0404002e 0x04050030 0x0406001e
|
||||
0x0407000d 0x04080037 0x04090067
|
||||
0x05010038 0x0502000c 0x0503001b
|
||||
0x05040034 0x0505001a 0x05060006
|
||||
0x05080027 0x0509000e 0x050a006f
|
||||
0x0600002b 0x0602004e 0x06030068
|
||||
0x06040003 0x0605006d 0x06060009
|
||||
0x06070001 0x0609000f 0x0708002a
|
||||
0x0709001d 0x070a0033 >;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
OLPC AP-SP serio interface
|
||||
|
||||
Required properties:
|
||||
- compatible : "olpc,ap-sp"
|
||||
- reg : base address and length of SoC's WTM registers
|
||||
- interrupts : SP-AP interrupt
|
||||
|
||||
Example:
|
||||
ap-sp@d4290000 {
|
||||
compatible = "olpc,ap-sp";
|
||||
reg = <0xd4290000 0x1000>;
|
||||
interrupts = <40>;
|
||||
}
|
||||
@@ -80,6 +80,8 @@ Userspace can detect that a driver can report more total contacts than slots
|
||||
by noting that the largest supported BTN_TOOL_*TAP event is larger than the
|
||||
total number of type B slots reported in the absinfo for the ABS_MT_SLOT axis.
|
||||
|
||||
The minimum value of the ABS_MT_SLOT axis must be 0.
|
||||
|
||||
Protocol Example A
|
||||
------------------
|
||||
|
||||
|
||||
@@ -985,7 +985,6 @@ static struct regulator_init_data tps65070_regulator_data[] = {
|
||||
static struct touchscreen_init_data tps6507x_touchscreen_data = {
|
||||
.poll_period = 30, /* ms between touch samples */
|
||||
.min_pressure = 0x30, /* minimum pressure to trigger touch */
|
||||
.vref = 0, /* turn off vref when not using A/D */
|
||||
.vendor = 0, /* /sys/class/input/input?/id/vendor */
|
||||
.product = 65070, /* /sys/class/input/input?/id/product */
|
||||
.version = 0x100, /* /sys/class/input/input?/id/version */
|
||||
|
||||
@@ -210,7 +210,7 @@ struct pxa168fb_mach_info aspenite_lcd_info = {
|
||||
.invert_pixclock = 0,
|
||||
};
|
||||
|
||||
static unsigned int aspenite_matrix_key_map[] = {
|
||||
static const unsigned int aspenite_matrix_key_map[] = {
|
||||
KEY(0, 6, KEY_UP), /* SW 4 */
|
||||
KEY(0, 7, KEY_DOWN), /* SW 5 */
|
||||
KEY(1, 6, KEY_LEFT), /* SW 6 */
|
||||
@@ -219,11 +219,15 @@ static unsigned int aspenite_matrix_key_map[] = {
|
||||
KEY(4, 7, KEY_ESC), /* SW 9 */
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data aspenite_matrix_keymap_data = {
|
||||
.keymap = aspenite_matrix_key_map,
|
||||
.keymap_size = ARRAY_SIZE(aspenite_matrix_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data aspenite_keypad_info __initdata = {
|
||||
.matrix_key_rows = 5,
|
||||
.matrix_key_cols = 8,
|
||||
.matrix_key_map = aspenite_matrix_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(aspenite_matrix_key_map),
|
||||
.matrix_keymap_data = &aspenite_matrix_keymap_data,
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
|
||||
@@ -61,11 +61,15 @@ static unsigned int teton_bga_matrix_key_map[] = {
|
||||
KEY(1, 7, KEY_RIGHT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data teton_bga_matrix_keymap_data = {
|
||||
.keymap = teton_bga_matrix_key_map,
|
||||
.keymap_size = ARRAY_SIZE(teton_bga_matrix_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data teton_bga_keypad_info __initdata = {
|
||||
.matrix_key_rows = 2,
|
||||
.matrix_key_cols = 8,
|
||||
.matrix_key_map = teton_bga_matrix_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(teton_bga_matrix_key_map),
|
||||
.matrix_keymap_data = &teton_bga_matrix_keymap_data,
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
|
||||
@@ -833,21 +833,25 @@ static inline void em_x270_init_ac97(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int em_x270_module_matrix_keys[] = {
|
||||
static const unsigned int em_x270_module_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_A), KEY(1, 0, KEY_UP), KEY(2, 1, KEY_B),
|
||||
KEY(0, 2, KEY_LEFT), KEY(1, 1, KEY_ENTER), KEY(2, 0, KEY_RIGHT),
|
||||
KEY(0, 1, KEY_C), KEY(1, 2, KEY_DOWN), KEY(2, 2, KEY_D),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data em_x270_matrix_keymap_data = {
|
||||
.keymap = em_x270_module_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(em_x270_module_matrix_keys),
|
||||
};
|
||||
|
||||
struct pxa27x_keypad_platform_data em_x270_module_keypad_info = {
|
||||
/* code map for the matrix keys */
|
||||
.matrix_key_rows = 3,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = em_x270_module_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(em_x270_module_matrix_keys),
|
||||
.matrix_keymap_data = &em_x270_matrix_keymap_data,
|
||||
};
|
||||
|
||||
static unsigned int em_x270_exeda_matrix_keys[] = {
|
||||
static const unsigned int em_x270_exeda_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_RIGHTSHIFT), KEY(0, 1, KEY_RIGHTCTRL),
|
||||
KEY(0, 2, KEY_RIGHTALT), KEY(0, 3, KEY_SPACE),
|
||||
KEY(0, 4, KEY_LEFTALT), KEY(0, 5, KEY_LEFTCTRL),
|
||||
@@ -889,12 +893,16 @@ static unsigned int em_x270_exeda_matrix_keys[] = {
|
||||
KEY(7, 6, 0), KEY(7, 7, 0),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data em_x270_exeda_matrix_keymap_data = {
|
||||
.keymap = em_x270_exeda_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(em_x270_exeda_matrix_keys),
|
||||
};
|
||||
|
||||
struct pxa27x_keypad_platform_data em_x270_exeda_keypad_info = {
|
||||
/* code map for the matrix keys */
|
||||
.matrix_key_rows = 8,
|
||||
.matrix_key_cols = 8,
|
||||
.matrix_key_map = em_x270_exeda_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(em_x270_exeda_matrix_keys),
|
||||
.matrix_keymap_data = &em_x270_exeda_matrix_keymap_data,
|
||||
};
|
||||
|
||||
static void __init em_x270_init_keypad(void)
|
||||
|
||||
+42
-18
@@ -392,7 +392,7 @@ static unsigned long e6_pin_config[] __initdata = {
|
||||
|
||||
/* KEYPAD */
|
||||
#ifdef CONFIG_MACH_EZX_A780
|
||||
static unsigned int a780_key_map[] = {
|
||||
static const unsigned int a780_key_map[] = {
|
||||
KEY(0, 0, KEY_SEND),
|
||||
KEY(0, 1, KEY_BACK),
|
||||
KEY(0, 2, KEY_END),
|
||||
@@ -424,11 +424,15 @@ static unsigned int a780_key_map[] = {
|
||||
KEY(4, 4, KEY_DOWN),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data a780_matrix_keymap_data = {
|
||||
.keymap = a780_key_map,
|
||||
.keymap_size = ARRAY_SIZE(a780_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data a780_keypad_platform_data = {
|
||||
.matrix_key_rows = 5,
|
||||
.matrix_key_cols = 5,
|
||||
.matrix_key_map = a780_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(a780_key_map),
|
||||
.matrix_keymap_data = &a780_matrix_keymap_data,
|
||||
|
||||
.direct_key_map = { KEY_CAMERA },
|
||||
.direct_key_num = 1,
|
||||
@@ -438,7 +442,7 @@ static struct pxa27x_keypad_platform_data a780_keypad_platform_data = {
|
||||
#endif /* CONFIG_MACH_EZX_A780 */
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_E680
|
||||
static unsigned int e680_key_map[] = {
|
||||
static const unsigned int e680_key_map[] = {
|
||||
KEY(0, 0, KEY_UP),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_RESERVED),
|
||||
@@ -455,11 +459,15 @@ static unsigned int e680_key_map[] = {
|
||||
KEY(2, 3, KEY_KPENTER),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data e680_matrix_keymap_data = {
|
||||
.keymap = e680_key_map,
|
||||
.keymap_size = ARRAY_SIZE(e680_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data e680_keypad_platform_data = {
|
||||
.matrix_key_rows = 3,
|
||||
.matrix_key_cols = 4,
|
||||
.matrix_key_map = e680_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(e680_key_map),
|
||||
.matrix_keymap_data = &e680_matrix_keymap_data,
|
||||
|
||||
.direct_key_map = {
|
||||
KEY_CAMERA,
|
||||
@@ -476,7 +484,7 @@ static struct pxa27x_keypad_platform_data e680_keypad_platform_data = {
|
||||
#endif /* CONFIG_MACH_EZX_E680 */
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_A1200
|
||||
static unsigned int a1200_key_map[] = {
|
||||
static const unsigned int a1200_key_map[] = {
|
||||
KEY(0, 0, KEY_RESERVED),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_PAGEDOWN),
|
||||
@@ -513,18 +521,22 @@ static unsigned int a1200_key_map[] = {
|
||||
KEY(4, 5, KEY_RESERVED),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data a1200_matrix_keymap_data = {
|
||||
.keymap = a1200_key_map,
|
||||
.keymap_size = ARRAY_SIZE(a1200_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = {
|
||||
.matrix_key_rows = 5,
|
||||
.matrix_key_cols = 6,
|
||||
.matrix_key_map = a1200_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(a1200_key_map),
|
||||
.matrix_keymap_data = &a1200_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
#endif /* CONFIG_MACH_EZX_A1200 */
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_E6
|
||||
static unsigned int e6_key_map[] = {
|
||||
static const unsigned int e6_key_map[] = {
|
||||
KEY(0, 0, KEY_RESERVED),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_PAGEDOWN),
|
||||
@@ -561,18 +573,22 @@ static unsigned int e6_key_map[] = {
|
||||
KEY(4, 5, KEY_PREVIOUSSONG),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data e6_keymap_data = {
|
||||
.keymap = e6_key_map,
|
||||
.keymap_size = ARRAY_SIZE(e6_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data e6_keypad_platform_data = {
|
||||
.matrix_key_rows = 5,
|
||||
.matrix_key_cols = 6,
|
||||
.matrix_key_map = e6_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(e6_key_map),
|
||||
.matrix_keymap_data = &e6_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
#endif /* CONFIG_MACH_EZX_E6 */
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_A910
|
||||
static unsigned int a910_key_map[] = {
|
||||
static const unsigned int a910_key_map[] = {
|
||||
KEY(0, 0, KEY_NUMERIC_6),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_PAGEDOWN),
|
||||
@@ -609,18 +625,22 @@ static unsigned int a910_key_map[] = {
|
||||
KEY(4, 5, KEY_RESERVED),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data a910_matrix_keymap_data = {
|
||||
.keymap = a910_key_map,
|
||||
.keymap_size = ARRAY_SIZE(a910_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data a910_keypad_platform_data = {
|
||||
.matrix_key_rows = 5,
|
||||
.matrix_key_cols = 6,
|
||||
.matrix_key_map = a910_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(a910_key_map),
|
||||
.matrix_keymap_data = &a910_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
#endif /* CONFIG_MACH_EZX_A910 */
|
||||
|
||||
#ifdef CONFIG_MACH_EZX_E2
|
||||
static unsigned int e2_key_map[] = {
|
||||
static const unsigned int e2_key_map[] = {
|
||||
KEY(0, 0, KEY_NUMERIC_6),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_NUMERIC_9),
|
||||
@@ -657,11 +677,15 @@ static unsigned int e2_key_map[] = {
|
||||
KEY(4, 5, KEY_RESERVED),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data e2_matrix_keymap_data = {
|
||||
.keymap = e2_key_map,
|
||||
.keymap_size = ARRAY_SIZE(e2_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data e2_keypad_platform_data = {
|
||||
.matrix_key_rows = 5,
|
||||
.matrix_key_cols = 6,
|
||||
.matrix_key_map = e2_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(e2_key_map),
|
||||
.matrix_keymap_data = &e2_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
@@ -222,7 +222,7 @@ static inline void littleton_init_spi(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int littleton_matrix_key_map[] = {
|
||||
static const unsigned int littleton_matrix_key_map[] = {
|
||||
/* KEY(row, col, key_code) */
|
||||
KEY(1, 3, KEY_0), KEY(0, 0, KEY_1), KEY(1, 0, KEY_2), KEY(2, 0, KEY_3),
|
||||
KEY(0, 1, KEY_4), KEY(1, 1, KEY_5), KEY(2, 1, KEY_6), KEY(0, 2, KEY_7),
|
||||
@@ -249,11 +249,15 @@ static unsigned int littleton_matrix_key_map[] = {
|
||||
KEY(3, 1, KEY_F23), /* soft2 */
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data littleton_matrix_keymap_data = {
|
||||
.keymap = littleton_matrix_key_map,
|
||||
.keymap_size = ARRAY_SIZE(littleton_matrix_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data littleton_keypad_info = {
|
||||
.matrix_key_rows = 6,
|
||||
.matrix_key_cols = 5,
|
||||
.matrix_key_map = littleton_matrix_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(littleton_matrix_key_map),
|
||||
.matrix_keymap_data = &littleton_matrix_keymap_data,
|
||||
|
||||
.enable_rotary0 = 1,
|
||||
.rotary0_up_key = KEY_UP,
|
||||
|
||||
@@ -498,7 +498,7 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = {
|
||||
};
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int mainstone_matrix_keys[] = {
|
||||
static const unsigned int mainstone_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C),
|
||||
KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F),
|
||||
KEY(0, 1, KEY_G), KEY(1, 1, KEY_H), KEY(2, 1, KEY_I),
|
||||
@@ -527,11 +527,15 @@ static unsigned int mainstone_matrix_keys[] = {
|
||||
KEY(4, 6, KEY_SELECT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data mainstone_matrix_keymap_data = {
|
||||
.keymap = mainstone_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(mainstone_matrix_keys),
|
||||
};
|
||||
|
||||
struct pxa27x_keypad_platform_data mainstone_keypad_info = {
|
||||
.matrix_key_rows = 6,
|
||||
.matrix_key_cols = 7,
|
||||
.matrix_key_map = mainstone_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(mainstone_matrix_keys),
|
||||
.matrix_keymap_data = &mainstone_matrix_keymap_data,
|
||||
|
||||
.enable_rotary0 = 1,
|
||||
.rotary0_up_key = KEY_UP,
|
||||
|
||||
@@ -222,7 +222,7 @@ static struct pxafb_mach_info mioa701_pxafb_info = {
|
||||
/*
|
||||
* Keyboard configuration
|
||||
*/
|
||||
static unsigned int mioa701_matrix_keys[] = {
|
||||
static const unsigned int mioa701_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_UP),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
KEY(0, 2, KEY_MEDIA),
|
||||
@@ -233,11 +233,16 @@ static unsigned int mioa701_matrix_keys[] = {
|
||||
KEY(2, 1, KEY_PHONE), /* Phone Green key */
|
||||
KEY(2, 2, KEY_CAMERA) /* Camera key */
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data mioa701_matrix_keymap_data = {
|
||||
.keymap = mioa701_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(mioa701_matrix_keys),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data mioa701_keypad_info = {
|
||||
.matrix_key_rows = 3,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = mioa701_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(mioa701_matrix_keys),
|
||||
.matrix_keymap_data = &mioa701_matrix_keymap_data,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -173,7 +173,7 @@ static inline void palmld_nor_init(void) {}
|
||||
* GPIO keyboard
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int palmld_matrix_keys[] = {
|
||||
static const unsigned int palmld_matrix_keys[] = {
|
||||
KEY(0, 1, KEY_F2),
|
||||
KEY(0, 2, KEY_UP),
|
||||
|
||||
@@ -190,11 +190,15 @@ static unsigned int palmld_matrix_keys[] = {
|
||||
KEY(3, 2, KEY_LEFT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data palmld_matrix_keymap_data = {
|
||||
.keymap = palmld_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(palmld_matrix_keys),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data palmld_keypad_platform_data = {
|
||||
.matrix_key_rows = 4,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = palmld_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(palmld_matrix_keys),
|
||||
.matrix_keymap_data = &palmld_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
@@ -108,7 +108,7 @@ static unsigned long palmt5_pin_config[] __initdata = {
|
||||
* GPIO keyboard
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int palmt5_matrix_keys[] = {
|
||||
static const unsigned int palmt5_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_POWER),
|
||||
KEY(0, 1, KEY_F1),
|
||||
KEY(0, 2, KEY_ENTER),
|
||||
@@ -124,11 +124,15 @@ static unsigned int palmt5_matrix_keys[] = {
|
||||
KEY(3, 2, KEY_LEFT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data palmt5_matrix_keymap_data = {
|
||||
.keymap = palmt5_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(palmt5_matrix_keys),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data palmt5_keypad_platform_data = {
|
||||
.matrix_key_rows = 4,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = palmt5_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(palmt5_matrix_keys),
|
||||
.matrix_keymap_data = &palmt5_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
@@ -168,7 +168,7 @@ static unsigned long centro685_pin_config[] __initdata = {
|
||||
* GPIO keyboard
|
||||
******************************************************************************/
|
||||
#if IS_ENABLED(CONFIG_KEYBOARD_PXA27x)
|
||||
static unsigned int treo680_matrix_keys[] = {
|
||||
static const unsigned int treo680_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_F8), /* Red/Off/Power */
|
||||
KEY(0, 1, KEY_LEFT),
|
||||
KEY(0, 2, KEY_LEFTCTRL), /* Alternate */
|
||||
@@ -227,7 +227,7 @@ static unsigned int treo680_matrix_keys[] = {
|
||||
KEY(7, 5, KEY_I),
|
||||
};
|
||||
|
||||
static unsigned int centro_matrix_keys[] = {
|
||||
static const unsigned int centro_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_F9), /* Home */
|
||||
KEY(0, 1, KEY_LEFT),
|
||||
KEY(0, 2, KEY_LEFTCTRL), /* Alternate */
|
||||
@@ -286,11 +286,20 @@ static unsigned int centro_matrix_keys[] = {
|
||||
KEY(7, 5, KEY_I),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data treo680_matrix_keymap_data = {
|
||||
.keymap = treo680_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(treo680_matrix_keys),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data centro_matrix_keymap_data = {
|
||||
.keymap = centro_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(centro_matrix_keys),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data treo680_keypad_pdata = {
|
||||
.matrix_key_rows = 8,
|
||||
.matrix_key_cols = 7,
|
||||
.matrix_key_map = treo680_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(treo680_matrix_keys),
|
||||
.matrix_keymap_data = &treo680_matrix_keymap_data,
|
||||
.direct_key_map = { KEY_CONNECT },
|
||||
.direct_key_num = 1,
|
||||
|
||||
@@ -301,10 +310,8 @@ static void __init palmtreo_kpc_init(void)
|
||||
{
|
||||
static struct pxa27x_keypad_platform_data *data = &treo680_keypad_pdata;
|
||||
|
||||
if (machine_is_centro()) {
|
||||
data->matrix_key_map = centro_matrix_keys;
|
||||
data->matrix_key_map_size = ARRAY_SIZE(centro_matrix_keys);
|
||||
}
|
||||
if (machine_is_centro())
|
||||
data->matrix_keymap_data = ¢ro_matrix_keymap_data;
|
||||
|
||||
pxa_set_keypad_info(&treo680_keypad_pdata);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ static inline void palmtx_nor_init(void) {}
|
||||
* GPIO keyboard
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int palmtx_matrix_keys[] = {
|
||||
static const unsigned int palmtx_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_POWER),
|
||||
KEY(0, 1, KEY_F1),
|
||||
KEY(0, 2, KEY_ENTER),
|
||||
@@ -192,11 +192,15 @@ static unsigned int palmtx_matrix_keys[] = {
|
||||
KEY(3, 2, KEY_LEFT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data palmtx_matrix_keymap_data = {
|
||||
.keymap = palmtx_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(palmtx_matrix_keys),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data palmtx_keypad_platform_data = {
|
||||
.matrix_key_rows = 4,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = palmtx_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(palmtx_matrix_keys),
|
||||
.matrix_keymap_data = &palmtx_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
@@ -140,7 +140,7 @@ static unsigned long palmz72_pin_config[] __initdata = {
|
||||
* GPIO keyboard
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int palmz72_matrix_keys[] = {
|
||||
static const unsigned int palmz72_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_POWER),
|
||||
KEY(0, 1, KEY_F1),
|
||||
KEY(0, 2, KEY_ENTER),
|
||||
@@ -156,11 +156,15 @@ static unsigned int palmz72_matrix_keys[] = {
|
||||
KEY(3, 2, KEY_LEFT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data almz72_matrix_keymap_data = {
|
||||
.keymap = palmz72_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(palmz72_matrix_keys),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data palmz72_keypad_platform_data = {
|
||||
.matrix_key_rows = 4,
|
||||
.matrix_key_cols = 3,
|
||||
.matrix_key_map = palmz72_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(palmz72_matrix_keys),
|
||||
.matrix_keymap_data = &almz72_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
@@ -106,7 +106,7 @@ static struct platform_device smc91x_device = {
|
||||
};
|
||||
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int tavorevb_matrix_key_map[] = {
|
||||
static const unsigned int tavorevb_matrix_key_map[] = {
|
||||
/* KEY(row, col, key_code) */
|
||||
KEY(0, 4, KEY_A), KEY(0, 5, KEY_B), KEY(0, 6, KEY_C),
|
||||
KEY(1, 4, KEY_E), KEY(1, 5, KEY_F), KEY(1, 6, KEY_G),
|
||||
@@ -147,11 +147,15 @@ static unsigned int tavorevb_matrix_key_map[] = {
|
||||
KEY(3, 3, KEY_F23), /* soft2 */
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data tavorevb_matrix_keymap_data = {
|
||||
.keymap = tavorevb_matrix_key_map,
|
||||
.keymap_size = ARRAY_SIZE(tavorevb_matrix_key_map),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data tavorevb_keypad_info = {
|
||||
.matrix_key_rows = 7,
|
||||
.matrix_key_cols = 7,
|
||||
.matrix_key_map = tavorevb_matrix_key_map,
|
||||
.matrix_key_map_size = ARRAY_SIZE(tavorevb_matrix_key_map),
|
||||
.matrix_keymap_data = &tavorevb_matrix_keymap_data,
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ static inline void z2_leds_init(void) {}
|
||||
* GPIO keyboard
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
|
||||
static unsigned int z2_matrix_keys[] = {
|
||||
static const unsigned int z2_matrix_keys[] = {
|
||||
KEY(0, 0, KEY_OPTION),
|
||||
KEY(1, 0, KEY_UP),
|
||||
KEY(2, 0, KEY_DOWN),
|
||||
@@ -405,11 +405,15 @@ static unsigned int z2_matrix_keys[] = {
|
||||
KEY(5, 7, KEY_DOT),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data z2_matrix_keymap_data = {
|
||||
.keymap = z2_matrix_keys,
|
||||
.keymap_size = ARRAY_SIZE(z2_matrix_keys),
|
||||
};
|
||||
|
||||
static struct pxa27x_keypad_platform_data z2_keypad_platform_data = {
|
||||
.matrix_key_rows = 7,
|
||||
.matrix_key_cols = 8,
|
||||
.matrix_key_map = z2_matrix_keys,
|
||||
.matrix_key_map_size = ARRAY_SIZE(z2_matrix_keys),
|
||||
.matrix_keymap_data = &z2_matrix_keymap_data,
|
||||
|
||||
.debounce_interval = 30,
|
||||
};
|
||||
|
||||
Loaded 20 of 105 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user