linux/drivers/hid
José Expósito 59aa39697f HID: input: map battery system charging
commit a608dc1c06 upstream.

HID descriptors with Battery System (0x85) Charging (0x44) usage are
ignored and POWER_SUPPLY_STATUS_DISCHARGING is always reported to user
space, even when the device is charging.

Map this usage and when it is reported set the right charging status.

In addition, add KUnit tests to make sure that the charging status is
correctly set and reported. They can be run with the usual command:

    $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 12:03:14 +02:00
..
amd-sfh-hid HID: amd_sfh: Fix for shift-out-of-bounds 2023-07-23 13:49:18 +02:00
i2c-hid
intel-ish-hid HID: intel-ish-hid: ipc: Disable and reenable ACPI GPE bit 2023-10-10 22:00:44 +02:00
surface-hid
usbhid
.kunitconfig HID: input: map battery system charging 2023-10-25 12:03:14 +02:00
hid-a4tech.c
hid-accutouch.c
hid-alps.c
hid-apple.c HID: apple: Set the tilde quirk flag on the Geyser 3 2023-05-24 17:32:41 +01:00
hid-appleir.c
hid-asus.c
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-betopff.c
hid-bigbenff.c hid: bigben_probe(): validate report count 2023-03-10 09:33:23 +01:00
hid-cherry.c
hid-chicony.c
hid-cmedia.c
hid-core.c HID: core: Provide new max_buffer_size attribute to over-ride the default 2023-03-17 08:50:17 +01:00
hid-corsair.c
hid-cougar.c
hid-cp2112.c HID: cp2112: Fix driver not registering GPIO IRQ chip as threaded 2023-03-30 12:49:16 +02:00
hid-creative-sb0540.c
hid-cypress.c
hid-debug.c HID: Add Mapping for System Microphone Mute 2023-03-10 09:33:55 +01:00
hid-dr.c
hid-elan.c
hid-elecom.c
hid-elo.c
hid-emsff.c
hid-ezkey.c
hid-ft260.c
hid-gaff.c
hid-gembird.c
hid-generic.c
hid-gfrm.c
hid-glorious.c
hid-google-hammer.c HID: google: add jewel USB id 2023-06-09 10:34:18 +02:00
hid-gt683r.c
hid-gyration.c
hid-holtek-kbd.c HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event 2023-10-25 12:03:10 +02:00
hid-holtek-mouse.c
hid-holtekff.c
hid-hyperv.c
hid-icade.c
hid-ids.h HID: add quirk for 03f0:464a HP Elite Presenter Mouse 2023-07-27 08:50:32 +02:00
hid-input-test.c HID: input: map battery system charging 2023-10-25 12:03:14 +02:00
hid-input.c HID: input: map battery system charging 2023-10-25 12:03:14 +02:00
hid-ite.c
hid-jabra.c
hid-kensington.c
hid-keytouch.c
hid-kye.c
hid-lcpower.c
hid-led.c
hid-lenovo.c
hid-letsketch.c
hid-lg-g15.c
hid-lg.c
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c
hid-lg4ff.h
hid-lgff.c
hid-logitech-dj.c HID: logitech-dj: Fix error handling in logi_dj_recv_switch_to_dj_mode() 2023-09-13 09:42:57 +02:00
hid-logitech-hidpp.c HID: logitech-hidpp: Add Bluetooth ID for the Logitech M720 Triathlon mouse 2023-10-25 12:03:10 +02:00
hid-macally.c
hid-magicmouse.c
hid-maltron.c
hid-mcp2221.c
hid-megaworld.c
hid-mf.c
hid-microsoft.c
hid-monterey.c
hid-multitouch.c HID: multitouch: Add required quirk for Synaptics 0xcd7e device 2023-10-25 12:03:11 +02:00
hid-nintendo.c HID: nintendo: reinitialize USB Pro Controller after resuming from suspend 2023-10-25 12:03:11 +02:00
hid-nti.c
hid-ntrig.c
hid-ortek.c
hid-penmount.c
hid-petalynx.c
hid-picolcd_backlight.c
hid-picolcd_cir.c
hid-picolcd_core.c
hid-picolcd_debugfs.c
hid-picolcd_fb.c
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-picolcd.h
hid-pl.c
hid-plantronics.c
hid-playstation.c
hid-primax.c
hid-prodikeys.c
hid-pxrc.c
hid-quirks.c HID: add quirk for 03f0:464a HP Elite Presenter Mouse 2023-07-27 08:50:32 +02:00
hid-razer.c
hid-redragon.c
hid-retrode.c
hid-rmi.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-konepure.c
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat-ryos.c
hid-roccat-savu.c
hid-roccat-savu.h
hid-roccat.c
hid-saitek.c
hid-samsung.c
hid-semitek.c
hid-sensor-custom.c
hid-sensor-hub.c
hid-sigmamicro.c
hid-sjoy.c
hid-sony.c HID: sony: remove duplicate NULL check before calling usb_free_urb() 2023-10-10 22:00:44 +02:00
hid-speedlink.c
hid-steam.c
hid-steelseries.c
hid-sunplus.c
hid-thrustmaster.c
hid-tivo.c
hid-tmff.c
hid-topre.c
hid-topseed.c
hid-twinhan.c
hid-u2fzero.c
hid-uclogic-core.c HID: uclogic: Correct devm device reference for hidinput input_dev name 2023-09-13 09:42:57 +02:00
hid-uclogic-params-test.c
hid-uclogic-params.c HID: uclogic: Add support for XP-PEN Deco Pro MW 2023-03-10 09:33:57 +01:00
hid-uclogic-params.h HID: uclogic: Add battery quirk 2023-03-10 09:33:56 +01:00
hid-uclogic-rdesc-test.c
hid-uclogic-rdesc.c
hid-uclogic-rdesc.h
hid-udraw-ps3.c
hid-viewsonic.c
hid-vivaldi-common.c
hid-vivaldi-common.h
hid-vivaldi.c
hid-vrc2.c
hid-waltop.c
hid-wiimote-core.c
hid-wiimote-debug.c
hid-wiimote-modules.c
hid-wiimote.h
hid-xiaomi.c
hid-xinmo.c
hid-zpff.c
hid-zydacron.c
hidraw.c HID: hidraw: fix data race on device refcount 2023-07-01 13:16:26 +02:00
Kconfig HID: input: map battery system charging 2023-10-25 12:03:14 +02:00
Makefile
uhid.c HID: uhid: Over-ride the default maximum data buffer value with our own 2023-03-17 08:50:17 +01:00
wacom_sys.c HID: wacom: remove the battery when the EKR is off 2023-09-06 21:27:01 +01:00
wacom_wac.c HID: wacom: remove the battery when the EKR is off 2023-09-06 21:27:01 +01:00
wacom_wac.h HID: wacom: remove the battery when the EKR is off 2023-09-06 21:27:01 +01:00
wacom.h HID: wacom: remove the battery when the EKR is off 2023-09-06 21:27:01 +01:00