lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221028181849.23157-1-jose.exposito89@gmail.com>
Date:   Fri, 28 Oct 2022 20:18:48 +0200
From:   José Expósito <jose.exposito89@...il.com>
To:     jikos@...nel.org
Cc:     benjamin.tissoires@...hat.com, rydberg@...math.org,
        chad@...pilled.dev, davidgow@...gle.com,
        linux-input@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-kernel@...r.kernel.org,
        José Expósito <jose.exposito89@...il.com>
Subject: [PATCH 0/1] HID: input: map battery system charging

Hi everyone,

This patch adds support for reporting battery status (charging/discharging)
for devices with a charging usage in their HID descriptor:

	0x05, 0x85,         /*      Usage Page (Battery System),    */
	0x09, 0x44,         /*      Usage Page (Charging),          */

I tested it on Apple hardware (mouse, trackpad and keyboard) as well as
on UCLogic tablets with battery [1].

On other hardware (HID_DC_BATTERYSTRENGTH or digitizers with battery)
discharging should be reported for backwards compatibility.
I did my best to keep the old behaviour by adding KUnit tests; However,
I don't own any of those devices, so I'd appreciate any help testing
the patch from someone with the actual hardware.

Best wishes,
José Expósito

[1] https://lore.kernel.org/linux-input/20221028082348.22386-1-jose.exposito89@gmail.com/T/

José Expósito (1):
  HID: input: map battery system charging

 drivers/hid/.kunitconfig     |  1 +
 drivers/hid/Kconfig          |  1 +
 drivers/hid/hid-input-test.c | 80 ++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-input.c      | 36 +++++++++++++++-
 include/linux/hid.h          |  2 +
 5 files changed, 118 insertions(+), 2 deletions(-)
 create mode 100644 drivers/hid/hid-input-test.c

-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ