diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2013-02-13 20:56:33 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-02-14 09:17:43 -0800 |
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 67be4e5fa1c..efd0eea9f00 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h @@ -63,10 +63,15 @@ struct alps_nibble_commands { * struct alps_data - private data structure for the ALPS driver * @dev2: "Relative" device used to report trackstick or mouse activity. * @phys: Physical path for the relative device. - * @i: Information on the detected touchpad model. * @nibble_commands: Command mapping used for touchpad register accesses. * @addr_command: Command used to tell the touchpad that a register address * follows. + * @proto_version: Indicates V1/V2/V3/... + * @byte0: Helps figure out whether a position report packet matches the + * known format for this model. The first byte of the report, ANDed with + * mask0, should match byte0. + * @mask0: The mask used to check the first byte of the report. + * @flags: Additional device capabilities (passthrough port, trackstick, etc.). * @prev_fin: Finger bit from previous packet. * @multi_packet: Multi-packet data in progress. * @multi_data: Saved multi-packet data. @@ -81,9 +86,14 @@ struct alps_nibble_commands { struct alps_data { struct input_dev *dev2; char phys[32]; - const struct alps_model_info *i; + + /* these are autodetected when the device is identified */ const struct alps_nibble_commands *nibble_commands; int addr_command; + unsigned char proto_version; + unsigned char byte0, mask0; + unsigned char flags; + int prev_fin; int multi_packet; unsigned char multi_data[6]; |