diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/adp5588.h | 37 | ||||
-rw-r--r-- | include/linux/i2c/mcs.h | 34 | ||||
-rw-r--r-- | include/linux/i2c/mcs5000_ts.h | 24 | ||||
-rw-r--r-- | include/linux/i2c/qt602240_ts.h | 38 | ||||
-rw-r--r-- | include/linux/input.h | 60 | ||||
-rw-r--r-- | include/linux/input/adxl34x.h | 349 | ||||
-rw-r--r-- | include/linux/input/cy8ctmg110_pdata.h | 10 | ||||
-rw-r--r-- | include/linux/input/matrix_keypad.h | 6 | ||||
-rw-r--r-- | include/linux/spi/ads7846.h | 3 |
9 files changed, 533 insertions, 28 deletions
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h index 02c9af374741..269181b8f623 100644 --- a/include/linux/i2c/adp5588.h +++ b/include/linux/i2c/adp5588.h | |||
@@ -78,6 +78,40 @@ | |||
78 | 78 | ||
79 | #define ADP5588_KEYMAPSIZE 80 | 79 | #define ADP5588_KEYMAPSIZE 80 |
80 | 80 | ||
81 | #define GPI_PIN_ROW0 97 | ||
82 | #define GPI_PIN_ROW1 98 | ||
83 | #define GPI_PIN_ROW2 99 | ||
84 | #define GPI_PIN_ROW3 100 | ||
85 | #define GPI_PIN_ROW4 101 | ||
86 | #define GPI_PIN_ROW5 102 | ||
87 | #define GPI_PIN_ROW6 103 | ||
88 | #define GPI_PIN_ROW7 104 | ||
89 | #define GPI_PIN_COL0 105 | ||
90 | #define GPI_PIN_COL1 106 | ||
91 | #define GPI_PIN_COL2 107 | ||
92 | #define GPI_PIN_COL3 108 | ||
93 | #define GPI_PIN_COL4 109 | ||
94 | #define GPI_PIN_COL5 110 | ||
95 | #define GPI_PIN_COL6 111 | ||
96 | #define GPI_PIN_COL7 112 | ||
97 | #define GPI_PIN_COL8 113 | ||
98 | #define GPI_PIN_COL9 114 | ||
99 | |||
100 | #define GPI_PIN_ROW_BASE GPI_PIN_ROW0 | ||
101 | #define GPI_PIN_ROW_END GPI_PIN_ROW7 | ||
102 | #define GPI_PIN_COL_BASE GPI_PIN_COL0 | ||
103 | #define GPI_PIN_COL_END GPI_PIN_COL9 | ||
104 | |||
105 | #define GPI_PIN_BASE GPI_PIN_ROW_BASE | ||
106 | #define GPI_PIN_END GPI_PIN_COL_END | ||
107 | |||
108 | #define ADP5588_GPIMAPSIZE_MAX (GPI_PIN_END - GPI_PIN_BASE + 1) | ||
109 | |||
110 | struct adp5588_gpi_map { | ||
111 | unsigned short pin; | ||
112 | unsigned short sw_evt; | ||
113 | }; | ||
114 | |||
81 | struct adp5588_kpad_platform_data { | 115 | struct adp5588_kpad_platform_data { |
82 | int rows; /* Number of rows */ | 116 | int rows; /* Number of rows */ |
83 | int cols; /* Number of columns */ | 117 | int cols; /* Number of columns */ |
@@ -87,6 +121,9 @@ struct adp5588_kpad_platform_data { | |||
87 | unsigned en_keylock:1; /* Enable Key Lock feature */ | 121 | unsigned en_keylock:1; /* Enable Key Lock feature */ |
88 | unsigned short unlock_key1; /* Unlock Key 1 */ | 122 | unsigned short unlock_key1; /* Unlock Key 1 */ |
89 | unsigned short unlock_key2; /* Unlock Key 2 */ | 123 | unsigned short unlock_key2; /* Unlock Key 2 */ |
124 | const struct adp5588_gpi_map *gpimap; | ||
125 | unsigned short gpimapsize; | ||
126 | const struct adp5588_gpio_platform_data *gpio_data; | ||
90 | }; | 127 | }; |
91 | 128 | ||
92 | struct adp5588_gpio_platform_data { | 129 | struct adp5588_gpio_platform_data { |
diff --git a/include/linux/i2c/mcs.h b/include/linux/i2c/mcs.h new file mode 100644 index 000000000000..725ae7c313ff --- /dev/null +++ b/include/linux/i2c/mcs.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 - 2010 Samsung Electronics Co.Ltd | ||
3 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | ||
4 | * Author: HeungJun Kim <riverful.kim@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_MCS_H | ||
14 | #define __LINUX_MCS_H | ||
15 | |||
16 | #define MCS_KEY_MAP(v, c) ((((v) & 0xff) << 16) | ((c) & 0xffff)) | ||
17 | #define MCS_KEY_VAL(v) (((v) >> 16) & 0xff) | ||
18 | #define MCS_KEY_CODE(v) ((v) & 0xffff) | ||
19 | |||
20 | struct mcs_platform_data { | ||
21 | void (*cfg_pin)(void); | ||
22 | |||
23 | /* touchscreen */ | ||
24 | unsigned int x_size; | ||
25 | unsigned int y_size; | ||
26 | |||
27 | /* touchkey */ | ||
28 | const u32 *keymap; | ||
29 | unsigned int keymap_size; | ||
30 | unsigned int key_maxval; | ||
31 | bool no_autorepeat; | ||
32 | }; | ||
33 | |||
34 | #endif /* __LINUX_MCS_H */ | ||
diff --git a/include/linux/i2c/mcs5000_ts.h b/include/linux/i2c/mcs5000_ts.h deleted file mode 100644 index 5a117b5ca15e..000000000000 --- a/include/linux/i2c/mcs5000_ts.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * mcs5000_ts.h | ||
3 | * | ||
4 | * Copyright (C) 2009 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 | |||
14 | #ifndef __LINUX_MCS5000_TS_H | ||
15 | #define __LINUX_MCS5000_TS_H | ||
16 | |||
17 | /* platform data for the MELFAS MCS-5000 touchscreen driver */ | ||
18 | struct mcs5000_ts_platform_data { | ||
19 | void (*cfg_pin)(void); | ||
20 | int x_size; | ||
21 | int y_size; | ||
22 | }; | ||
23 | |||
24 | #endif /* __LINUX_MCS5000_TS_H */ | ||
diff --git a/include/linux/i2c/qt602240_ts.h b/include/linux/i2c/qt602240_ts.h new file mode 100644 index 000000000000..c5033e101094 --- /dev/null +++ b/include/linux/i2c/qt602240_ts.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * AT42QT602240/ATMXT224 Touchscreen driver | ||
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 __LINUX_QT602240_TS_H | ||
14 | #define __LINUX_QT602240_TS_H | ||
15 | |||
16 | /* Orient */ | ||
17 | #define QT602240_NORMAL 0x0 | ||
18 | #define QT602240_DIAGONAL 0x1 | ||
19 | #define QT602240_HORIZONTAL_FLIP 0x2 | ||
20 | #define QT602240_ROTATED_90_COUNTER 0x3 | ||
21 | #define QT602240_VERTICAL_FLIP 0x4 | ||
22 | #define QT602240_ROTATED_90 0x5 | ||
23 | #define QT602240_ROTATED_180 0x6 | ||
24 | #define QT602240_DIAGONAL_COUNTER 0x7 | ||
25 | |||
26 | /* The platform data for the AT42QT602240/ATMXT224 touchscreen driver */ | ||
27 | struct qt602240_platform_data { | ||
28 | unsigned int x_line; | ||
29 | unsigned int y_line; | ||
30 | unsigned int x_size; | ||
31 | unsigned int y_size; | ||
32 | unsigned int blen; | ||
33 | unsigned int threshold; | ||
34 | unsigned int voltage; | ||
35 | unsigned char orient; | ||
36 | }; | ||
37 | |||
38 | #endif /* __LINUX_QT602240_TS_H */ | ||
diff --git a/include/linux/input.h b/include/linux/input.h index 6fcc9101beeb..339d043ccb53 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -691,9 +691,12 @@ struct input_absinfo { | |||
691 | #define ABS_TILT_X 0x1a | 691 | #define ABS_TILT_X 0x1a |
692 | #define ABS_TILT_Y 0x1b | 692 | #define ABS_TILT_Y 0x1b |
693 | #define ABS_TOOL_WIDTH 0x1c | 693 | #define ABS_TOOL_WIDTH 0x1c |
694 | |||
694 | #define ABS_VOLUME 0x20 | 695 | #define ABS_VOLUME 0x20 |
696 | |||
695 | #define ABS_MISC 0x28 | 697 | #define ABS_MISC 0x28 |
696 | 698 | ||
699 | #define ABS_MT_SLOT 0x2f /* MT slot being modified */ | ||
697 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ | 700 | #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ |
698 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ | 701 | #define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */ |
699 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ | 702 | #define ABS_MT_WIDTH_MAJOR 0x32 /* Major axis of approaching ellipse */ |
@@ -706,6 +709,12 @@ struct input_absinfo { | |||
706 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ | 709 | #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ |
707 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ | 710 | #define ABS_MT_PRESSURE 0x3a /* Pressure on contact area */ |
708 | 711 | ||
712 | #ifdef __KERNEL__ | ||
713 | /* Implementation details, userspace should not care about these */ | ||
714 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR | ||
715 | #define ABS_MT_LAST ABS_MT_PRESSURE | ||
716 | #endif | ||
717 | |||
709 | #define ABS_MAX 0x3f | 718 | #define ABS_MAX 0x3f |
710 | #define ABS_CNT (ABS_MAX+1) | 719 | #define ABS_CNT (ABS_MAX+1) |
711 | 720 | ||
@@ -1048,6 +1057,14 @@ struct ff_effect { | |||
1048 | #include <linux/mod_devicetable.h> | 1057 | #include <linux/mod_devicetable.h> |
1049 | 1058 | ||
1050 | /** | 1059 | /** |
1060 | * struct input_mt_slot - represents the state of an input MT slot | ||
1061 | * @abs: holds current values of ABS_MT axes for this slot | ||
1062 | */ | ||
1063 | struct input_mt_slot { | ||
1064 | int abs[ABS_MT_LAST - ABS_MT_FIRST + 1]; | ||
1065 | }; | ||
1066 | |||
1067 | /** | ||
1051 | * struct input_dev - represents an input device | 1068 | * struct input_dev - represents an input device |
1052 | * @name: name of the device | 1069 | * @name: name of the device |
1053 | * @phys: physical path to the device in the system hierarchy | 1070 | * @phys: physical path to the device in the system hierarchy |
@@ -1063,6 +1080,10 @@ struct ff_effect { | |||
1063 | * @sndbit: bitmap of sound effects supported by the device | 1080 | * @sndbit: bitmap of sound effects supported by the device |
1064 | * @ffbit: bitmap of force feedback effects supported by the device | 1081 | * @ffbit: bitmap of force feedback effects supported by the device |
1065 | * @swbit: bitmap of switches present on the device | 1082 | * @swbit: bitmap of switches present on the device |
1083 | * @hint_events_per_packet: average number of events generated by the | ||
1084 | * device in a packet (between EV_SYN/SYN_REPORT events). Used by | ||
1085 | * event handlers to estimate size of the buffer needed to hold | ||
1086 | * events. | ||
1066 | * @keycodemax: size of keycode table | 1087 | * @keycodemax: size of keycode table |
1067 | * @keycodesize: size of elements in keycode table | 1088 | * @keycodesize: size of elements in keycode table |
1068 | * @keycode: map of scancodes to keycodes for this device | 1089 | * @keycode: map of scancodes to keycodes for this device |
@@ -1078,9 +1099,12 @@ struct ff_effect { | |||
1078 | * @repeat_key: stores key code of the last key pressed; used to implement | 1099 | * @repeat_key: stores key code of the last key pressed; used to implement |
1079 | * software autorepeat | 1100 | * software autorepeat |
1080 | * @timer: timer for software autorepeat | 1101 | * @timer: timer for software autorepeat |
1081 | * @sync: set to 1 when there were no new events since last EV_SYNC | ||
1082 | * @abs: current values for reports from absolute axes | 1102 | * @abs: current values for reports from absolute axes |
1083 | * @rep: current values for autorepeat parameters (delay, rate) | 1103 | * @rep: current values for autorepeat parameters (delay, rate) |
1104 | * @mt: pointer to array of struct input_mt_slot holding current values | ||
1105 | * of tracked contacts | ||
1106 | * @mtsize: number of MT slots the device uses | ||
1107 | * @slot: MT slot currently being transmitted | ||
1084 | * @key: reflects current state of device's keys/buttons | 1108 | * @key: reflects current state of device's keys/buttons |
1085 | * @led: reflects current state of device's LEDs | 1109 | * @led: reflects current state of device's LEDs |
1086 | * @snd: reflects current state of sound effects | 1110 | * @snd: reflects current state of sound effects |
@@ -1119,6 +1143,7 @@ struct ff_effect { | |||
1119 | * last user closes the device | 1143 | * last user closes the device |
1120 | * @going_away: marks devices that are in a middle of unregistering and | 1144 | * @going_away: marks devices that are in a middle of unregistering and |
1121 | * causes input_open_device*() fail with -ENODEV. | 1145 | * causes input_open_device*() fail with -ENODEV. |
1146 | * @sync: set to %true when there were no new events since last EV_SYN | ||
1122 | * @dev: driver model's view of this device | 1147 | * @dev: driver model's view of this device |
1123 | * @h_list: list of input handles associated with the device. When | 1148 | * @h_list: list of input handles associated with the device. When |
1124 | * accessing the list dev->mutex must be held | 1149 | * accessing the list dev->mutex must be held |
@@ -1140,6 +1165,8 @@ struct input_dev { | |||
1140 | unsigned long ffbit[BITS_TO_LONGS(FF_CNT)]; | 1165 | unsigned long ffbit[BITS_TO_LONGS(FF_CNT)]; |
1141 | unsigned long swbit[BITS_TO_LONGS(SW_CNT)]; | 1166 | unsigned long swbit[BITS_TO_LONGS(SW_CNT)]; |
1142 | 1167 | ||
1168 | unsigned int hint_events_per_packet; | ||
1169 | |||
1143 | unsigned int keycodemax; | 1170 | unsigned int keycodemax; |
1144 | unsigned int keycodesize; | 1171 | unsigned int keycodesize; |
1145 | void *keycode; | 1172 | void *keycode; |
@@ -1153,11 +1180,13 @@ struct input_dev { | |||
1153 | unsigned int repeat_key; | 1180 | unsigned int repeat_key; |
1154 | struct timer_list timer; | 1181 | struct timer_list timer; |
1155 | 1182 | ||
1156 | int sync; | ||
1157 | |||
1158 | int abs[ABS_CNT]; | 1183 | int abs[ABS_CNT]; |
1159 | int rep[REP_MAX + 1]; | 1184 | int rep[REP_MAX + 1]; |
1160 | 1185 | ||
1186 | struct input_mt_slot *mt; | ||
1187 | int mtsize; | ||
1188 | int slot; | ||
1189 | |||
1161 | unsigned long key[BITS_TO_LONGS(KEY_CNT)]; | 1190 | unsigned long key[BITS_TO_LONGS(KEY_CNT)]; |
1162 | unsigned long led[BITS_TO_LONGS(LED_CNT)]; | 1191 | unsigned long led[BITS_TO_LONGS(LED_CNT)]; |
1163 | unsigned long snd[BITS_TO_LONGS(SND_CNT)]; | 1192 | unsigned long snd[BITS_TO_LONGS(SND_CNT)]; |
@@ -1182,6 +1211,8 @@ struct input_dev { | |||
1182 | unsigned int users; | 1211 | unsigned int users; |
1183 | bool going_away; | 1212 | bool going_away; |
1184 | 1213 | ||
1214 | bool sync; | ||
1215 | |||
1185 | struct device dev; | 1216 | struct device dev; |
1186 | 1217 | ||
1187 | struct list_head h_list; | 1218 | struct list_head h_list; |
@@ -1406,8 +1437,28 @@ static inline void input_mt_sync(struct input_dev *dev) | |||
1406 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); | 1437 | input_event(dev, EV_SYN, SYN_MT_REPORT, 0); |
1407 | } | 1438 | } |
1408 | 1439 | ||
1440 | static inline void input_mt_slot(struct input_dev *dev, int slot) | ||
1441 | { | ||
1442 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | ||
1443 | } | ||
1444 | |||
1409 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); | 1445 | void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code); |
1410 | 1446 | ||
1447 | /** | ||
1448 | * input_set_events_per_packet - tell handlers about the driver event rate | ||
1449 | * @dev: the input device used by the driver | ||
1450 | * @n_events: the average number of events between calls to input_sync() | ||
1451 | * | ||
1452 | * If the event rate sent from a device is unusually large, use this | ||
1453 | * function to set the expected event rate. This will allow handlers | ||
1454 | * to set up an appropriate buffer size for the event stream, in order | ||
1455 | * to minimize information loss. | ||
1456 | */ | ||
1457 | static inline void input_set_events_per_packet(struct input_dev *dev, int n_events) | ||
1458 | { | ||
1459 | dev->hint_events_per_packet = n_events; | ||
1460 | } | ||
1461 | |||
1411 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) | 1462 | static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) |
1412 | { | 1463 | { |
1413 | dev->absmin[axis] = min; | 1464 | dev->absmin[axis] = min; |
@@ -1485,5 +1536,8 @@ int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file); | |||
1485 | int input_ff_create_memless(struct input_dev *dev, void *data, | 1536 | int input_ff_create_memless(struct input_dev *dev, void *data, |
1486 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); | 1537 | int (*play_effect)(struct input_dev *, void *, struct ff_effect *)); |
1487 | 1538 | ||
1539 | int input_mt_create_slots(struct input_dev *dev, unsigned int num_slots); | ||
1540 | void input_mt_destroy_slots(struct input_dev *dev); | ||
1541 | |||
1488 | #endif | 1542 | #endif |
1489 | #endif | 1543 | #endif |
diff --git a/include/linux/input/adxl34x.h b/include/linux/input/adxl34x.h new file mode 100644 index 000000000000..df00d998a44a --- /dev/null +++ b/include/linux/input/adxl34x.h | |||
@@ -0,0 +1,349 @@ | |||
1 | /* | ||
2 | * include/linux/input/adxl34x.h | ||
3 | * | ||
4 | * Digital Accelerometer characteristics are highly application specific | ||
5 | * and may vary between boards and models. The platform_data for the | ||
6 | * device's "struct device" holds this information. | ||
7 | * | ||
8 | * Copyright 2009 Analog Devices Inc. | ||
9 | * | ||
10 | * Licensed under the GPL-2 or later. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_INPUT_ADXL34X_H__ | ||
14 | #define __LINUX_INPUT_ADXL34X_H__ | ||
15 | |||
16 | struct adxl34x_platform_data { | ||
17 | |||
18 | /* | ||
19 | * X,Y,Z Axis Offset: | ||
20 | * offer user offset adjustments in twoscompliment | ||
21 | * form with a scale factor of 15.6 mg/LSB (i.e. 0x7F = +2 g) | ||
22 | */ | ||
23 | |||
24 | s8 x_axis_offset; | ||
25 | s8 y_axis_offset; | ||
26 | s8 z_axis_offset; | ||
27 | |||
28 | /* | ||
29 | * TAP_X/Y/Z Enable: Setting TAP_X, Y, or Z Enable enables X, | ||
30 | * Y, or Z participation in Tap detection. A '0' excludes the | ||
31 | * selected axis from participation in Tap detection. | ||
32 | * Setting the SUPPRESS bit suppresses Double Tap detection if | ||
33 | * acceleration greater than tap_threshold is present between | ||
34 | * taps. | ||
35 | */ | ||
36 | |||
37 | #define ADXL_SUPPRESS (1 << 3) | ||
38 | #define ADXL_TAP_X_EN (1 << 2) | ||
39 | #define ADXL_TAP_Y_EN (1 << 1) | ||
40 | #define ADXL_TAP_Z_EN (1 << 0) | ||
41 | |||
42 | u8 tap_axis_control; | ||
43 | |||
44 | /* | ||
45 | * tap_threshold: | ||
46 | * holds the threshold value for tap detection/interrupts. | ||
47 | * The data format is unsigned. The scale factor is 62.5 mg/LSB | ||
48 | * (i.e. 0xFF = +16 g). A zero value may result in undesirable | ||
49 | * behavior if Tap/Double Tap is enabled. | ||
50 | */ | ||
51 | |||
52 | u8 tap_threshold; | ||
53 | |||
54 | /* | ||
55 | * tap_duration: | ||
56 | * is an unsigned time value representing the maximum | ||
57 | * time that an event must be above the tap_threshold threshold | ||
58 | * to qualify as a tap event. The scale factor is 625 us/LSB. A zero | ||
59 | * value will prevent Tap/Double Tap functions from working. | ||
60 | */ | ||
61 | |||
62 | u8 tap_duration; | ||
63 | |||
64 | /* | ||
65 | * tap_latency: | ||
66 | * is an unsigned time value representing the wait time | ||
67 | * from the detection of a tap event to the opening of the time | ||
68 | * window tap_window for a possible second tap event. The scale | ||
69 | * factor is 1.25 ms/LSB. A zero value will disable the Double Tap | ||
70 | * function. | ||
71 | */ | ||
72 | |||
73 | u8 tap_latency; | ||
74 | |||
75 | /* | ||
76 | * tap_window: | ||
77 | * is an unsigned time value representing the amount | ||
78 | * of time after the expiration of tap_latency during which a second | ||
79 | * tap can begin. The scale factor is 1.25 ms/LSB. A zero value will | ||
80 | * disable the Double Tap function. | ||
81 | */ | ||
82 | |||
83 | u8 tap_window; | ||
84 | |||
85 | /* | ||
86 | * act_axis_control: | ||
87 | * X/Y/Z Enable: A '1' enables X, Y, or Z participation in activity | ||
88 | * or inactivity detection. A '0' excludes the selected axis from | ||
89 | * participation. If all of the axes are excluded, the function is | ||
90 | * disabled. | ||
91 | * AC/DC: A '0' = DC coupled operation and a '1' = AC coupled | ||
92 | * operation. In DC coupled operation, the current acceleration is | ||
93 | * compared with activity_threshold and inactivity_threshold directly | ||
94 | * to determine whether activity or inactivity is detected. In AC | ||
95 | * coupled operation for activity detection, the acceleration value | ||
96 | * at the start of activity detection is taken as a reference value. | ||
97 | * New samples of acceleration are then compared to this | ||
98 | * reference value and if the magnitude of the difference exceeds | ||
99 | * activity_threshold the device will trigger an activity interrupt. In | ||
100 | * AC coupled operation for inactivity detection, a reference value | ||
101 | * is used again for comparison and is updated whenever the | ||
102 | * device exceeds the inactivity threshold. Once the reference | ||
103 | * value is selected, the device compares the magnitude of the | ||
104 | * difference between the reference value and the current | ||
105 | * acceleration with inactivity_threshold. If the difference is below | ||
106 | * inactivity_threshold for a total of inactivity_time, the device is | ||
107 | * considered inactive and the inactivity interrupt is triggered. | ||
108 | */ | ||
109 | |||
110 | #define ADXL_ACT_ACDC (1 << 7) | ||
111 | #define ADXL_ACT_X_EN (1 << 6) | ||
112 | #define ADXL_ACT_Y_EN (1 << 5) | ||
113 | #define ADXL_ACT_Z_EN (1 << 4) | ||
114 | #define ADXL_INACT_ACDC (1 << 3) | ||
115 | #define ADXL_INACT_X_EN (1 << 2) | ||
116 | #define ADXL_INACT_Y_EN (1 << 1) | ||
117 | #define ADXL_INACT_Z_EN (1 << 0) | ||
118 | |||
119 | u8 act_axis_control; | ||
120 | |||
121 | /* | ||
122 | * activity_threshold: | ||
123 | * holds the threshold value for activity detection. | ||
124 | * The data format is unsigned. The scale factor is | ||
125 | * 62.5 mg/LSB. A zero value may result in undesirable behavior if | ||
126 | * Activity interrupt is enabled. | ||
127 | */ | ||
128 | |||
129 | u8 activity_threshold; | ||
130 | |||
131 | /* | ||
132 | * inactivity_threshold: | ||
133 | * holds the threshold value for inactivity | ||
134 | * detection. The data format is unsigned. The scale | ||
135 | * factor is 62.5 mg/LSB. A zero value may result in undesirable | ||
136 | * behavior if Inactivity interrupt is enabled. | ||
137 | */ | ||
138 | |||
139 | u8 inactivity_threshold; | ||
140 | |||
141 | /* | ||
142 | * inactivity_time: | ||
143 | * is an unsigned time value representing the | ||
144 | * amount of time that acceleration must be below the value in | ||
145 | * inactivity_threshold for inactivity to be declared. The scale factor | ||
146 | * is 1 second/LSB. Unlike the other interrupt functions, which | ||
147 | * operate on unfiltered data, the inactivity function operates on the | ||
148 | * filtered output data. At least one output sample must be | ||
149 | * generated for the inactivity interrupt to be triggered. This will | ||
150 | * result in the function appearing un-responsive if the | ||
151 | * inactivity_time register is set with a value less than the time | ||
152 | * constant of the Output Data Rate. A zero value will result in an | ||
153 | * interrupt when the output data is below inactivity_threshold. | ||
154 | */ | ||
155 | |||
156 | u8 inactivity_time; | ||
157 | |||
158 | /* | ||
159 | * free_fall_threshold: | ||
160 | * holds the threshold value for Free-Fall detection. | ||
161 | * The data format is unsigned. The root-sum-square(RSS) value | ||
162 | * of all axes is calculated and compared to the value in | ||
163 | * free_fall_threshold to determine if a free fall event may be | ||
164 | * occurring. The scale factor is 62.5 mg/LSB. A zero value may | ||
165 | * result in undesirable behavior if Free-Fall interrupt is | ||
166 | * enabled. Values between 300 and 600 mg (0x05 to 0x09) are | ||
167 | * recommended. | ||
168 | */ | ||
169 | |||
170 | u8 free_fall_threshold; | ||
171 | |||
172 | /* | ||
173 | * free_fall_time: | ||
174 | * is an unsigned time value representing the minimum | ||
175 | * time that the RSS value of all axes must be less than | ||
176 | * free_fall_threshold to generate a Free-Fall interrupt. The | ||
177 | * scale factor is 5 ms/LSB. A zero value may result in | ||
178 | * undesirable behavior if Free-Fall interrupt is enabled. | ||
179 | * Values between 100 to 350 ms (0x14 to 0x46) are recommended. | ||
180 | */ | ||
181 | |||
182 | u8 free_fall_time; | ||
183 | |||
184 | /* | ||
185 | * data_rate: | ||
186 | * Selects device bandwidth and output data rate. | ||
187 | * RATE = 3200 Hz / (2^(15 - x)). Default value is 0x0A, or 100 Hz | ||
188 | * Output Data Rate. An Output Data Rate should be selected that | ||
189 | * is appropriate for the communication protocol and frequency | ||
190 | * selected. Selecting too high of an Output Data Rate with a low | ||
191 | * communication speed will result in samples being discarded. | ||
192 | */ | ||
193 | |||
194 | u8 data_rate; | ||
195 | |||
196 | /* | ||
197 | * data_range: | ||
198 | * FULL_RES: When this bit is set with the device is | ||
199 | * in Full-Resolution Mode, where the output resolution increases | ||
200 | * with RANGE to maintain a 4 mg/LSB scale factor. When this | ||
201 | * bit is cleared the device is in 10-bit Mode and RANGE determine the | ||
202 | * maximum g-Range and scale factor. | ||
203 | */ | ||
204 | |||
205 | #define ADXL_FULL_RES (1 << 3) | ||
206 | #define ADXL_RANGE_PM_2g 0 | ||
207 | #define ADXL_RANGE_PM_4g 1 | ||
208 | #define ADXL_RANGE_PM_8g 2 | ||
209 | #define ADXL_RANGE_PM_16g 3 | ||
210 | |||
211 | u8 data_range; | ||
212 | |||
213 | /* | ||
214 | * low_power_mode: | ||
215 | * A '0' = Normal operation and a '1' = Reduced | ||
216 | * power operation with somewhat higher noise. | ||
217 | */ | ||
218 | |||
219 | u8 low_power_mode; | ||
220 | |||
221 | /* | ||
222 | * power_mode: | ||
223 | * LINK: A '1' with both the activity and inactivity functions | ||
224 | * enabled will delay the start of the activity function until | ||
225 | * inactivity is detected. Once activity is detected, inactivity | ||
226 | * detection will begin and prevent the detection of activity. This | ||
227 | * bit serially links the activity and inactivity functions. When '0' | ||
228 | * the inactivity and activity functions are concurrent. Additional | ||
229 | * information can be found in the Application section under Link | ||
230 | * Mode. | ||
231 | * AUTO_SLEEP: A '1' sets the ADXL34x to switch to Sleep Mode | ||
232 | * when inactivity (acceleration has been below inactivity_threshold | ||
233 | * for at least inactivity_time) is detected and the LINK bit is set. | ||
234 | * A '0' disables automatic switching to Sleep Mode. See SLEEP | ||
235 | * for further description. | ||
236 | */ | ||
237 | |||
238 | #define ADXL_LINK (1 << 5) | ||
239 | #define ADXL_AUTO_SLEEP (1 << 4) | ||
240 | |||
241 | u8 power_mode; | ||
242 | |||
243 | /* | ||
244 | * fifo_mode: | ||
245 | * BYPASS The FIFO is bypassed | ||
246 | * FIFO FIFO collects up to 32 values then stops collecting data | ||
247 | * STREAM FIFO holds the last 32 data values. Once full, the FIFO's | ||
248 | * oldest data is lost as it is replaced with newer data | ||
249 | * | ||
250 | * DEFAULT should be ADXL_FIFO_STREAM | ||
251 | */ | ||
252 | |||
253 | #define ADXL_FIFO_BYPASS 0 | ||
254 | #define ADXL_FIFO_FIFO 1 | ||
255 | #define ADXL_FIFO_STREAM 2 | ||
256 | |||
257 | u8 fifo_mode; | ||
258 | |||
259 | /* | ||
260 | * watermark: | ||
261 | * The Watermark feature can be used to reduce the interrupt load | ||
262 | * of the system. The FIFO fills up to the value stored in watermark | ||
263 | * [1..32] and then generates an interrupt. | ||
264 | * A '0' disables the watermark feature. | ||
265 | */ | ||
266 | |||
267 | u8 watermark; | ||
268 | |||
269 | u32 ev_type; /* EV_ABS or EV_REL */ | ||
270 | |||
271 | u32 ev_code_x; /* ABS_X,Y,Z or REL_X,Y,Z */ | ||
272 | u32 ev_code_y; /* ABS_X,Y,Z or REL_X,Y,Z */ | ||
273 | u32 ev_code_z; /* ABS_X,Y,Z or REL_X,Y,Z */ | ||
274 | |||
275 | /* | ||
276 | * A valid BTN or KEY Code; use tap_axis_control to disable | ||
277 | * event reporting | ||
278 | */ | ||
279 | |||
280 | u32 ev_code_tap[3]; /* EV_KEY {X-Axis, Y-Axis, Z-Axis} */ | ||
281 | |||
282 | /* | ||
283 | * A valid BTN or KEY Code for Free-Fall or Activity enables | ||
284 | * input event reporting. A '0' disables the Free-Fall or | ||
285 | * Activity reporting. | ||
286 | */ | ||
287 | |||
288 | u32 ev_code_ff; /* EV_KEY */ | ||
289 | u32 ev_code_act_inactivity; /* EV_KEY */ | ||
290 | |||
291 | /* | ||
292 | * Use ADXL34x INT2 instead of INT1 | ||
293 | */ | ||
294 | u8 use_int2; | ||
295 | |||
296 | /* | ||
297 | * ADXL346 only ORIENTATION SENSING feature | ||
298 | * The orientation function of the ADXL346 reports both 2-D and | ||
299 | * 3-D orientation concurrently. | ||
300 | */ | ||
301 | |||
302 | #define ADXL_EN_ORIENTATION_2D 1 | ||
303 | #define ADXL_EN_ORIENTATION_3D 2 | ||
304 | #define ADXL_EN_ORIENTATION_2D_3D 3 | ||
305 | |||
306 | u8 orientation_enable; | ||
307 | |||
308 | /* | ||
309 | * The width of the deadzone region between two or more | ||
310 | * orientation positions is determined by setting the Deadzone | ||
311 | * value. The deadzone region size can be specified with a | ||
312 | * resolution of 3.6deg. The deadzone angle represents the total | ||
313 | * angle where the orientation is considered invalid. | ||
314 | */ | ||
315 | |||
316 | #define ADXL_DEADZONE_ANGLE_0p0 0 /* !!!0.0 [deg] */ | ||
317 | #define ADXL_DEADZONE_ANGLE_3p6 1 /* 3.6 [deg] */ | ||
318 | #define ADXL_DEADZONE_ANGLE_7p2 2 /* 7.2 [deg] */ | ||
319 | #define ADXL_DEADZONE_ANGLE_10p8 3 /* 10.8 [deg] */ | ||
320 | #define ADXL_DEADZONE_ANGLE_14p4 4 /* 14.4 [deg] */ | ||
321 | #define ADXL_DEADZONE_ANGLE_18p0 5 /* 18.0 [deg] */ | ||
322 | #define ADXL_DEADZONE_ANGLE_21p6 6 /* 21.6 [deg] */ | ||
323 | #define ADXL_DEADZONE_ANGLE_25p2 7 /* 25.2 [deg] */ | ||
324 | |||
325 | u8 deadzone_angle; | ||
326 | |||
327 | /* | ||
328 | * To eliminate most human motion such as walking or shaking, | ||
329 | * a Divisor value should be selected to effectively limit the | ||
330 | * orientation bandwidth. Set the depth of the filter used to | ||
331 | * low-pass filter the measured acceleration for stable | ||
332 | * orientation sensing | ||
333 | */ | ||
334 | |||
335 | #define ADXL_LP_FILTER_DIVISOR_2 0 | ||
336 | #define ADXL_LP_FILTER_DIVISOR_4 1 | ||
337 | #define ADXL_LP_FILTER_DIVISOR_8 2 | ||
338 | #define ADXL_LP_FILTER_DIVISOR_16 3 | ||
339 | #define ADXL_LP_FILTER_DIVISOR_32 4 | ||
340 | #define ADXL_LP_FILTER_DIVISOR_64 5 | ||
341 | #define ADXL_LP_FILTER_DIVISOR_128 6 | ||
342 | #define ADXL_LP_FILTER_DIVISOR_256 7 | ||
343 | |||
344 | u8 divisor_length; | ||
345 | |||
346 | u32 ev_codes_orient_2d[4]; /* EV_KEY {+X, -X, +Y, -Y} */ | ||
347 | u32 ev_codes_orient_3d[6]; /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */ | ||
348 | }; | ||
349 | #endif | ||
diff --git a/include/linux/input/cy8ctmg110_pdata.h b/include/linux/input/cy8ctmg110_pdata.h new file mode 100644 index 000000000000..09522cb59910 --- /dev/null +++ b/include/linux/input/cy8ctmg110_pdata.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef _LINUX_CY8CTMG110_PDATA_H | ||
2 | #define _LINUX_CY8CTMG110_PDATA_H | ||
3 | |||
4 | struct cy8ctmg110_pdata | ||
5 | { | ||
6 | int reset_pin; /* Reset pin is wired to this GPIO (optional) */ | ||
7 | int irq_pin; /* IRQ pin is wired to this GPIO */ | ||
8 | }; | ||
9 | |||
10 | #endif | ||
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index c964cd7f436a..80352ad6581a 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
@@ -41,6 +41,9 @@ struct matrix_keymap_data { | |||
41 | * @col_scan_delay_us: delay, measured in microseconds, that is | 41 | * @col_scan_delay_us: delay, measured in microseconds, that is |
42 | * needed before we can keypad after activating column gpio | 42 | * needed before we can keypad after activating column gpio |
43 | * @debounce_ms: debounce interval in milliseconds | 43 | * @debounce_ms: debounce interval in milliseconds |
44 | * @clustered_irq: may be specified if interrupts of all row/column GPIOs | ||
45 | * are bundled to one single irq | ||
46 | * @clustered_irq_flags: flags that are needed for the clustered irq | ||
44 | * @active_low: gpio polarity | 47 | * @active_low: gpio polarity |
45 | * @wakeup: controls whether the device should be set up as wakeup | 48 | * @wakeup: controls whether the device should be set up as wakeup |
46 | * source | 49 | * source |
@@ -63,6 +66,9 @@ struct matrix_keypad_platform_data { | |||
63 | /* key debounce interval in milli-second */ | 66 | /* key debounce interval in milli-second */ |
64 | unsigned int debounce_ms; | 67 | unsigned int debounce_ms; |
65 | 68 | ||
69 | unsigned int clustered_irq; | ||
70 | unsigned int clustered_irq_flags; | ||
71 | |||
66 | bool active_low; | 72 | bool active_low; |
67 | bool wakeup; | 73 | bool wakeup; |
68 | bool no_autorepeat; | 74 | bool no_autorepeat; |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index b4ae570d3c98..92bd0839d5b4 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -48,11 +48,12 @@ struct ads7846_platform_data { | |||
48 | * state if get_pendown_state == NULL | 48 | * state if get_pendown_state == NULL |
49 | */ | 49 | */ |
50 | int (*get_pendown_state)(void); | 50 | int (*get_pendown_state)(void); |
51 | int (*filter_init) (struct ads7846_platform_data *pdata, | 51 | int (*filter_init) (const struct ads7846_platform_data *pdata, |
52 | void **filter_data); | 52 | void **filter_data); |
53 | int (*filter) (void *filter_data, int data_idx, int *val); | 53 | int (*filter) (void *filter_data, int data_idx, int *val); |
54 | void (*filter_cleanup)(void *filter_data); | 54 | void (*filter_cleanup)(void *filter_data); |
55 | void (*wait_for_sync)(void); | 55 | void (*wait_for_sync)(void); |
56 | bool wakeup; | 56 | bool wakeup; |
57 | unsigned long irq_flags; | ||
57 | }; | 58 | }; |
58 | 59 | ||