diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-01-14 00:08:00 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-02-15 18:44:17 -0500 |
commit | 8326bb5741f3f72f7b789614e620d9f7c2ddc2ba (patch) | |
tree | 13f175b25ed67b73fbbd3f97cc96855fcc77212b /drivers/input/mouse/alps.h | |
parent | fb2dd7a61d6f1590b183199b29a065d14f2627b5 (diff) |
Input: ALPS - split protocol data from model info
In preparation of reworking the way we set protocol parameters let's
split certain protocol items from alps_model_info into a separate
structure.
Tested-by: Pali Rohár <pali.rohar@gmail.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 | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h index f19908abfb15..c79523562608 100644 --- a/drivers/input/mouse/alps.h +++ b/drivers/input/mouse/alps.h | |||
@@ -47,18 +47,28 @@ enum V7_PACKET_ID { | |||
47 | }; | 47 | }; |
48 | 48 | ||
49 | /** | 49 | /** |
50 | * struct alps_protocol_info - information about protocol used by a device | ||
51 | * @version: Indicates V1/V2/V3/... | ||
52 | * @byte0: Helps figure out whether a position report packet matches the | ||
53 | * known format for this model. The first byte of the report, ANDed with | ||
54 | * mask0, should match byte0. | ||
55 | * @mask0: The mask used to check the first byte of the report. | ||
56 | * @flags: Additional device capabilities (passthrough port, trackstick, etc.). | ||
57 | */ | ||
58 | struct alps_protocol_info { | ||
59 | u16 version; | ||
60 | u8 byte0, mask0; | ||
61 | unsigned int flags; | ||
62 | }; | ||
63 | |||
64 | /** | ||
50 | * struct alps_model_info - touchpad ID table | 65 | * struct alps_model_info - touchpad ID table |
51 | * @signature: E7 response string to match. | 66 | * @signature: E7 response string to match. |
52 | * @command_mode_resp: For V3/V4 touchpads, the final byte of the EC response | 67 | * @command_mode_resp: For V3/V4 touchpads, the final byte of the EC response |
53 | * (aka command mode response) identifies the firmware minor version. This | 68 | * (aka command mode response) identifies the firmware minor version. This |
54 | * can be used to distinguish different hardware models which are not | 69 | * can be used to distinguish different hardware models which are not |
55 | * uniquely identifiable through their E7 responses. | 70 | * uniquely identifiable through their E7 responses. |
56 | * @proto_version: Indicates V1/V2/V3/... | 71 | * @protocol_info: information about protcol used by the device. |
57 | * @byte0: Helps figure out whether a position report packet matches the | ||
58 | * known format for this model. The first byte of the report, ANDed with | ||
59 | * mask0, should match byte0. | ||
60 | * @mask0: The mask used to check the first byte of the report. | ||
61 | * @flags: Additional device capabilities (passthrough port, trackstick, etc.). | ||
62 | * | 72 | * |
63 | * Many (but not all) ALPS touchpads can be identified by looking at the | 73 | * Many (but not all) ALPS touchpads can be identified by looking at the |
64 | * values returned in the "E7 report" and/or the "EC report." This table | 74 | * values returned in the "E7 report" and/or the "EC report." This table |
@@ -67,9 +77,7 @@ enum V7_PACKET_ID { | |||
67 | struct alps_model_info { | 77 | struct alps_model_info { |
68 | u8 signature[3]; | 78 | u8 signature[3]; |
69 | u8 command_mode_resp; | 79 | u8 command_mode_resp; |
70 | u16 proto_version; | 80 | struct alps_protocol_info protocol_info; |
71 | u8 byte0, mask0; | ||
72 | unsigned int flags; | ||
73 | }; | 81 | }; |
74 | 82 | ||
75 | /** | 83 | /** |