aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 13:34:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 13:34:29 -0400
commit2c01e7bc46f10e9190818437e564f7e0db875ae9 (patch)
tree8b06c85d69754f7df27f7fb42520f6e2ceaea907 /include/linux
parentab11ca34eea8fda7a1a9302d86f6ef6108ffd68f (diff)
parente644dae645e167d154c0526358940986682a72b0 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer updates from Dmitry Torokhov: - a bunch of new drivers (DA9052/53 touchscreenn controller, Synaptics Navpoint, LM8333 keypads, Wacom I2C touhscreen); - updates to existing touchpad drivers (ALPS, Sntelic); - Wacom driver now supports Intuos5; - device-tree bindings in numerous drivers; - other cleanups and fixes. Fix annoying conflict in drivers/input/tablet/wacom_wac.c that I think implies that the input layer device naming is broken, but let's see. I brough it up with Dmitry. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) Input: matrix-keymap - fix building keymaps Input: spear-keyboard - document DT bindings Input: spear-keyboard - add device tree bindings Input: matrix-keymap - wire up device tree support Input: matrix-keymap - uninline and prepare for device tree support Input: adp5588 - add support for gpio names Input: omap-keypad - dynamically handle register offsets Input: synaptics - fix compile warning MAINTAINERS: adjust input-related patterns Input: ALPS - switch to using input_mt_report_finger_count Input: ALPS - add semi-MT support for v4 protocol Input: Add Synaptics NavPoint (PXA27x SSP/SPI) driver Input: atmel_mxt_ts - dump each message on just 1 line Input: atmel_mxt_ts - do not read extra (checksum) byte Input: atmel_mxt_ts - verify object size in mxt_write_object Input: atmel_mxt_ts - only allow root to update firmware Input: atmel_mxt_ts - use CONFIG_PM_SLEEP Input: sentelic - report device's production serial number Input: tl6040-vibra - Device Tree support Input: evdev - properly handle read/write with count 0 ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/gameport.h13
-rw-r--r--include/linux/i2c/adp5588.h1
-rw-r--r--include/linux/input/lm8333.h24
-rw-r--r--include/linux/input/matrix_keypad.h54
-rw-r--r--include/linux/input/navpoint.h12
-rw-r--r--include/linux/serio.h13
6 files changed, 68 insertions, 49 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index b456b08d70ed..b986be513406 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -153,6 +153,19 @@ int __must_check __gameport_register_driver(struct gameport_driver *drv,
153 153
154void gameport_unregister_driver(struct gameport_driver *drv); 154void gameport_unregister_driver(struct gameport_driver *drv);
155 155
156/**
157 * module_gameport_driver() - Helper macro for registering a gameport driver
158 * @__gameport_driver: gameport_driver struct
159 *
160 * Helper macro for gameport drivers which do not do anything special in
161 * module init/exit. This eliminates a lot of boilerplate. Each module may
162 * only use this macro once, and calling it replaces module_init() and
163 * module_exit().
164 */
165#define module_gameport_driver(__gameport_driver) \
166 module_driver(__gameport_driver, gameport_register_driver, \
167 gameport_unregister_driver)
168
156#endif /* __KERNEL__ */ 169#endif /* __KERNEL__ */
157 170
158#define GAMEPORT_MODE_DISABLED 0 171#define GAMEPORT_MODE_DISABLED 0
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h
index cec17cf6cac2..d8341cb47b60 100644
--- a/include/linux/i2c/adp5588.h
+++ b/include/linux/i2c/adp5588.h
@@ -157,6 +157,7 @@ struct i2c_client; /* forward declaration */
157 157
158struct adp5588_gpio_platform_data { 158struct adp5588_gpio_platform_data {
159 int gpio_start; /* GPIO Chip base # */ 159 int gpio_start; /* GPIO Chip base # */
160 const char *const *names;
160 unsigned irq_base; /* interrupt base # */ 161 unsigned irq_base; /* interrupt base # */
161 unsigned pullup_dis_mask; /* Pull-Up Disable Mask */ 162 unsigned pullup_dis_mask; /* Pull-Up Disable Mask */
162 int (*setup)(struct i2c_client *client, 163 int (*setup)(struct i2c_client *client,
diff --git a/include/linux/input/lm8333.h b/include/linux/input/lm8333.h
new file mode 100644
index 000000000000..79f918c6e8c5
--- /dev/null
+++ b/include/linux/input/lm8333.h
@@ -0,0 +1,24 @@
1/*
2 * public include for LM8333 keypad driver - same license as driver
3 * Copyright (C) 2012 Wolfram Sang, Pengutronix <w.sang@pengutronix.de>
4 */
5
6#ifndef _LM8333_H
7#define _LM8333_H
8
9struct lm8333;
10
11struct lm8333_platform_data {
12 /* Keymap data */
13 const struct matrix_keymap_data *matrix_data;
14 /* Active timeout before enter HALT mode in microseconds */
15 unsigned active_time;
16 /* Debounce interval in microseconds */
17 unsigned debounce_time;
18};
19
20extern int lm8333_read8(struct lm8333 *lm8333, u8 cmd);
21extern int lm8333_write8(struct lm8333 *lm8333, u8 cmd, u8 val);
22extern int lm8333_read_block(struct lm8333 *lm8333, u8 cmd, u8 len, u8 *buf);
23
24#endif /* _LM8333_H */
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index 6c07ced0af81..5f3aa6b11bfa 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -75,54 +75,10 @@ struct matrix_keypad_platform_data {
75 bool no_autorepeat; 75 bool no_autorepeat;
76}; 76};
77 77
78/** 78int matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
79 * matrix_keypad_build_keymap - convert platform keymap into matrix keymap 79 const char *keymap_name,
80 * @keymap_data: keymap supplied by the platform code 80 unsigned int rows, unsigned int cols,
81 * @row_shift: number of bits to shift row value by to advance to the next 81 unsigned short *keymap,
82 * line in the keymap 82 struct input_dev *input_dev);
83 * @keymap: expanded version of keymap that is suitable for use by
84 * matrix keyboad driver
85 * @keybit: pointer to bitmap of keys supported by input device
86 *
87 * This function converts platform keymap (encoded with KEY() macro) into
88 * an array of keycodes that is suitable for using in a standard matrix
89 * keyboard driver that uses row and col as indices.
90 */
91static inline void
92matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
93 unsigned int row_shift,
94 unsigned short *keymap, unsigned long *keybit)
95{
96 int i;
97
98 for (i = 0; i < keymap_data->keymap_size; i++) {
99 unsigned int key = keymap_data->keymap[i];
100 unsigned int row = KEY_ROW(key);
101 unsigned int col = KEY_COL(key);
102 unsigned short code = KEY_VAL(key);
103
104 keymap[MATRIX_SCAN_CODE(row, col, row_shift)] = code;
105 __set_bit(code, keybit);
106 }
107 __clear_bit(KEY_RESERVED, keybit);
108}
109
110#ifdef CONFIG_INPUT_OF_MATRIX_KEYMAP
111struct matrix_keymap_data *
112matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname);
113
114void matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd);
115#else
116static inline struct matrix_keymap_data *
117matrix_keyboard_of_fill_keymap(struct device_node *np, const char *propname)
118{
119 return NULL;
120}
121
122static inline void
123matrix_keyboard_of_free_keymap(const struct matrix_keymap_data *kd)
124{
125}
126#endif
127 83
128#endif /* _MATRIX_KEYPAD_H */ 84#endif /* _MATRIX_KEYPAD_H */
diff --git a/include/linux/input/navpoint.h b/include/linux/input/navpoint.h
new file mode 100644
index 000000000000..45050eb34de3
--- /dev/null
+++ b/include/linux/input/navpoint.h
@@ -0,0 +1,12 @@
1/*
2 * Copyright (C) 2012 Paul Parsons <lost.distance@yahoo.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9struct navpoint_platform_data {
10 int port; /* PXA SSP port for pxa_ssp_request() */
11 int gpio; /* GPIO for power on/off */
12};
diff --git a/include/linux/serio.h b/include/linux/serio.h
index ca82861b0e46..6d6cfd3e94a3 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -96,6 +96,19 @@ int __must_check __serio_register_driver(struct serio_driver *drv,
96 96
97void serio_unregister_driver(struct serio_driver *drv); 97void serio_unregister_driver(struct serio_driver *drv);
98 98
99/**
100 * module_serio_driver() - Helper macro for registering a serio driver
101 * @__serio_driver: serio_driver struct
102 *
103 * Helper macro for serio drivers which do not do anything special in
104 * module init/exit. This eliminates a lot of boilerplate. Each module
105 * may only use this macro once, and calling it replaces module_init()
106 * and module_exit().
107 */
108#define module_serio_driver(__serio_driver) \
109 module_driver(__serio_driver, serio_register_driver, \
110 serio_unregister_driver)
111
99static inline int serio_write(struct serio *serio, unsigned char data) 112static inline int serio_write(struct serio *serio, unsigned char data)
100{ 113{
101 if (serio->write) 114 if (serio->write)