diff options
| author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 14:52:07 -0400 |
|---|---|---|
| committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 16:50:41 -0400 |
| commit | 020abf03cd659388f94cb328e1e1df0656e0d7ff (patch) | |
| tree | 40d05011708ad1b4a05928d167eb120420581aa6 /include/linux/input | |
| parent | 0ff8fbc61727c926883eec381fbd3d32d1fab504 (diff) | |
| parent | 693d92a1bbc9e42681c42ed190bd42b636ca876f (diff) | |
Merge tag 'v2.6.39-rc7'
in order to pull in changes in drivers/media/dvb/firewire/ and
sound/firewire/.
Diffstat (limited to 'include/linux/input')
| -rw-r--r-- | include/linux/input/as5011.h | 20 | ||||
| -rw-r--r-- | include/linux/input/bu21013.h | 4 | ||||
| -rw-r--r-- | include/linux/input/cma3000.h | 59 | ||||
| -rw-r--r-- | include/linux/input/matrix_keypad.h | 6 | ||||
| -rw-r--r-- | include/linux/input/mt.h | 63 |
5 files changed, 145 insertions, 7 deletions
diff --git a/include/linux/input/as5011.h b/include/linux/input/as5011.h new file mode 100644 index 000000000000..1affd0ddfa9d --- /dev/null +++ b/include/linux/input/as5011.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #ifndef _AS5011_H | ||
| 2 | #define _AS5011_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Copyright (c) 2010, 2011 Fabien Marteau <fabien.marteau@armadeus.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 version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | struct as5011_platform_data { | ||
| 13 | unsigned int button_gpio; | ||
| 14 | unsigned int axis_irq; /* irq number */ | ||
| 15 | unsigned long axis_irqflags; | ||
| 16 | char xp, xn; /* threshold for x axis */ | ||
| 17 | char yp, yn; /* threshold for y axis */ | ||
| 18 | }; | ||
| 19 | |||
| 20 | #endif /* _AS5011_H */ | ||
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h index e470d387dd49..05e03284b92a 100644 --- a/include/linux/input/bu21013.h +++ b/include/linux/input/bu21013.h | |||
| @@ -12,8 +12,6 @@ | |||
| 12 | * @cs_en: pointer to the cs enable function | 12 | * @cs_en: pointer to the cs enable function |
| 13 | * @cs_dis: pointer to the cs disable function | 13 | * @cs_dis: pointer to the cs disable function |
| 14 | * @irq_read_val: pointer to read the pen irq value function | 14 | * @irq_read_val: pointer to read the pen irq value function |
| 15 | * @x_max_res: xmax resolution | ||
| 16 | * @y_max_res: ymax resolution | ||
| 17 | * @touch_x_max: touch x max | 15 | * @touch_x_max: touch x max |
| 18 | * @touch_y_max: touch y max | 16 | * @touch_y_max: touch y max |
| 19 | * @cs_pin: chip select pin | 17 | * @cs_pin: chip select pin |
| @@ -29,8 +27,6 @@ struct bu21013_platform_device { | |||
| 29 | int (*cs_en)(int reset_pin); | 27 | int (*cs_en)(int reset_pin); |
| 30 | int (*cs_dis)(int reset_pin); | 28 | int (*cs_dis)(int reset_pin); |
| 31 | int (*irq_read_val)(void); | 29 | int (*irq_read_val)(void); |
| 32 | int x_max_res; | ||
| 33 | int y_max_res; | ||
| 34 | int touch_x_max; | 30 | int touch_x_max; |
| 35 | int touch_y_max; | 31 | int touch_y_max; |
| 36 | unsigned int cs_pin; | 32 | unsigned int cs_pin; |
diff --git a/include/linux/input/cma3000.h b/include/linux/input/cma3000.h new file mode 100644 index 000000000000..cbbaac27d311 --- /dev/null +++ b/include/linux/input/cma3000.h | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | /* | ||
| 2 | * VTI CMA3000_Dxx Accelerometer driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Texas Instruments | ||
| 5 | * Author: Hemanth V <hemanthv@ti.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 version 2 as published by | ||
| 9 | * the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 14 | * more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License along with | ||
| 17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #ifndef _LINUX_CMA3000_H | ||
| 21 | #define _LINUX_CMA3000_H | ||
| 22 | |||
| 23 | #define CMAMODE_DEFAULT 0 | ||
| 24 | #define CMAMODE_MEAS100 1 | ||
| 25 | #define CMAMODE_MEAS400 2 | ||
| 26 | #define CMAMODE_MEAS40 3 | ||
| 27 | #define CMAMODE_MOTDET 4 | ||
| 28 | #define CMAMODE_FF100 5 | ||
| 29 | #define CMAMODE_FF400 6 | ||
| 30 | #define CMAMODE_POFF 7 | ||
| 31 | |||
| 32 | #define CMARANGE_2G 2000 | ||
| 33 | #define CMARANGE_8G 8000 | ||
| 34 | |||
| 35 | /** | ||
| 36 | * struct cma3000_i2c_platform_data - CMA3000 Platform data | ||
| 37 | * @fuzz_x: Noise on X Axis | ||
| 38 | * @fuzz_y: Noise on Y Axis | ||
| 39 | * @fuzz_z: Noise on Z Axis | ||
| 40 | * @g_range: G range in milli g i.e 2000 or 8000 | ||
| 41 | * @mode: Operating mode | ||
| 42 | * @mdthr: Motion detect threshold value | ||
| 43 | * @mdfftmr: Motion detect and free fall time value | ||
| 44 | * @ffthr: Free fall threshold value | ||
| 45 | */ | ||
| 46 | |||
| 47 | struct cma3000_platform_data { | ||
| 48 | int fuzz_x; | ||
| 49 | int fuzz_y; | ||
| 50 | int fuzz_z; | ||
| 51 | int g_range; | ||
| 52 | uint8_t mode; | ||
| 53 | uint8_t mdthr; | ||
| 54 | uint8_t mdfftmr; | ||
| 55 | uint8_t ffthr; | ||
| 56 | unsigned long irqflags; | ||
| 57 | }; | ||
| 58 | |||
| 59 | #endif | ||
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 80352ad6581a..fe7c4b9ae270 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
| @@ -4,12 +4,12 @@ | |||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/input.h> | 5 | #include <linux/input.h> |
| 6 | 6 | ||
| 7 | #define MATRIX_MAX_ROWS 16 | 7 | #define MATRIX_MAX_ROWS 32 |
| 8 | #define MATRIX_MAX_COLS 16 | 8 | #define MATRIX_MAX_COLS 32 |
| 9 | 9 | ||
| 10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ | 10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ |
| 11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ | 11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ |
| 12 | (val & 0xffff)) | 12 | ((val) & 0xffff)) |
| 13 | 13 | ||
| 14 | #define KEY_ROW(k) (((k) >> 24) & 0xff) | 14 | #define KEY_ROW(k) (((k) >> 24) & 0xff) |
| 15 | #define KEY_COL(k) (((k) >> 16) & 0xff) | 15 | #define KEY_COL(k) (((k) >> 16) & 0xff) |
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h new file mode 100644 index 000000000000..318bb82325a6 --- /dev/null +++ b/include/linux/input/mt.h | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | #ifndef _INPUT_MT_H | ||
| 2 | #define _INPUT_MT_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Input Multitouch Library | ||
| 6 | * | ||
| 7 | * Copyright (c) 2010 Henrik Rydberg | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify it | ||
| 10 | * under the terms of the GNU General Public License version 2 as published by | ||
| 11 | * the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/input.h> | ||
| 15 | |||
| 16 | #define TRKID_MAX 0xffff | ||
| 17 | |||
| 18 | /** | ||
| 19 | * struct input_mt_slot - represents the state of an input MT slot | ||
| 20 | * @abs: holds current values of ABS_MT axes for this slot | ||
| 21 | */ | ||
| 22 | struct input_mt_slot { | ||
| 23 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
| 24 | }; | ||
| 25 | |||
| 26 | static inline void input_mt_set_value(struct input_mt_slot *slot, | ||
| 27 | unsigned code, int value) | ||
| 28 | { | ||
| 29 | slot->abs[code - ABS_MT_FIRST] = value; | ||
| 30 | } | ||
| 31 | |||
| 32 | static inline int input_mt_get_value(const struct input_mt_slot *slot, | ||
| 33 | unsigned code) | ||
| 34 | { | ||
| 35 | return slot->abs[code - ABS_MT_FIRST]; | ||
| 36 | } | ||
| 37 | |||
| 38 | int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots); | ||
| 39 | void input_mt_destroy_slots(struct input_dev *dev); | ||
| 40 | |||
| 41 | static inline int input_mt_new_trkid(struct input_dev *dev) | ||
| 42 | { | ||
| 43 | return dev->trkid++ & TRKID_MAX; | ||
| 44 | } | ||
| 45 | |||
| 46 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
| 47 | { | ||
| 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
| 49 | } | ||
| 50 | |||
| 51 | static inline bool input_is_mt_axis(int axis) | ||
| 52 | { | ||
| 53 | return axis == ABS_MT_SLOT || | ||
| 54 | (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST); | ||
| 55 | } | ||
| 56 | |||
| 57 | void input_mt_report_slot_state(struct input_dev *dev, | ||
| 58 | unsigned int tool_type, bool active); | ||
| 59 | |||
| 60 | void input_mt_report_finger_count(struct input_dev *dev, int count); | ||
| 61 | void input_mt_report_pointer_emulation(struct input_dev *dev, bool use_count); | ||
| 62 | |||
| 63 | #endif | ||
