mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge branch 'for-7.4/lenovo' into for-linus
- various functionality fixes and code cleanups of lenovo-go-s driver (Derek J. Clark)
This commit is contained in:
commit
d6e1fb3620
File diff suppressed because it is too large
Load Diff
|
|
@ -476,6 +476,16 @@ static int lenovo_input_mapping_x1_tab_kbd(struct hid_device *hdev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lenovo_input_mapping_yoga7x_g11_kbd(struct hid_device *hdev,
|
||||
struct hid_input *hi, struct hid_field *field,
|
||||
struct hid_usage *usage, unsigned long **bit, int *max)
|
||||
{
|
||||
if (field->application == HID_GD_WIRELESS_RADIO_CTLS)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lenovo_input_mapping(struct hid_device *hdev,
|
||||
struct hid_input *hi, struct hid_field *field,
|
||||
struct hid_usage *usage, unsigned long **bit, int *max)
|
||||
|
|
@ -510,6 +520,8 @@ static int lenovo_input_mapping(struct hid_device *hdev,
|
|||
case USB_DEVICE_ID_LENOVO_X1_TAB2:
|
||||
case USB_DEVICE_ID_LENOVO_X1_TAB3:
|
||||
return lenovo_input_mapping_x1_tab_kbd(hdev, hi, field, usage, bit, max);
|
||||
case I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD:
|
||||
return lenovo_input_mapping_yoga7x_g11_kbd(hdev, hi, field, usage, bit, max);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1568,6 +1580,8 @@ static const struct hid_device_id lenovo_devices[] = {
|
|||
USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X13_TAB) },
|
||||
{ HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC,
|
||||
USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_KEYBOARD) },
|
||||
{ HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC,
|
||||
USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_YOGA_SLIM_7X_G11_KEYBOARD) },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user