Skip to content

Commit efd8929

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina: - Surface Aggregator Module support from Maximilian Luz - Apple Magic Mouse 2 support from John Chen - Support for newer Quad/BT 2.0 Logitech receivers in HID proxy mode from Hans de Goede - Thinkpad X1 Tablet keyboard support from Hans de Goede - Support for FTDI FT260 I2C host adapter from Michael Zaidman - other various small device-specific quirks, fixes and cleanups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (46 commits) HID: wacom: Setup pen input capabilities to the targeted tools HID: hid-sensor-hub: Move 'hsdev' description to correct struct definition HID: hid-sensor-hub: Remove unused struct member 'quirks' HID: wacom_sys: Demote kernel-doc abuse HID: hid-sensor-custom: Remove unused variable 'ret' HID: hid-uclogic-params: Ensure function names are present and correct in kernel-doc headers HID: hid-uclogic-rdesc: Kernel-doc is for functions and structs HID: hid-logitech-hidpp: Fix conformant kernel-doc header and demote abuses HID: hid-picolcd_core: Remove unused variable 'ret' HID: hid-kye: Fix incorrect function name for kye_tablet_enable() HID: hid-core: Fix incorrect function name in header HID: hid-alps: Correct struct misnaming HID: usbhid: hid-pidff: Demote a couple kernel-doc abuses HID: usbhid: Repair a formatting issue in a struct description HID: hid-thrustmaster: Demote a bunch of kernel-doc abuses HID: input: map battery capacity (00850065) HID: magicmouse: fix reconnection of Magic Mouse 2 HID: magicmouse: fix 3 button emulation of Mouse 2 HID: magicmouse: add Apple Magic Mouse 2 support HID: lenovo: Add support for Thinkpad X1 Tablet Thin keyboard ...
2 parents b71428d + e16e9f1 commit efd8929

38 files changed

+2948
-222
lines changed

MAINTAINERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7432,6 +7432,13 @@ F: fs/verity/
74327432
F: include/linux/fsverity.h
74337433
F: include/uapi/linux/fsverity.h
74347434

7435+
FT260 FTDI USB-HID TO I2C BRIDGE DRIVER
7436+
M: Michael Zaidman <[email protected]>
7437+
7438+
7439+
S: Maintained
7440+
F: drivers/hid/hid-ft260.c
7441+
74357442
FUJITSU LAPTOP EXTRAS
74367443
M: Jonathan Woithe <[email protected]>
74377444
@@ -12079,6 +12086,13 @@ S: Maintained
1207912086
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
1208012087
F: drivers/platform/surface/
1208112088

12089+
MICROSOFT SURFACE HID TRANSPORT DRIVER
12090+
M: Maximilian Luz <[email protected]>
12091+
12092+
12093+
S: Maintained
12094+
F: drivers/hid/surface-hid/
12095+
1208212096
MICROSOFT SURFACE HOT-PLUG DRIVER
1208312097
M: Maximilian Luz <[email protected]>
1208412098

drivers/hid/Kconfig

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,17 @@ config HID_EZKEY
351351
help
352352
Support for Ezkey BTC 8193 keyboard.
353353

354+
config HID_FT260
355+
tristate "FTDI FT260 USB HID to I2C host support"
356+
depends on USB_HID && HIDRAW && I2C
357+
help
358+
Provides I2C host adapter functionality over USB-HID through FT260
359+
device. The customizable USB descriptor fields are exposed as sysfs
360+
attributes.
361+
362+
To compile this driver as a module, choose M here: the module
363+
will be called hid-ft260.
364+
354365
config HID_GEMBIRD
355366
tristate "Gembird Joypad"
356367
depends on HID
@@ -1042,10 +1053,11 @@ config HID_THINGM
10421053

10431054
config HID_THRUSTMASTER
10441055
tristate "ThrustMaster devices support"
1045-
depends on HID
1056+
depends on USB_HID
10461057
help
1047-
Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or
1048-
a THRUSTMASTER Ferrari GT Rumble Wheel.
1058+
Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
1059+
a THRUSTMASTER Ferrari GT Rumble Wheel or Thrustmaster FFB
1060+
Wheel (T150RS, T300RS, T300 Ferrari Alcantara Edition, T500RS).
10491061

10501062
config THRUSTMASTER_FF
10511063
bool "ThrustMaster devices force feedback support"
@@ -1206,4 +1218,6 @@ source "drivers/hid/intel-ish-hid/Kconfig"
12061218

12071219
source "drivers/hid/amd-sfh-hid/Kconfig"
12081220

1221+
source "drivers/hid/surface-hid/Kconfig"
1222+
12091223
endmenu

drivers/hid/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ obj-$(CONFIG_HID_ELAN) += hid-elan.o
4646
obj-$(CONFIG_HID_ELECOM) += hid-elecom.o
4747
obj-$(CONFIG_HID_ELO) += hid-elo.o
4848
obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
49+
obj-$(CONFIG_HID_FT260) += hid-ft260.o
4950
obj-$(CONFIG_HID_GEMBIRD) += hid-gembird.o
5051
obj-$(CONFIG_HID_GFRM) += hid-gfrm.o
5152
obj-$(CONFIG_HID_GLORIOUS) += hid-glorious.o
@@ -112,7 +113,8 @@ obj-$(CONFIG_HID_STEAM) += hid-steam.o
112113
obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o
113114
obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
114115
obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
115-
obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o
116+
obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o hid-thrustmaster.o
117+
obj-$(CONFIG_HID_TMINIT) += hid-tminit.o
116118
obj-$(CONFIG_HID_TIVO) += hid-tivo.o
117119
obj-$(CONFIG_HID_TOPSEED) += hid-topseed.o
118120
obj-$(CONFIG_HID_TWINHAN) += hid-twinhan.o
@@ -145,3 +147,5 @@ obj-$(CONFIG_INTEL_ISH_HID) += intel-ish-hid/
145147
obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/
146148

147149
obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/
150+
151+
obj-$(CONFIG_SURFACE_HID_CORE) += surface-hid/

drivers/hid/hid-alps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ enum dev_num {
7474
UNKNOWN,
7575
};
7676
/**
77-
* struct u1_data
77+
* struct alps_dev
7878
*
7979
* @input: pointer to the kernel input device
8080
* @input2: pointer to the kernel input2 device

drivers/hid/hid-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,7 +2129,7 @@ struct hid_dynid {
21292129
};
21302130

21312131
/**
2132-
* store_new_id - add a new HID device ID to this driver and re-probe devices
2132+
* new_id_store - add a new HID device ID to this driver and re-probe devices
21332133
* @drv: target device driver
21342134
* @buf: buffer for scanning device ID data
21352135
* @count: input size

drivers/hid/hid-debug.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ static const struct hid_usage_entry hid_usage_table[] = {
417417
{ 0x85, 0x44, "Charging" },
418418
{ 0x85, 0x45, "Discharging" },
419419
{ 0x85, 0x4b, "NeedReplacement" },
420+
{ 0x85, 0x65, "AbsoluteStateOfCharge" },
420421
{ 0x85, 0x66, "RemainingCapacity" },
421422
{ 0x85, 0x68, "RunTimeToEmpty" },
422423
{ 0x85, 0x6a, "AverageTimeToFull" },

drivers/hid/hid-elan.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,6 @@ static int elan_start_multitouch(struct hid_device *hdev)
410410
return 0;
411411
}
412412

413-
static enum led_brightness elan_mute_led_get_brigtness(struct led_classdev *led_cdev)
414-
{
415-
struct device *dev = led_cdev->dev->parent;
416-
struct hid_device *hdev = to_hid_device(dev);
417-
struct elan_drvdata *drvdata = hid_get_drvdata(hdev);
418-
419-
return drvdata->mute_led_state;
420-
}
421-
422413
static int elan_mute_led_set_brigtness(struct led_classdev *led_cdev,
423414
enum led_brightness value)
424415
{
@@ -445,8 +436,9 @@ static int elan_mute_led_set_brigtness(struct led_classdev *led_cdev,
445436
kfree(dmabuf);
446437

447438
if (ret != ELAN_LED_REPORT_SIZE) {
448-
hid_err(hdev, "Failed to set mute led brightness: %d\n", ret);
449-
return ret;
439+
if (ret != -ENODEV)
440+
hid_err(hdev, "Failed to set mute led brightness: %d\n", ret);
441+
return ret < 0 ? ret : -EIO;
450442
}
451443

452444
drvdata->mute_led_state = led_state;
@@ -459,9 +451,10 @@ static int elan_init_mute_led(struct hid_device *hdev)
459451
struct led_classdev *mute_led = &drvdata->mute_led;
460452

461453
mute_led->name = "elan:red:mute";
462-
mute_led->brightness_get = elan_mute_led_get_brigtness;
454+
mute_led->default_trigger = "audio-mute";
463455
mute_led->brightness_set_blocking = elan_mute_led_set_brigtness;
464456
mute_led->max_brightness = LED_ON;
457+
mute_led->flags = LED_HW_PLUGGABLE;
465458
mute_led->dev = &hdev->dev;
466459

467460
return devm_led_classdev_register(&hdev->dev, mute_led);

0 commit comments

Comments
 (0)