[PATCH v2 0/5] Input/HID: Consolidate ChromeOS Vivaldi keyboard logic

Stephen Boyd posted 5 patches 4 years, 4 months ago
There is a newer version of this series
drivers/hid/Kconfig                   | 11 +++
drivers/hid/Makefile                  |  1 +
drivers/hid/hid-google-hammer.c       | 97 +++++++++++++++++++++------
drivers/hid/hid-vivaldi-common.c      | 97 +++++++++++++++++++++++++++
drivers/hid/hid-vivaldi.c             | 88 ++----------------------
drivers/input/Kconfig                 |  7 ++
drivers/input/Makefile                |  1 +
drivers/input/keyboard/Kconfig        |  2 +
drivers/input/keyboard/atkbd.c        | 27 +++-----
drivers/input/keyboard/cros_ec_keyb.c | 30 +++------
drivers/input/vivaldi-keymap.c        | 39 +++++++++++
include/linux/input/vivaldi-keymap.h  | 37 ++++++++++
12 files changed, 295 insertions(+), 142 deletions(-)
create mode 100644 drivers/hid/hid-vivaldi-common.c
create mode 100644 drivers/input/vivaldi-keymap.c
create mode 100644 include/linux/input/vivaldi-keymap.h
[PATCH v2 0/5] Input/HID: Consolidate ChromeOS Vivaldi keyboard logic
Posted by Stephen Boyd 4 years, 4 months ago
This is a follow-on to this thread[1] where we discussed the need to
support the vivaldi keyboard function row keys in the google hammer
driver. I've extracted the common code into a new vivaldi-keymap.c file
that can be used by the various keyboard drivers used on ChromeOS
devices to expose the function_row_physmap sysfs attribute. That's a
good place to keep the HID parsing logic for the vivaldi and hammer
keyboards too, so one function goes there for that as well. Finally, we
add support for the function row physmap attribute to the hammer driver.

Changes from v1 (https://lore.kernel.org/r/20220204202021.895426-1-swboyd@chromium.org):
 * Yet another new file for HID part to fix compilation problems

Cc: Jiri Kosina <jikos@kernel.org> 
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "Sean O'Brien" <seobrien@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com>

Stephen Boyd (4):
  Input: atkbd: Convert function_row_physmap to u16 array
  Input: Extract ChromeOS vivaldi physmap show function
  HID: Extract vivaldi hid feature mapping for use in hid-hammer
  HID: google: Add support for vivaldi to hid-hammer

Zhengqiao Xia (1):
  HID: google: modify HID device groups of eel

 drivers/hid/Kconfig                   | 11 +++
 drivers/hid/Makefile                  |  1 +
 drivers/hid/hid-google-hammer.c       | 97 +++++++++++++++++++++------
 drivers/hid/hid-vivaldi-common.c      | 97 +++++++++++++++++++++++++++
 drivers/hid/hid-vivaldi.c             | 88 ++----------------------
 drivers/input/Kconfig                 |  7 ++
 drivers/input/Makefile                |  1 +
 drivers/input/keyboard/Kconfig        |  2 +
 drivers/input/keyboard/atkbd.c        | 27 +++-----
 drivers/input/keyboard/cros_ec_keyb.c | 30 +++------
 drivers/input/vivaldi-keymap.c        | 39 +++++++++++
 include/linux/input/vivaldi-keymap.h  | 37 ++++++++++
 12 files changed, 295 insertions(+), 142 deletions(-)
 create mode 100644 drivers/hid/hid-vivaldi-common.c
 create mode 100644 drivers/input/vivaldi-keymap.c
 create mode 100644 include/linux/input/vivaldi-keymap.h

[1] https://lore.kernel.org/r/nycvar.YFH.7.76.2201140935460.28059@cbobk.fhfr.pm

base-commit: dfd42facf1e4ada021b939b4e19c935dcdd55566
-- 
https://chromeos.dev

Re: [PATCH v2 0/5] Input/HID: Consolidate ChromeOS Vivaldi keyboard logic
Posted by Stephen Boyd 4 years, 4 months ago
Quoting Stephen Boyd (2022-02-09 14:55:51)
> This is a follow-on to this thread[1] where we discussed the need to
> support the vivaldi keyboard function row keys in the google hammer
> driver. I've extracted the common code into a new vivaldi-keymap.c file
> that can be used by the various keyboard drivers used on ChromeOS
> devices to expose the function_row_physmap sysfs attribute. That's a
> good place to keep the HID parsing logic for the vivaldi and hammer
> keyboards too, so one function goes there for that as well. Finally, we
> add support for the function row physmap attribute to the hammer driver.
>
> Changes from v1 (https://lore.kernel.org/r/20220204202021.895426-1-swboyd@chromium.org):
>  * Yet another new file for HID part to fix compilation problems
>
> Cc: Jiri Kosina <jikos@kernel.org>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: "Sean O'Brien" <seobrien@chromium.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Cc: Zhengqiao Xia <xiazhengqiao@huaqin.corp-partner.google.com>
>
> Stephen Boyd (4):
>   Input: atkbd: Convert function_row_physmap to u16 array

I see that this conversion broke stuff. I'll drop this patch and make it
a u32 and resend.

>   Input: Extract ChromeOS vivaldi physmap show function
>   HID: Extract vivaldi hid feature mapping for use in hid-hammer
>   HID: google: Add support for vivaldi to hid-hammer
>