diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-16 15:44:44 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-16 15:44:44 -0800 |
| commit | de925e2fbb44eed8a2a7ce166b485fed5eae01aa (patch) | |
| tree | 078ddd7b31e1cde13f554d741140c8f519cd8f90 /drivers/hid/hid-input.c | |
| parent | 62746f92b10a4add6a7db87ff59b901276746b11 (diff) | |
| parent | 85a694738f6e7ad36918a3fa0569701b102d06c2 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID updates from Jiri Kosina:
- AMD SFH (Sensor Fusion Hub) support (Sandeep Singh)
- increase of maximum HID report size to 16KB in order to support some
of the modern devices (Dean Camera)
- control interface support for hidraw (Dean Camera)
- Sony DS4 power and firmware reporting fixes (Roderick Colenbrander)
- support for ghlive PS3/WII U dongles (Pascal Giard)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (27 commits)
HID: i2c-hid: add Vero K147 to descriptor override
HID: ite: Add support for Acer S1002 keyboard-dock
HID: sony: support for ghlive ps3/wii u dongles
HID: hidraw: Add additional hidraw input/output report ioctls.
HID: Increase HID maximum report size to 16KB
HID: elecom: drop stray comment
HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter
HID: elecom: add support for EX-G M-XGL20DLBK wireless mouse
HID: elecom: rewrite report based on model specific parameters
HID: wacom: Constify attribute_groups
HID: input: Fix fall-through warnings for Clang
HID: usbhid: Fix fall-through warnings for Clang
HID: logitech-hidpp: Add hid_device_id for V470 bluetooth mouse
HID: intel-ish-hid: Remove unnecessary assignment to variable rv
HID: sony: Workaround for DS4 dongle hotplug kernel crash.
HID: sony: Don't use fw_version/hw_version for sysfs cleanup.
HID: sony: Report more accurate DS4 power status.
SFH: fix error return check for -ERESTARTSYS
HID: SFH: Add documentation
HID: hid-input: occasionally report stylus battery even if not changed
...
Diffstat (limited to 'drivers/hid/hid-input.c')
| -rw-r--r-- | drivers/hid/hid-input.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 4dca11392459..dc7f6b4a775c 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -537,9 +537,12 @@ static void hidinput_update_battery(struct hid_device *dev, int value) capacity = hidinput_scale_battery_capacity(dev, value); if (dev->battery_status != HID_BATTERY_REPORTED || - capacity != dev->battery_capacity) { + capacity != dev->battery_capacity || + ktime_after(ktime_get_coarse(), dev->battery_ratelimit_time)) { dev->battery_capacity = capacity; dev->battery_status = HID_BATTERY_REPORTED; + dev->battery_ratelimit_time = + ktime_add_ms(ktime_get_coarse(), 30 * 1000); power_supply_changed(dev->battery); } } @@ -746,6 +749,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel field->flags |= HID_MAIN_ITEM_RELATIVE; break; } + goto unknown; default: goto unknown; } |
