hid-logitech-wtp: refactoring for extensibility
Refactored the driver to allow for future devices to be added.
- Changed the initialization procedure to support multiple hidpp
features. Each feature has methods attached to it, that take care of
init, polling and parsing of events.
- During init, the driver selects the first available feature that is
supported (Currently only TouchPadRawXY is supported).
- All device-specific branches are happening during the init method.
e.q. don't send T651 to raw mode.
- TouchpadRawXY allows two different event formats. Raw or attached to
the end of the mouse events. The init method decides which one to use.
- The data structures now reflect the data required to generate the
output, no longer the data available from the device.
- Reordered and renamed to reflect feature-specific code and generic
code.
BUG=chromium:240850
TEST=manually test with all 3 previously supported touchpads.
Change-Id: I24f67868aa6c26a55193a24c636f0a15a6d70e53
Signed-off-by: Dennis Kempin <denniskempin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/50754
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>