hid-for-linus-2025021001
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEL65usyKPHcrRDEicpmLzj2vtYEkFAmepsoQACgkQpmLzj2vt YEmb2g//c9lAemKMzfKuAvm7X3wpuE+eOm98WqgPchWStqYy2yVR/gziIn5GtfV6 0FtOGUyR8qAgozruc+kHOUvuV6rrxWNgc4I+06//k+JhM8uHxC7pKdBSrJAURwsd 9DnZdAIHwu8gQBJ3b2zTtJZC/EEJdjTUOZiSqGL2YszvqjZCRGKXvDzPRwBUGcQq uJAL/RrRWtc0vRmN3DfmCtTA1A+hIOiE8KikYChYFKZdXSTDOKprQANWpfw7zAr0 8m9wv3c0wBX1Na+MdUG4RnxYJbJ/ojcVMtk1u67PmrC6netO/n0YnxFooCelP7BM WQgNvmp/KzMsMzSF98MJd4aiIkf8aeJZv67WJDxKH/pNdpY0y3d57y5U+LNE3bCB 8gfp9YGpkKgBOpv+sMMwSP2vl9OSroDCPitIcF9gJqM6ldw+WpQ7VXgsjHyp96LD lgUYyaUxni/nbp2cVwIUjAX9dgFNagAq0iAsCG0+PaFqsdtRtD4bx7hp8oP650KX KksdABkajP7AF7FtZ5qE4ODjvjtrIuWN+jqL0QKigbXLAlnL2M8ID9iFNB1gvAQK FXGBDNcY3m1/NWiQopmUlGWCYUwZiIxwjhykVlkqHHJLdhlRoVsTVFUbky1W6D4c SewJqrvzTwq+k5kUnvI+yUGM6E0i8rWlvNQwKlhZtR95S0H27kU= =s9Ex -----END PGP SIGNATURE----- Merge tag 'hid-for-linus-2025021001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - build/dependency fixes for hid-lenovo and hid-intel-thc (Arnd Bergmann) - functional fixes for hid-corsair-void (Stuart Hayhurst) - workqueue handling and ordering fix for hid-steam (Vicki Pfau) - Gamepad mode vs. Lizard mode fix for hid-steam (Vicki Pfau) - OOB read fix for hid-thrustmaster (Tulio Fernandes) - fix for very long timeout on certain firmware in intel-ish-hid (Zhang Lixu) - other assorted small code fixes and device ID additions * tag 'hid-for-linus-2025021001' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: hid-steam: Don't use cancel_delayed_work_sync in IRQ context HID: hid-steam: Move hidraw input (un)registering to work HID: hid-thrustmaster: fix stack-out-of-bounds read in usb_check_int_endpoints() HID: apple: fix up the F6 key on the Omoton KB066 keyboard HID: hid-apple: Apple Magic Keyboard a3203 USB-C support samples/hid: fix broken vmlinux path for VMLINUX_BTF samples/hid: remove unnecessary -I flags from libbpf EXTRA_CFLAGS HID: topre: Fix n-key rollover on Realforce R3S TKL boards HID: intel-ish-hid: ipc: Add Panther Lake PCI device IDs HID: multitouch: Add NULL check in mt_input_configured HID: winwing: Add NULL check in winwing_init_led() HID: hid-steam: Fix issues with disabling both gamepad mode and lizard mode HID: ignore non-functional sensor in HP 5MP Camera HID: intel-thc: fix CONFIG_HID dependency HID: lenovo: select CONFIG_ACPI_PLATFORM_PROFILE HID: intel-ish-hid: Send clock sync message immediately after reset HID: intel-ish-hid: fix the length of MNG_SYNC_FW_CLOCK in doorbell HID: corsair-void: Initialise memory for psy_cfg HID: corsair-void: Add missing delayed work cancel for headset status
This commit is contained in:
commit
58c9bf3363
23 changed files with 104 additions and 47 deletions
|
@ -570,6 +570,8 @@ config HID_LED
|
|||
|
||||
config HID_LENOVO
|
||||
tristate "Lenovo / Thinkpad devices"
|
||||
depends on ACPI
|
||||
select ACPI_PLATFORM_PROFILE
|
||||
select NEW_LEDS
|
||||
select LEDS_CLASS
|
||||
help
|
||||
|
@ -1167,7 +1169,8 @@ config HID_TOPRE
|
|||
tristate "Topre REALFORCE keyboards"
|
||||
depends on HID
|
||||
help
|
||||
Say Y for N-key rollover support on Topre REALFORCE R2 108/87 key keyboards.
|
||||
Say Y for N-key rollover support on Topre REALFORCE R2 108/87 key and
|
||||
Topre REALFORCE R3S 87 key keyboards.
|
||||
|
||||
config HID_THINGM
|
||||
tristate "ThingM blink(1) USB RGB LED"
|
||||
|
@ -1374,10 +1377,6 @@ endmenu
|
|||
|
||||
source "drivers/hid/bpf/Kconfig"
|
||||
|
||||
endif # HID
|
||||
|
||||
source "drivers/hid/usbhid/Kconfig"
|
||||
|
||||
source "drivers/hid/i2c-hid/Kconfig"
|
||||
|
||||
source "drivers/hid/intel-ish-hid/Kconfig"
|
||||
|
@ -1388,4 +1387,10 @@ source "drivers/hid/surface-hid/Kconfig"
|
|||
|
||||
source "drivers/hid/intel-thc-hid/Kconfig"
|
||||
|
||||
endif # HID
|
||||
|
||||
# USB support may be used with HID disabled
|
||||
|
||||
source "drivers/hid/usbhid/Kconfig"
|
||||
|
||||
endif # HID_SUPPORT
|
||||
|
|
|
@ -5,7 +5,6 @@ menu "AMD SFH HID Support"
|
|||
|
||||
config AMD_SFH_HID
|
||||
tristate "AMD Sensor Fusion Hub"
|
||||
depends on HID
|
||||
depends on X86
|
||||
help
|
||||
If you say yes to this option, support will be included for the
|
||||
|
|
|
@ -474,6 +474,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
|||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2015)
|
||||
table = magic_keyboard_2015_fn_keys;
|
||||
else if (hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 ||
|
||||
hid->product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021)
|
||||
table = apple2021_fn_keys;
|
||||
|
@ -545,6 +546,9 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
|||
}
|
||||
}
|
||||
|
||||
if (usage->hid == 0xc0301) /* Omoton KB066 quirk */
|
||||
code = KEY_F6;
|
||||
|
||||
if (usage->code != code) {
|
||||
input_event_with_scancode(input, usage->type, code, usage->hid, value);
|
||||
|
||||
|
@ -1150,6 +1154,10 @@ static const struct hid_device_id apple_devices[] = {
|
|||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021),
|
||||
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021),
|
||||
|
|
|
@ -553,7 +553,7 @@ static void corsair_void_battery_remove_work_handler(struct work_struct *work)
|
|||
static void corsair_void_battery_add_work_handler(struct work_struct *work)
|
||||
{
|
||||
struct corsair_void_drvdata *drvdata;
|
||||
struct power_supply_config psy_cfg;
|
||||
struct power_supply_config psy_cfg = {};
|
||||
struct power_supply *new_supply;
|
||||
|
||||
drvdata = container_of(work, struct corsair_void_drvdata,
|
||||
|
@ -726,6 +726,7 @@ static void corsair_void_remove(struct hid_device *hid_dev)
|
|||
if (drvdata->battery)
|
||||
power_supply_unregister(drvdata->battery);
|
||||
|
||||
cancel_delayed_work_sync(&drvdata->delayed_status_work);
|
||||
cancel_delayed_work_sync(&drvdata->delayed_firmware_work);
|
||||
sysfs_remove_group(&hid_dev->dev.kobj, &corsair_void_attr_group);
|
||||
}
|
||||
|
|
|
@ -184,6 +184,7 @@
|
|||
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
|
||||
#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 0x029c
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 0x0320
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 0x029a
|
||||
#define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021 0x029f
|
||||
#define USB_DEVICE_ID_APPLE_TOUCHBAR_BACKLIGHT 0x8102
|
||||
|
@ -1095,6 +1096,7 @@
|
|||
#define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001 0x3001
|
||||
#define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3003 0x3003
|
||||
#define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008 0x3008
|
||||
#define USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473 0x5473
|
||||
|
||||
#define I2C_VENDOR_ID_RAYDIUM 0x2386
|
||||
#define I2C_PRODUCT_ID_RAYDIUM_4B33 0x4b33
|
||||
|
@ -1301,6 +1303,7 @@
|
|||
#define USB_VENDOR_ID_TOPRE 0x0853
|
||||
#define USB_DEVICE_ID_TOPRE_REALFORCE_R2_108 0x0148
|
||||
#define USB_DEVICE_ID_TOPRE_REALFORCE_R2_87 0x0146
|
||||
#define USB_DEVICE_ID_TOPRE_REALFORCE_R3S_87 0x0313
|
||||
|
||||
#define USB_VENDOR_ID_TOPSEED 0x0766
|
||||
#define USB_DEVICE_ID_TOPSEED_CYBERLINK 0x0204
|
||||
|
|
|
@ -32,9 +32,7 @@
|
|||
#include <linux/leds.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)
|
||||
#include <linux/platform_profile.h>
|
||||
#endif /* CONFIG_ACPI_PLATFORM_PROFILE */
|
||||
|
||||
#include "hid-ids.h"
|
||||
|
||||
|
@ -730,13 +728,10 @@ static int lenovo_raw_event_TP_X12_tab(struct hid_device *hdev, u32 raw_data)
|
|||
if (hdev->product == USB_DEVICE_ID_LENOVO_X12_TAB) {
|
||||
report_key_event(input, KEY_RFKILL);
|
||||
return 1;
|
||||
}
|
||||
#if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)
|
||||
else {
|
||||
} else {
|
||||
platform_profile_cycle();
|
||||
return 1;
|
||||
}
|
||||
#endif /* CONFIG_ACPI_PLATFORM_PROFILE */
|
||||
return 0;
|
||||
case TP_X12_RAW_HOTKEY_FN_F10:
|
||||
/* TAB1 has PICKUP Phone and TAB2 use Snipping tool*/
|
||||
|
|
|
@ -1679,9 +1679,12 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
|||
break;
|
||||
}
|
||||
|
||||
if (suffix)
|
||||
if (suffix) {
|
||||
hi->input->name = devm_kasprintf(&hdev->dev, GFP_KERNEL,
|
||||
"%s %s", hdev->name, suffix);
|
||||
if (!hi->input->name)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -891,6 +891,7 @@ static const struct hid_device_id hid_ignore_list[] = {
|
|||
{ HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_DPAD) },
|
||||
#endif
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -313,6 +313,7 @@ struct steam_device {
|
|||
u16 rumble_left;
|
||||
u16 rumble_right;
|
||||
unsigned int sensor_timestamp_us;
|
||||
struct work_struct unregister_work;
|
||||
};
|
||||
|
||||
static int steam_recv_report(struct steam_device *steam,
|
||||
|
@ -1050,10 +1051,10 @@ static void steam_mode_switch_cb(struct work_struct *work)
|
|||
struct steam_device, mode_switch);
|
||||
unsigned long flags;
|
||||
bool client_opened;
|
||||
steam->gamepad_mode = !steam->gamepad_mode;
|
||||
if (!lizard_mode)
|
||||
return;
|
||||
|
||||
steam->gamepad_mode = !steam->gamepad_mode;
|
||||
if (steam->gamepad_mode)
|
||||
steam_set_lizard_mode(steam, false);
|
||||
else {
|
||||
|
@ -1072,6 +1073,31 @@ static void steam_mode_switch_cb(struct work_struct *work)
|
|||
}
|
||||
}
|
||||
|
||||
static void steam_work_unregister_cb(struct work_struct *work)
|
||||
{
|
||||
struct steam_device *steam = container_of(work, struct steam_device,
|
||||
unregister_work);
|
||||
unsigned long flags;
|
||||
bool connected;
|
||||
bool opened;
|
||||
|
||||
spin_lock_irqsave(&steam->lock, flags);
|
||||
opened = steam->client_opened;
|
||||
connected = steam->connected;
|
||||
spin_unlock_irqrestore(&steam->lock, flags);
|
||||
|
||||
if (connected) {
|
||||
if (opened) {
|
||||
steam_sensors_unregister(steam);
|
||||
steam_input_unregister(steam);
|
||||
} else {
|
||||
steam_set_lizard_mode(steam, lizard_mode);
|
||||
steam_input_register(steam);
|
||||
steam_sensors_register(steam);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool steam_is_valve_interface(struct hid_device *hdev)
|
||||
{
|
||||
struct hid_report_enum *rep_enum;
|
||||
|
@ -1117,8 +1143,7 @@ static int steam_client_ll_open(struct hid_device *hdev)
|
|||
steam->client_opened++;
|
||||
spin_unlock_irqrestore(&steam->lock, flags);
|
||||
|
||||
steam_sensors_unregister(steam);
|
||||
steam_input_unregister(steam);
|
||||
schedule_work(&steam->unregister_work);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1135,11 +1160,7 @@ static void steam_client_ll_close(struct hid_device *hdev)
|
|||
connected = steam->connected && !steam->client_opened;
|
||||
spin_unlock_irqrestore(&steam->lock, flags);
|
||||
|
||||
if (connected) {
|
||||
steam_set_lizard_mode(steam, lizard_mode);
|
||||
steam_input_register(steam);
|
||||
steam_sensors_register(steam);
|
||||
}
|
||||
schedule_work(&steam->unregister_work);
|
||||
}
|
||||
|
||||
static int steam_client_ll_raw_request(struct hid_device *hdev,
|
||||
|
@ -1231,6 +1252,7 @@ static int steam_probe(struct hid_device *hdev,
|
|||
INIT_LIST_HEAD(&steam->list);
|
||||
INIT_WORK(&steam->rumble_work, steam_haptic_rumble_cb);
|
||||
steam->sensor_timestamp_us = 0;
|
||||
INIT_WORK(&steam->unregister_work, steam_work_unregister_cb);
|
||||
|
||||
/*
|
||||
* With the real steam controller interface, do not connect hidraw.
|
||||
|
@ -1291,6 +1313,7 @@ err_cancel_work:
|
|||
cancel_work_sync(&steam->work_connect);
|
||||
cancel_delayed_work_sync(&steam->mode_switch);
|
||||
cancel_work_sync(&steam->rumble_work);
|
||||
cancel_work_sync(&steam->unregister_work);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1307,6 +1330,7 @@ static void steam_remove(struct hid_device *hdev)
|
|||
cancel_delayed_work_sync(&steam->mode_switch);
|
||||
cancel_work_sync(&steam->work_connect);
|
||||
cancel_work_sync(&steam->rumble_work);
|
||||
cancel_work_sync(&steam->unregister_work);
|
||||
hid_destroy_device(steam->client_hdev);
|
||||
steam->client_hdev = NULL;
|
||||
steam->client_opened = 0;
|
||||
|
@ -1593,13 +1617,13 @@ static void steam_do_deck_input_event(struct steam_device *steam,
|
|||
|
||||
if (!(b9 & BIT(6)) && steam->did_mode_switch) {
|
||||
steam->did_mode_switch = false;
|
||||
cancel_delayed_work_sync(&steam->mode_switch);
|
||||
cancel_delayed_work(&steam->mode_switch);
|
||||
} else if (!steam->client_opened && (b9 & BIT(6)) && !steam->did_mode_switch) {
|
||||
steam->did_mode_switch = true;
|
||||
schedule_delayed_work(&steam->mode_switch, 45 * HZ / 100);
|
||||
}
|
||||
|
||||
if (!steam->gamepad_mode)
|
||||
if (!steam->gamepad_mode && lizard_mode)
|
||||
return;
|
||||
|
||||
lpad_touched = b10 & BIT(3);
|
||||
|
@ -1669,7 +1693,7 @@ static void steam_do_deck_sensors_event(struct steam_device *steam,
|
|||
*/
|
||||
steam->sensor_timestamp_us += 4000;
|
||||
|
||||
if (!steam->gamepad_mode)
|
||||
if (!steam->gamepad_mode && lizard_mode)
|
||||
return;
|
||||
|
||||
input_event(sensors, EV_MSC, MSC_TIMESTAMP, steam->sensor_timestamp_us);
|
||||
|
|
|
@ -171,7 +171,7 @@ static void thrustmaster_interrupts(struct hid_device *hdev)
|
|||
b_ep = ep->desc.bEndpointAddress;
|
||||
|
||||
/* Are the expected endpoints present? */
|
||||
u8 ep_addr[1] = {b_ep};
|
||||
u8 ep_addr[2] = {b_ep, 0};
|
||||
|
||||
if (!usb_check_int_endpoints(usbif, ep_addr)) {
|
||||
hid_err(hdev, "Unexpected non-int endpoint\n");
|
||||
|
|
|
@ -29,6 +29,11 @@ static const __u8 *topre_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
|||
hid_info(hdev,
|
||||
"fixing up Topre REALFORCE keyboard report descriptor\n");
|
||||
rdesc[72] = 0x02;
|
||||
} else if (*rsize >= 106 && rdesc[28] == 0x29 && rdesc[29] == 0xe7 &&
|
||||
rdesc[30] == 0x81 && rdesc[31] == 0x00) {
|
||||
hid_info(hdev,
|
||||
"fixing up Topre REALFORCE keyboard report descriptor\n");
|
||||
rdesc[31] = 0x02;
|
||||
}
|
||||
return rdesc;
|
||||
}
|
||||
|
@ -38,6 +43,8 @@ static const struct hid_device_id topre_id_table[] = {
|
|||
USB_DEVICE_ID_TOPRE_REALFORCE_R2_108) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPRE,
|
||||
USB_DEVICE_ID_TOPRE_REALFORCE_R2_87) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPRE,
|
||||
USB_DEVICE_ID_TOPRE_REALFORCE_R3S_87) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, topre_id_table);
|
||||
|
|
|
@ -106,6 +106,8 @@ static int winwing_init_led(struct hid_device *hdev,
|
|||
"%s::%s",
|
||||
dev_name(&input->dev),
|
||||
info->led_name);
|
||||
if (!led->cdev.name)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = devm_led_classdev_register(&hdev->dev, &led->cdev);
|
||||
if (ret)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
menuconfig I2C_HID
|
||||
tristate "I2C HID support"
|
||||
default y
|
||||
depends on I2C && INPUT && HID
|
||||
depends on I2C
|
||||
|
||||
if I2C_HID
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ config INTEL_ISH_HID
|
|||
tristate "Intel Integrated Sensor Hub"
|
||||
default n
|
||||
depends on X86
|
||||
depends on HID
|
||||
help
|
||||
The Integrated Sensor Hub (ISH) enables the ability to offload
|
||||
sensor polling and algorithm processing to a dedicated low power
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
#define PCI_DEVICE_ID_INTEL_ISH_ARL_H 0x7745
|
||||
#define PCI_DEVICE_ID_INTEL_ISH_ARL_S 0x7F78
|
||||
#define PCI_DEVICE_ID_INTEL_ISH_LNL_M 0xA845
|
||||
#define PCI_DEVICE_ID_INTEL_ISH_PTL_H 0xE345
|
||||
#define PCI_DEVICE_ID_INTEL_ISH_PTL_P 0xE445
|
||||
|
||||
#define REVISION_ID_CHT_A0 0x6
|
||||
#define REVISION_ID_CHT_Ax_SI 0x0
|
||||
|
|
|
@ -517,6 +517,10 @@ static int ish_fw_reset_handler(struct ishtp_device *dev)
|
|||
/* ISH FW is dead */
|
||||
if (!ish_is_input_ready(dev))
|
||||
return -EPIPE;
|
||||
|
||||
/* Send clock sync at once after reset */
|
||||
ishtp_dev->prev_sync = 0;
|
||||
|
||||
/*
|
||||
* Set HOST2ISH.ILUP. Apparently we need this BEFORE sending
|
||||
* RESET_NOTIFY_ACK - FW will be checking for it
|
||||
|
@ -577,15 +581,14 @@ static void fw_reset_work_fn(struct work_struct *work)
|
|||
*/
|
||||
static void _ish_sync_fw_clock(struct ishtp_device *dev)
|
||||
{
|
||||
static unsigned long prev_sync;
|
||||
uint64_t usec;
|
||||
struct ipc_time_update_msg time = {};
|
||||
|
||||
if (prev_sync && time_before(jiffies, prev_sync + 20 * HZ))
|
||||
if (dev->prev_sync && time_before(jiffies, dev->prev_sync + 20 * HZ))
|
||||
return;
|
||||
|
||||
prev_sync = jiffies;
|
||||
usec = ktime_to_us(ktime_get_boottime());
|
||||
ipc_send_mng_msg(dev, MNG_SYNC_FW_CLOCK, &usec, sizeof(uint64_t));
|
||||
dev->prev_sync = jiffies;
|
||||
/* The fields of time would be updated while sending message */
|
||||
ipc_send_mng_msg(dev, MNG_SYNC_FW_CLOCK, &time, sizeof(time));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
enum ishtp_driver_data_index {
|
||||
ISHTP_DRIVER_DATA_NONE,
|
||||
ISHTP_DRIVER_DATA_LNL_M,
|
||||
ISHTP_DRIVER_DATA_PTL,
|
||||
};
|
||||
|
||||
#define ISH_FW_GEN_LNL_M "lnlm"
|
||||
#define ISH_FW_GEN_PTL "ptl"
|
||||
|
||||
#define ISH_FIRMWARE_PATH(gen) "intel/ish/ish_" gen ".bin"
|
||||
#define ISH_FIRMWARE_PATH_ALL "intel/ish/ish_*.bin"
|
||||
|
@ -37,6 +39,9 @@ static struct ishtp_driver_data ishtp_driver_data[] = {
|
|||
[ISHTP_DRIVER_DATA_LNL_M] = {
|
||||
.fw_generation = ISH_FW_GEN_LNL_M,
|
||||
},
|
||||
[ISHTP_DRIVER_DATA_PTL] = {
|
||||
.fw_generation = ISH_FW_GEN_PTL,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct pci_device_id ish_pci_tbl[] = {
|
||||
|
@ -63,6 +68,8 @@ static const struct pci_device_id ish_pci_tbl[] = {
|
|||
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ISH_ARL_H)},
|
||||
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ISH_ARL_S)},
|
||||
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ISH_LNL_M), .driver_data = ISHTP_DRIVER_DATA_LNL_M},
|
||||
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ISH_PTL_H), .driver_data = ISHTP_DRIVER_DATA_PTL},
|
||||
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ISH_PTL_P), .driver_data = ISHTP_DRIVER_DATA_PTL},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, ish_pci_tbl);
|
||||
|
|
|
@ -253,6 +253,8 @@ struct ishtp_device {
|
|||
unsigned int ipc_tx_cnt;
|
||||
unsigned long long ipc_tx_bytes_cnt;
|
||||
|
||||
/* Time of the last clock sync */
|
||||
unsigned long prev_sync;
|
||||
const struct ishtp_hw_ops *ops;
|
||||
size_t mtu;
|
||||
uint32_t ishtp_msg_hdr;
|
||||
|
|
|
@ -7,7 +7,6 @@ menu "Intel THC HID Support"
|
|||
config INTEL_THC_HID
|
||||
tristate "Intel Touch Host Controller"
|
||||
depends on ACPI
|
||||
select HID
|
||||
help
|
||||
THC (Touch Host Controller) is the name of the IP block in PCH that
|
||||
interfaces with Touch Devices (ex: touchscreen, touchpad etc.). It
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0+
|
||||
menu "Surface System Aggregator Module HID support"
|
||||
depends on SURFACE_AGGREGATOR
|
||||
depends on INPUT
|
||||
|
||||
config SURFACE_HID
|
||||
tristate "HID transport driver for Surface System Aggregator Module"
|
||||
|
@ -39,4 +38,3 @@ endmenu
|
|||
|
||||
config SURFACE_HID_CORE
|
||||
tristate
|
||||
select HID
|
||||
|
|
|
@ -5,8 +5,7 @@ menu "USB HID support"
|
|||
config USB_HID
|
||||
tristate "USB HID transport layer"
|
||||
default y
|
||||
depends on USB && INPUT
|
||||
select HID
|
||||
depends on HID
|
||||
help
|
||||
Say Y here if you want to connect USB keyboards,
|
||||
mice, joysticks, graphic tablets, or any other HID based devices
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
config BT_HIDP
|
||||
tristate "HIDP protocol support"
|
||||
depends on BT_BREDR && INPUT && HID_SUPPORT
|
||||
select HID
|
||||
depends on BT_BREDR && HID
|
||||
help
|
||||
HIDP (Human Interface Device Protocol) is a transport layer
|
||||
for HID reports. HIDP is required for the Bluetooth Human
|
||||
|
|
|
@ -40,16 +40,17 @@ BPF_EXTRA_CFLAGS += -I$(srctree)/arch/mips/include/asm/mach-generic
|
|||
endif
|
||||
endif
|
||||
|
||||
TPROGS_CFLAGS += -Wall -O2
|
||||
TPROGS_CFLAGS += -Wmissing-prototypes
|
||||
TPROGS_CFLAGS += -Wstrict-prototypes
|
||||
COMMON_CFLAGS += -Wall -O2
|
||||
COMMON_CFLAGS += -Wmissing-prototypes
|
||||
COMMON_CFLAGS += -Wstrict-prototypes
|
||||
|
||||
TPROGS_CFLAGS += $(COMMON_CFLAGS)
|
||||
TPROGS_CFLAGS += -I$(objtree)/usr/include
|
||||
TPROGS_CFLAGS += -I$(LIBBPF_INCLUDE)
|
||||
TPROGS_CFLAGS += -I$(srctree)/tools/include
|
||||
|
||||
ifdef SYSROOT
|
||||
TPROGS_CFLAGS += --sysroot=$(SYSROOT)
|
||||
COMMON_CFLAGS += --sysroot=$(SYSROOT)
|
||||
TPROGS_LDFLAGS := -L$(SYSROOT)/usr/lib
|
||||
endif
|
||||
|
||||
|
@ -112,7 +113,7 @@ clean:
|
|||
|
||||
$(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(LIBBPF_OUTPUT)
|
||||
# Fix up variables inherited from Kbuild that tools/ build system won't like
|
||||
$(MAKE) -C $(LIBBPF_SRC) RM='rm -rf' EXTRA_CFLAGS="$(TPROGS_CFLAGS)" \
|
||||
$(MAKE) -C $(LIBBPF_SRC) RM='rm -rf' EXTRA_CFLAGS="$(COMMON_CFLAGS)" \
|
||||
LDFLAGS=$(TPROGS_LDFLAGS) srctree=$(HID_SAMPLES_PATH)/../../ \
|
||||
O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= \
|
||||
$@ install_headers
|
||||
|
@ -163,7 +164,7 @@ $(obj)/hid_surface_dial.o: $(obj)/hid_surface_dial.skel.h
|
|||
|
||||
VMLINUX_BTF_PATHS ?= $(abspath $(if $(O),$(O)/vmlinux)) \
|
||||
$(abspath $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux)) \
|
||||
$(abspath ./vmlinux)
|
||||
$(abspath $(objtree)/vmlinux)
|
||||
VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS))))
|
||||
|
||||
$(obj)/vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL)
|
||||
|
|
Loading…
Add table
Reference in a new issue