aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/Kconfig
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2022-03-14 21:04:39 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-03-14 21:11:10 -0700
commit33bbe04a15f292998298cdb5751788c15acd60df (patch)
treec058434a3b47884d8a8ab8ab1b3072f41b2d10fc /drivers/hid/Kconfig
parentInput: extract ChromeOS vivaldi physmap show function (diff)
downloadlinux-dev-33bbe04a15f292998298cdb5751788c15acd60df.tar.xz
linux-dev-33bbe04a15f292998298cdb5751788c15acd60df.zip
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>
Diffstat (limited to 'drivers/hid/Kconfig')
-rw-r--r--drivers/hid/Kconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 5569a2029dab..f5245c5fe1af 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -403,6 +403,13 @@ config HOLTEK_FF
Say Y here if you have a Holtek On Line Grip based game controller
and want to have force feedback support for it.
+config HID_VIVALDI_COMMON
+ tristate
+ help
+ ChromeOS Vivaldi HID parsing support library. This is a hidden
+ option so that drivers can use common code to parse the HID
+ descriptors for vivaldi function row keymap.
+
config HID_GOOGLE_HAMMER
tristate "Google Hammer Keyboard"
depends on USB_HID && LEDS_CLASS && CROS_EC
@@ -411,6 +418,7 @@ config HID_GOOGLE_HAMMER
config HID_VIVALDI
tristate "Vivaldi Keyboard"
+ select HID_VIVALDI_COMMON
select INPUT_VIVALDIFMAP
depends on HID
help