diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2013-02-13 23:56:33 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-02-14 12:17:43 -0500 |
commit | 99df65e705503a97a5fceb30317086a091b4052d (patch) | |
tree | 64cf9740392adaf35030b2d2fc1b536e1c41eac1 /drivers/input/mouse/alps.h | |
parent | 88a803482c4165642409bab77424a27939d51500 (diff) |
Input: ALPS - copy "model" info into alps_data struct
Not every type of ALPS touchpad is well-suited to table-based detection.
Start moving the various alps_model_data attributes into the alps_data
struct so that we don't need a unique table entry for every possible
permutation of protocol version, flags, byte0/mask0, etc.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Tested-by: Dave Turvene <dturvene@dahetral.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/alps.h')
-rw-r--r-- | drivers/input/mouse/alps.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index 67be4e5fa1cd..efd0eea9f001 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h | |||
@@ -63,10 +63,15 @@ struct alps_nibble_commands { | |||
63 | * struct alps_data - private data structure for the ALPS driver | 63 | * struct alps_data - private data structure for the ALPS driver |
64 | * @dev2: "Relative" device used to report trackstick or mouse activity. | 64 | * @dev2: "Relative" device used to report trackstick or mouse activity. |
65 | * @phys: Physical path for the relative device. | 65 | * @phys: Physical path for the relative device. |
66 | * @i: Information on the detected touchpad model. | ||
67 | * @nibble_commands: Command mapping used for touchpad register accesses. | 66 | * @nibble_commands: Command mapping used for touchpad register accesses. |
68 | * @addr_command: Command used to tell the touchpad that a register address | 67 | * @addr_command: Command used to tell the touchpad that a register address |
69 | * follows. | 68 | * follows. |
69 | * @proto_version: Indicates V1/V2/V3/... | ||
70 | * @byte0: Helps figure out whether a position report packet matches the | ||
71 | * known format for this model. The first byte of the report, ANDed with | ||
72 | * mask0, should match byte0. | ||
73 | * @mask0: The mask used to check the first byte of the report. | ||
74 | * @flags: Additional device capabilities (passthrough port, trackstick, etc.). | ||
70 | * @prev_fin: Finger bit from previous packet. | 75 | * @prev_fin: Finger bit from previous packet. |
71 | * @multi_packet: Multi-packet data in progress. | 76 | * @multi_packet: Multi-packet data in progress. |
72 | * @multi_data: Saved multi-packet data. | 77 | * @multi_data: Saved multi-packet data. |
@@ -81,9 +86,14 @@ struct alps_nibble_commands { | |||
81 | struct alps_data { | 86 | struct alps_data { |
82 | struct input_dev *dev2; | 87 | struct input_dev *dev2; |
83 | char phys[32]; | 88 | char phys[32]; |
84 | const struct alps_model_info *i; | 89 | |
90 | /* these are autodetected when the device is identified */ | ||
85 | const struct alps_nibble_commands *nibble_commands; | 91 | const struct alps_nibble_commands *nibble_commands; |
86 | int addr_command; | 92 | int addr_command; |
93 | unsigned char proto_version; | ||
94 | unsigned char byte0, mask0; | ||
95 | unsigned char flags; | ||
96 | |||
87 | int prev_fin; | 97 | int prev_fin; |
88 | int multi_packet; | 98 | int multi_packet; |
89 | unsigned char multi_data[6]; | 99 | unsigned char multi_data[6]; |