usb_hid: enable driver level multi-touch support

This commit enables generic Linux multi-touch support as well as support
for the Wacom Intuos/Graphire tablets as found in the previous version
of the USB HID driver. Events are not properly propagated through
Genode's Event C-API, yet, which will be a follow up.

Issue #5105
This commit is contained in:
Sebastian Sumpf 2024-01-05 19:15:12 +01:00 committed by Christian Helmuth
parent c57b841556
commit fccf025d2f
17 changed files with 303 additions and 27 deletions

View File

@ -344,6 +344,8 @@ drivers/base/power/power.h
drivers/base/trace.h
drivers/hid/hid-ids.h
drivers/hid/usbhid/usbhid.h
drivers/hid/wacom.h
drivers/hid/wacom_wac.h
drivers/input/input-compat.h
drivers/input/input-core-private.h
drivers/input/input-poller.h
@ -956,6 +958,7 @@ include/linux/uprobes.h
include/linux/usb.h
include/linux/usb/ch9.h
include/linux/usb/hcd.h
include/linux/usb/input.h
include/linux/usb/of.h
include/linux/usb/onboard_hub.h
include/linux/usb/otg.h

View File

@ -256,14 +256,6 @@ void input_ff_destroy(struct input_dev * dev)
}
#include <linux/input/mt.h>
void input_mt_destroy_slots(struct input_dev * dev)
{
lx_emul_trace(__func__);
}
#include <linux/skbuff.h>
void skb_init()

View File

@ -1,7 +1,7 @@
/*
* \brief Dummy definitions of Linux Kernel functions
* \author Automatically generated file - do no edit
* \date 2023-07-01
* \date 2024-02-05
*/
#include <lx_emul.h>
@ -161,6 +161,22 @@ int devm_led_classdev_register_ext(struct device * parent,struct led_classdev *
}
#include <linux/leds.h>
int devm_led_trigger_register(struct device * dev,struct led_trigger * trig)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
struct power_supply * __must_check devm_power_supply_register(struct device * parent,const struct power_supply_desc * desc,const struct power_supply_config * cfg)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/math64.h>
u64 div64_u64(u64 dividend,u64 divisor)
@ -269,8 +285,9 @@ int input_ff_event(struct input_dev * dev,unsigned int type,unsigned int code,in
}
extern void input_mt_release_slots(struct input_dev * dev);
void input_mt_release_slots(struct input_dev * dev)
#include <linux/math.h>
unsigned long int_sqrt(unsigned long x)
{
lx_emul_trace_and_stop(__func__);
}
@ -396,6 +413,14 @@ int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * e
}
#include <linux/leds.h>
void led_trigger_event(struct led_trigger * trig,enum led_brightness brightness)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/delay.h>
unsigned long lpj_fine;
@ -438,6 +463,30 @@ int of_property_read_string(const struct device_node * np,const char * propname,
}
#include <linux/power_supply.h>
void power_supply_changed(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
void * power_supply_get_drvdata(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
int power_supply_powers(struct power_supply * psy,struct device * dev)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/smp.h>
void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait)

View File

@ -3,6 +3,7 @@ arch/arm/lib/div64.S
arch/arm/lib/findbit.S
arch/arm/lib/setbit.S
arch/arm/lib/strchr.S
arch/arm/lib/strrchr.S
arch/arm/lib/testclearbit.S
arch/arm/lib/testsetbit.S
drivers/base/bus.c
@ -19,8 +20,12 @@ drivers/hid/hid-generic.c
drivers/hid/hid-holtek-mouse.c
drivers/hid/hid-input.c
drivers/hid/hid-microsoft.c
drivers/hid/hid-multitouch.c
drivers/hid/hid-quirks.c
drivers/hid/usbhid/hid-core.c
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/input/input-mt.c
drivers/input/input.c
drivers/usb/core/config.c
drivers/usb/core/driver.c
@ -60,6 +65,7 @@ lib/hexdump.c
lib/hweight.c
lib/idr.c
lib/kasprintf.c
lib/kfifo.c
lib/klist.c
lib/kobject.c
lib/kstrtox.c

View File

@ -1,7 +1,7 @@
/*
* \brief Dummy definitions of Linux Kernel functions
* \author Automatically generated file - do no edit
* \date 2024-02-01
* \date 2024-02-05
*/
#include <lx_emul.h>
@ -119,6 +119,22 @@ int devm_led_classdev_register_ext(struct device * parent,struct led_classdev *
}
#include <linux/leds.h>
int devm_led_trigger_register(struct device * dev,struct led_trigger * trig)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
struct power_supply * __must_check devm_power_supply_register(struct device * parent,const struct power_supply_desc * desc,const struct power_supply_config * cfg)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/math64.h>
u64 div64_u64(u64 dividend,u64 divisor)
@ -219,8 +235,9 @@ int input_ff_event(struct input_dev * dev,unsigned int type,unsigned int code,in
}
extern void input_mt_release_slots(struct input_dev * dev);
void input_mt_release_slots(struct input_dev * dev)
#include <linux/math.h>
unsigned long int_sqrt(unsigned long x)
{
lx_emul_trace_and_stop(__func__);
}
@ -298,6 +315,14 @@ int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * e
}
#include <linux/leds.h>
void led_trigger_event(struct led_trigger * trig,enum led_brightness brightness)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/delay.h>
unsigned long lpj_fine;
@ -335,6 +360,30 @@ int of_property_read_string(const struct device_node * np,const char * propname,
}
#include <linux/power_supply.h>
void power_supply_changed(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
void * power_supply_get_drvdata(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
int power_supply_powers(struct power_supply * psy,struct device * dev)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/jump_label.h>
bool static_key_initialized;

View File

@ -3,6 +3,7 @@ arch/arm/lib/div64.S
arch/arm/lib/findbit.S
arch/arm/lib/setbit.S
arch/arm/lib/strchr.S
arch/arm/lib/strrchr.S
arch/arm/lib/testclearbit.S
arch/arm/lib/testsetbit.S
drivers/base/bus.c
@ -19,8 +20,12 @@ drivers/hid/hid-generic.c
drivers/hid/hid-holtek-mouse.c
drivers/hid/hid-input.c
drivers/hid/hid-microsoft.c
drivers/hid/hid-multitouch.c
drivers/hid/hid-quirks.c
drivers/hid/usbhid/hid-core.c
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/input/input-mt.c
drivers/input/input.c
drivers/usb/core/config.c
drivers/usb/core/driver.c

View File

@ -1,7 +1,7 @@
/*
* \brief Dummy definitions of Linux Kernel functions
* \author Automatically generated file - do no edit
* \date 2024-01-19
* \date 2024-02-05
*/
#include <lx_emul.h>
@ -145,6 +145,22 @@ int devm_led_classdev_register_ext(struct device * parent,struct led_classdev *
}
#include <linux/leds.h>
int devm_led_trigger_register(struct device * dev,struct led_trigger * trig)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
struct power_supply * __must_check devm_power_supply_register(struct device * parent,const struct power_supply_desc * desc,const struct power_supply_config * cfg)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/dma-map-ops.h>
bool dma_default_coherent;
@ -229,8 +245,9 @@ int input_ff_event(struct input_dev * dev,unsigned int type,unsigned int code,in
}
extern void input_mt_release_slots(struct input_dev * dev);
void input_mt_release_slots(struct input_dev * dev)
#include <linux/math.h>
unsigned long int_sqrt(unsigned long x)
{
lx_emul_trace_and_stop(__func__);
}
@ -361,6 +378,14 @@ int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * e
}
#include <linux/leds.h>
void led_trigger_event(struct led_trigger * trig,enum led_brightness brightness)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/delay.h>
unsigned long lpj_fine;
@ -403,6 +428,30 @@ int of_property_read_string(const struct device_node * np,const char * propname,
}
#include <linux/power_supply.h>
void power_supply_changed(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
void * power_supply_get_drvdata(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
int power_supply_powers(struct power_supply * psy,struct device * dev)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/smp.h>
void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait)

View File

@ -3,6 +3,7 @@ arch/arm64/lib/strchr.S
arch/arm64/lib/strcmp.S
arch/arm64/lib/strlen.S
arch/arm64/lib/strncmp.S
arch/arm64/lib/strrchr.S
drivers/base/bus.c
drivers/base/class.c
drivers/base/core.c
@ -17,8 +18,12 @@ drivers/hid/hid-generic.c
drivers/hid/hid-holtek-mouse.c
drivers/hid/hid-input.c
drivers/hid/hid-microsoft.c
drivers/hid/hid-multitouch.c
drivers/hid/hid-quirks.c
drivers/hid/usbhid/hid-core.c
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/input/input-mt.c
drivers/input/input.c
drivers/usb/core/config.c
drivers/usb/core/driver.c

View File

@ -1,7 +1,7 @@
/*
* \brief Dummy definitions of Linux Kernel functions
* \author Automatically generated file - do no edit
* \date 2024-01-19
* \date 2024-02-05
*/
#include <lx_emul.h>
@ -123,6 +123,22 @@ int devm_led_classdev_register_ext(struct device * parent,struct led_classdev *
}
#include <linux/leds.h>
int devm_led_trigger_register(struct device * dev,struct led_trigger * trig)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
struct power_supply * __must_check devm_power_supply_register(struct device * parent,const struct power_supply_desc * desc,const struct power_supply_config * cfg)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/math64.h>
u64 div64_u64(u64 dividend,u64 divisor)
@ -223,8 +239,9 @@ int input_ff_event(struct input_dev * dev,unsigned int type,unsigned int code,in
}
extern void input_mt_release_slots(struct input_dev * dev);
void input_mt_release_slots(struct input_dev * dev)
#include <linux/math.h>
unsigned long int_sqrt(unsigned long x)
{
lx_emul_trace_and_stop(__func__);
}
@ -310,6 +327,14 @@ int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * e
}
#include <linux/leds.h>
void led_trigger_event(struct led_trigger * trig,enum led_brightness brightness)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/moduleparam.h>
int param_set_copystring(const char * val,const struct kernel_param * kp)
@ -318,6 +343,30 @@ int param_set_copystring(const char * val,const struct kernel_param * kp)
}
#include <linux/power_supply.h>
void power_supply_changed(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
void * power_supply_get_drvdata(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
int power_supply_powers(struct power_supply * psy,struct device * dev)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/smp.h>
void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait)

View File

@ -13,8 +13,12 @@ drivers/hid/hid-generic.c
drivers/hid/hid-holtek-mouse.c
drivers/hid/hid-input.c
drivers/hid/hid-microsoft.c
drivers/hid/hid-multitouch.c
drivers/hid/hid-quirks.c
drivers/hid/usbhid/hid-core.c
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/input/input-mt.c
drivers/input/input.c
drivers/usb/core/config.c
drivers/usb/core/driver.c

View File

@ -1,7 +1,7 @@
/*
* \brief Dummy definitions of Linux Kernel functions
* \author Automatically generated file - do no edit
* \date 2024-01-22
* \date 2024-02-05
*/
#include <lx_emul.h>
@ -123,6 +123,22 @@ int devm_led_classdev_register_ext(struct device * parent,struct led_classdev *
}
#include <linux/leds.h>
int devm_led_trigger_register(struct device * dev,struct led_trigger * trig)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
struct power_supply * __must_check devm_power_supply_register(struct device * parent,const struct power_supply_desc * desc,const struct power_supply_config * cfg)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/printk.h>
asmlinkage __visible void dump_stack(void)
@ -186,8 +202,9 @@ int input_ff_event(struct input_dev * dev,unsigned int type,unsigned int code,in
}
extern void input_mt_release_slots(struct input_dev * dev);
void input_mt_release_slots(struct input_dev * dev)
#include <linux/math.h>
unsigned long int_sqrt(unsigned long x)
{
lx_emul_trace_and_stop(__func__);
}
@ -278,6 +295,14 @@ int kobject_uevent_env(struct kobject * kobj,enum kobject_action action,char * e
}
#include <linux/leds.h>
void led_trigger_event(struct led_trigger * trig,enum led_brightness brightness)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/moduleparam.h>
int param_set_copystring(const char * val,const struct kernel_param * kp)
@ -286,6 +311,30 @@ int param_set_copystring(const char * val,const struct kernel_param * kp)
}
#include <linux/power_supply.h>
void power_supply_changed(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
void * power_supply_get_drvdata(struct power_supply * psy)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/power_supply.h>
int power_supply_powers(struct power_supply * psy,struct device * dev)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/smp.h>
void smp_call_function_many(const struct cpumask * mask,smp_call_func_t func,void * info,bool wait)

View File

@ -13,8 +13,12 @@ drivers/hid/hid-generic.c
drivers/hid/hid-holtek-mouse.c
drivers/hid/hid-input.c
drivers/hid/hid-microsoft.c
drivers/hid/hid-multitouch.c
drivers/hid/hid-quirks.c
drivers/hid/usbhid/hid-core.c
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/input/input-mt.c
drivers/input/input.c
drivers/usb/core/config.c
drivers/usb/core/driver.c

View File

@ -1,7 +1,7 @@
/*
* \brief Array defining order of Linux Kernel initcalls
* \author Automatically generated file - do no edit
* \date 2023-08-18
* \date 2024-01-05
*/
#pragma once
@ -69,6 +69,7 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_usb_common_init4",
"__initcall_usb_init4",
"__initcall_input_init4",
"__initcall_power_supply_class_init4",
"__initcall_leds_init4",
"__initcall_net_dev_init4",
"__initcall_neigh_init4",
@ -142,6 +143,8 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_holtek_mouse_driver_init6",
"__initcall_holtek_driver_init6",
"__initcall_ms_driver_init6",
"__initcall_mt_driver_init6",
"__initcall_wacom_driver_init6",
"__initcall_hid_init6",
"__initcall_sock_diag_init6",
"__initcall_failover_init6",

View File

@ -1,7 +1,7 @@
/*
* \brief Array defining order of Linux Kernel initcalls
* \author Automatically generated file - do no edit
* \date 2023-08-18
* \date 2024-01-05
*/
#pragma once
@ -154,6 +154,8 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_holtek_mouse_driver_init6",
"__initcall_holtek_driver_init6",
"__initcall_ms_driver_init6",
"__initcall_mt_driver_init6",
"__initcall_wacom_driver_init6",
"__initcall_hid_init6",
"__initcall_sock_diag_init6",
"__initcall_failover_init6",

View File

@ -1,7 +1,7 @@
/*
* \brief Array defining order of Linux Kernel initcalls
* \author Automatically generated file - do no edit
* \date 2023-08-18
* \date 2024-01-05
*/
#pragma once
@ -70,6 +70,7 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_usb_common_init4",
"__initcall_usb_init4",
"__initcall_input_init4",
"__initcall_power_supply_class_init4",
"__initcall_leds_init4",
"__initcall_net_dev_init4",
"__initcall_neigh_init4",
@ -156,6 +157,8 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_holtek_mouse_driver_init6",
"__initcall_holtek_driver_init6",
"__initcall_ms_driver_init6",
"__initcall_mt_driver_init6",
"__initcall_wacom_driver_init6",
"__initcall_hid_init6",
"__initcall_sock_diag_init6",
"__initcall_failover_init6",

View File

@ -1,7 +1,7 @@
/*
* \brief Array defining order of Linux Kernel initcalls
* \author Automatically generated file - do no edit
* \date 2023-07-17
* \date 2024-01-05
*/
#pragma once
@ -72,6 +72,7 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_usb_common_init4",
"__initcall_usb_init4",
"__initcall_input_init4",
"__initcall_power_supply_class_init4",
"__initcall_leds_init4",
"__initcall_net_dev_init4",
"__initcall_neigh_init4",
@ -161,6 +162,8 @@ static const char * lx_emul_initcall_order[] = {
"__initcall_holtek_mouse_driver_init6",
"__initcall_holtek_driver_init6",
"__initcall_ms_driver_init6",
"__initcall_mt_driver_init6",
"__initcall_wacom_driver_init6",
"__initcall_hid_init6",
"__initcall_sock_diag_init6",
"__initcall_failover_init6",

View File

@ -46,6 +46,7 @@ LX_DISABLE += USB_PCI
# USB HID
LX_ENABLE += USB_HID NEW_LEDS INPUT_LEDS LEDS_CLASS
LX_ENABLE += HID_APPLE HID_CHERRY HID_HOLTEK HID_MICROSOFT
LX_ENABLE += HID_MULTITOUCH HID_WACOM
# USB NET
LX_ENABLE += USB_NET_DRIVERS USB_USBNET