Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  ...
  • Loading branch information
Linus Torvalds committed Jul 4, 2013
2 parents 98f486f + 57961e3 commit f5b63ac
Show file tree
Hide file tree
Showing 105 changed files with 4,793 additions and 512 deletions.
60 changes: 60 additions & 0 deletions Documentation/devicetree/bindings/input/pxa27x-keypad.txt
Original file line number Diff line number Diff line change
@@ -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>;
};
24 changes: 5 additions & 19 deletions Documentation/devicetree/bindings/input/samsung-keypad.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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>;
Expand Down
60 changes: 60 additions & 0 deletions Documentation/devicetree/bindings/input/ti,nspire-keypad.txt
Original file line number Diff line number Diff line change
@@ -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 >;
};
13 changes: 13 additions & 0 deletions Documentation/devicetree/bindings/serio/olpc,ap-sp.txt
Original file line number Diff line number Diff line change
@@ -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>;
}
2 changes: 2 additions & 0 deletions Documentation/input/multi-touch-protocol.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-davinci/board-da850-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
10 changes: 7 additions & 3 deletions arch/arm/mach-mmp/aspenite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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,
};

Expand Down
8 changes: 6 additions & 2 deletions arch/arm/mach-mmp/teton_bga.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
20 changes: 14 additions & 6 deletions arch/arm/mach-pxa/em-x270.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit f5b63ac

Please sign in to comment.