Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  ...
  • Loading branch information
torvalds committed Apr 30, 2021
2 parents b71428d + e16e9f1 commit efd8929
Show file tree
Hide file tree
Showing 38 changed files with 2,948 additions and 222 deletions.
14 changes: 14 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7432,6 +7432,13 @@ F: fs/verity/
F: include/linux/fsverity.h
F: include/uapi/linux/fsverity.h

FT260 FTDI USB-HID TO I2C BRIDGE DRIVER
M: Michael Zaidman <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
F: drivers/hid/hid-ft260.c

FUJITSU LAPTOP EXTRAS
M: Jonathan Woithe <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -12079,6 +12086,13 @@ S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
F: drivers/platform/surface/

MICROSOFT SURFACE HID TRANSPORT DRIVER
M: Maximilian Luz <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
F: drivers/hid/surface-hid/

MICROSOFT SURFACE HOT-PLUG DRIVER
M: Maximilian Luz <[email protected]>
L: [email protected]
Expand Down
20 changes: 17 additions & 3 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,17 @@ config HID_EZKEY
help
Support for Ezkey BTC 8193 keyboard.

config HID_FT260
tristate "FTDI FT260 USB HID to I2C host support"
depends on USB_HID && HIDRAW && I2C
help
Provides I2C host adapter functionality over USB-HID through FT260
device. The customizable USB descriptor fields are exposed as sysfs
attributes.

To compile this driver as a module, choose M here: the module
will be called hid-ft260.

config HID_GEMBIRD
tristate "Gembird Joypad"
depends on HID
Expand Down Expand Up @@ -1042,10 +1053,11 @@ config HID_THINGM

config HID_THRUSTMASTER
tristate "ThrustMaster devices support"
depends on HID
depends on USB_HID
help
Say Y here if you have a THRUSTMASTER FireStore Dual Power 2 or
a THRUSTMASTER Ferrari GT Rumble Wheel.
Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
a THRUSTMASTER Ferrari GT Rumble Wheel or Thrustmaster FFB
Wheel (T150RS, T300RS, T300 Ferrari Alcantara Edition, T500RS).

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

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

source "drivers/hid/surface-hid/Kconfig"

endmenu
6 changes: 5 additions & 1 deletion drivers/hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ obj-$(CONFIG_HID_ELAN) += hid-elan.o
obj-$(CONFIG_HID_ELECOM) += hid-elecom.o
obj-$(CONFIG_HID_ELO) += hid-elo.o
obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
obj-$(CONFIG_HID_FT260) += hid-ft260.o
obj-$(CONFIG_HID_GEMBIRD) += hid-gembird.o
obj-$(CONFIG_HID_GFRM) += hid-gfrm.o
obj-$(CONFIG_HID_GLORIOUS) += hid-glorious.o
Expand Down Expand Up @@ -112,7 +113,8 @@ obj-$(CONFIG_HID_STEAM) += hid-steam.o
obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o
obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o
obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o hid-thrustmaster.o
obj-$(CONFIG_HID_TMINIT) += hid-tminit.o
obj-$(CONFIG_HID_TIVO) += hid-tivo.o
obj-$(CONFIG_HID_TOPSEED) += hid-topseed.o
obj-$(CONFIG_HID_TWINHAN) += hid-twinhan.o
Expand Down Expand Up @@ -145,3 +147,5 @@ obj-$(CONFIG_INTEL_ISH_HID) += intel-ish-hid/
obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/

obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/

obj-$(CONFIG_SURFACE_HID_CORE) += surface-hid/
2 changes: 1 addition & 1 deletion drivers/hid/hid-alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ enum dev_num {
UNKNOWN,
};
/**
* struct u1_data
* struct alps_dev
*
* @input: pointer to the kernel input device
* @input2: pointer to the kernel input2 device
Expand Down
2 changes: 1 addition & 1 deletion drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,7 @@ struct hid_dynid {
};

/**
* store_new_id - add a new HID device ID to this driver and re-probe devices
* new_id_store - add a new HID device ID to this driver and re-probe devices
* @drv: target device driver
* @buf: buffer for scanning device ID data
* @count: input size
Expand Down
1 change: 1 addition & 0 deletions drivers/hid/hid-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ static const struct hid_usage_entry hid_usage_table[] = {
{ 0x85, 0x44, "Charging" },
{ 0x85, 0x45, "Discharging" },
{ 0x85, 0x4b, "NeedReplacement" },
{ 0x85, 0x65, "AbsoluteStateOfCharge" },
{ 0x85, 0x66, "RemainingCapacity" },
{ 0x85, 0x68, "RunTimeToEmpty" },
{ 0x85, 0x6a, "AverageTimeToFull" },
Expand Down
17 changes: 5 additions & 12 deletions drivers/hid/hid-elan.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,6 @@ static int elan_start_multitouch(struct hid_device *hdev)
return 0;
}

static enum led_brightness elan_mute_led_get_brigtness(struct led_classdev *led_cdev)
{
struct device *dev = led_cdev->dev->parent;
struct hid_device *hdev = to_hid_device(dev);
struct elan_drvdata *drvdata = hid_get_drvdata(hdev);

return drvdata->mute_led_state;
}

static int elan_mute_led_set_brigtness(struct led_classdev *led_cdev,
enum led_brightness value)
{
Expand All @@ -445,8 +436,9 @@ static int elan_mute_led_set_brigtness(struct led_classdev *led_cdev,
kfree(dmabuf);

if (ret != ELAN_LED_REPORT_SIZE) {
hid_err(hdev, "Failed to set mute led brightness: %d\n", ret);
return ret;
if (ret != -ENODEV)
hid_err(hdev, "Failed to set mute led brightness: %d\n", ret);
return ret < 0 ? ret : -EIO;
}

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

mute_led->name = "elan:red:mute";
mute_led->brightness_get = elan_mute_led_get_brigtness;
mute_led->default_trigger = "audio-mute";
mute_led->brightness_set_blocking = elan_mute_led_set_brigtness;
mute_led->max_brightness = LED_ON;
mute_led->flags = LED_HW_PLUGGABLE;
mute_led->dev = &hdev->dev;

return devm_led_classdev_register(&hdev->dev, mute_led);
Expand Down
Loading

0 comments on commit efd8929

Please sign in to comment.