]> git.baikalelectronics.ru Git - kernel.git/commit
HID: google: extract Vivaldi hid feature mapping for use in hid-hammer
authorStephen Boyd <swboyd@chromium.org>
Tue, 15 Mar 2022 04:04:39 +0000 (21:04 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 15 Mar 2022 04:11:10 +0000 (21:11 -0700)
commit9c20ef4eb6b9b7af55148a31dc55b6bd2343d4e9
treec058434a3b47884d8a8ab8ab1b3072f41b2d10fc
parent84b1aa16053b0443ceab0240f88b2ac976605a56
HID: google: extract Vivaldi hid feature mapping for use in hid-hammer

We need to support parsing the HID device in both the Vivaldi and the
Hammer drivers so that we can properly expose the function row physmap
to userspace when a hammer device uses a vivaldi keyboard layout for the
function row keys. Extract the feature mapping logic from the vivaldi
driver into an hid specific vivaldi library so we can use it from both
HID drivers.

To allow more code sharing we mandate that vivaldi data must be placed
at the very beginning of the driver data attached to the HID device
instance.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org> # coachz, wormdingler
Link: https://lore.kernel.org/r/20220228075446.466016-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/hid/Kconfig
drivers/hid/Makefile
drivers/hid/hid-vivaldi-common.c [new file with mode: 0644]
drivers/hid/hid-vivaldi-common.h [new file with mode: 0644]
drivers/hid/hid-vivaldi.c