forked from Minki/linux
33bbe04a15
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>
17 lines
415 B
C
17 lines
415 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _HID_VIVALDI_COMMON_H
|
|
#define _HID_VIVALDI_COMMON_H
|
|
|
|
struct hid_device;
|
|
struct hid_field;
|
|
struct hid_input;
|
|
struct hid_usage;
|
|
|
|
void vivaldi_feature_mapping(struct hid_device *hdev,
|
|
struct hid_field *field, struct hid_usage *usage);
|
|
|
|
int vivaldi_input_configured(struct hid_device *hdev,
|
|
struct hid_input *hidinput);
|
|
|
|
#endif /* _HID_VIVALDI_COMMON_H */
|