Commit 061d1af7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-2024060801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid

Pull HID fixes from Benjamin Tissoires:

 - fix potential read out of bounds in hid-asus (Andrew Ballance)

 - fix endian-conversion on little endian systems in intel-ish-hid (Arnd
   Bergmann)

 - A couple of new input event codes (Aseda Aboagye)

 - errors handling fixes in hid-nvidia-shield (Chen Ni), hid-nintendo
   (Christophe JAILLET), hid-logitech-dj (José Expósito)

 - current leakage fix while the device is in suspend on a i2c-hid
   laptop (Johan Hovold)

 - other assorted smaller fixes and device ID / quirk entry additions

* tag 'for-linus-2024060801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: Ignore battery for ELAN touchscreens 2F2C and 4116
  HID: i2c-hid: elan: fix reset suspend current leakage
  dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property
  dt-bindings: HID: i2c-hid: elan: add Elan eKTH5015M
  dt-bindings: HID: i2c-hid: add dedicated Ilitek ILI2901 schema
  input: Add support for "Do Not Disturb"
  input: Add event code for accessibility key
  hid: asus: asus_report_fixup: fix potential read out of bounds
  HID: logitech-hidpp: add missing MODULE_DESCRIPTION() macro
  HID: intel-ish-hid: fix endian-conversion
  HID: nintendo: Fix an error handling path in nintendo_hid_probe()
  HID: logitech-dj: Fix memory leak in logi_dj_recv_switch_to_dj_mode()
  HID: core: remove unnecessary WARN_ON() in implement()
  HID: nvidia-shield: Add missing check for input_ff_create_memless
  HID: intel-ish-hid: Fix build error for COMPILE_TEST
parents 329f70c5 a3a5a37e
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -18,9 +18,12 @@ allOf:

properties:
  compatible:
    enum:
      - elan,ekth6915
      - ilitek,ili2901
    oneOf:
      - items:
          - enum:
              - elan,ekth5015m
          - const: elan,ekth6915
      - const: elan,ekth6915

  reg:
    const: 0x10
@@ -33,6 +36,12 @@ properties:
  reset-gpios:
    description: Reset GPIO; not all touchscreens using eKTH6915 hook this up.

  no-reset-on-power-off:
    type: boolean
    description:
      Reset line is wired so that it can (and should) be left deasserted when
      the power supply is off.

  vcc33-supply:
    description: The 3.3V supply to the touchscreen.

@@ -58,8 +67,8 @@ examples:
      #address-cells = <1>;
      #size-cells = <0>;

      ap_ts: touchscreen@10 {
        compatible = "elan,ekth6915";
      touchscreen@10 {
        compatible = "elan,ekth5015m", "elan,ekth6915";
        reg = <0x10>;

        interrupt-parent = <&tlmm>;
+66 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/ilitek,ili2901.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Ilitek ILI2901 touchscreen controller

maintainers:
  - Jiri Kosina <jkosina@suse.com>

description:
  Supports the Ilitek ILI2901 touchscreen controller.
  This touchscreen controller uses the i2c-hid protocol with a reset GPIO.

allOf:
  - $ref: /schemas/input/touchscreen/touchscreen.yaml#

properties:
  compatible:
    enum:
      - ilitek,ili2901

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  panel: true

  reset-gpios:
    maxItems: 1

  vcc33-supply: true

  vccio-supply: true

required:
  - compatible
  - reg
  - interrupts
  - vcc33-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      touchscreen@41 {
        compatible = "ilitek,ili2901";
        reg = <0x41>;

        interrupt-parent = <&tlmm>;
        interrupts = <9 IRQ_TYPE_LEVEL_LOW>;

        reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
        vcc33-supply = <&pp3300_ts>;
      };
    };
+2 −2
Original line number Diff line number Diff line
@@ -1204,8 +1204,8 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
	}

	/* match many more n-key devices */
	if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD) {
		for (int i = 0; i < *rsize + 1; i++) {
	if (drvdata->quirks & QUIRK_ROG_NKEY_KEYBOARD && *rsize > 15) {
		for (int i = 0; i < *rsize - 15; i++) {
			/* offset to the count from 0x5a report part always 14 */
			if (rdesc[i] == 0x85 && rdesc[i + 1] == 0x5a &&
			    rdesc[i + 14] == 0x95 && rdesc[i + 15] == 0x05) {
+0 −1
Original line number Diff line number Diff line
@@ -1448,7 +1448,6 @@ static void implement(const struct hid_device *hid, u8 *report,
			hid_warn(hid,
				 "%s() called with too large value %d (n: %d)! (%s)\n",
				 __func__, value, n, current->comm);
			WARN_ON(1);
			value &= m;
		}
	}
+2 −0
Original line number Diff line number Diff line
@@ -3366,6 +3366,8 @@ static const char *keys[KEY_MAX + 1] = {
	[KEY_CAMERA_ACCESS_ENABLE] = "CameraAccessEnable",
	[KEY_CAMERA_ACCESS_DISABLE] = "CameraAccessDisable",
	[KEY_CAMERA_ACCESS_TOGGLE] = "CameraAccessToggle",
	[KEY_ACCESSIBILITY] = "Accessibility",
	[KEY_DO_NOT_DISTURB] = "DoNotDisturb",
	[KEY_DICTATE] = "Dictate",
	[KEY_MICMUTE] = "MicrophoneMute",
	[KEY_BRIGHTNESS_MIN] = "BrightnessMin",
Loading