Commit 2ae08b36 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull input updates from Dmitry Torokhov:

 - changes to input core to properly queue synthetic events (such as
   autorepeat) and to release multitouch contacts when an input device
   is inhibited or suspended

 - reworked quirk handling in i8042 driver that consolidates multiple
   DMI tables into one and adds several quirks for TUXEDO line of
   laptops

 - update to mt6779 keypad to better reflect organization of the
   hardware

 - changes to mtk-pmic-keys driver preparing it to handle more variants

 - facelift of adp5588-keys driver

 - improvements to iqs7222 driver

 - adjustments to various DT binding documents for input devices

 - other assorted driver fixes.

* tag 'input-for-v5.20-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (54 commits)
  Input: adc-joystick - fix ordering in adc_joystick_probe()
  dt-bindings: input: ariel-pwrbutton: use spi-peripheral-props.yaml
  Input: deactivate MT slots when inhibiting or suspending devices
  Input: properly queue synthetic events
  dt-bindings: input: iqs7222: Use central 'linux,code' definition
  Input: i8042 - add dritek quirk for Acer Aspire One AO532
  dt-bindings: input: gpio-keys: accept also interrupt-extended
  dt-bindings: input: gpio-keys: reference input.yaml and document properties
  dt-bindings: input: gpio-keys: enforce node names to match all properties
  dt-bindings: input: Convert adc-keys to DT schema
  dt-bindings: input: Centralize 'linux,input-type' definition
  dt-bindings: input: Use common 'linux,keycodes' definition
  dt-bindings: input: Centralize 'linux,code' definition
  dt-bindings: input: Increase maximum keycode value to 0x2ff
  Input: mt6779-keypad - implement row/column selection
  Input: mt6779-keypad - match hardware matrix organization
  Input: i8042 - add additional TUXEDO devices to i8042 quirk tables
  Input: goodix - switch use of acpi_gpio_get_*_resource() APIs
  Input: i8042 - add TUXEDO devices to i8042 quirk tables
  Input: i8042 - add debug output for quirks
  ...
parents 21f9c8a1 8bb5e7f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ additionalProperties: false
patternProperties:
  "^axis@[0-9a-f]+$":
    type: object
    $ref: input.yaml#
    description: >
      Represents a joystick axis bound to the given ADC channel.
      For each entry in the io-channels list, one axis subnode with a matching
@@ -57,7 +58,6 @@ patternProperties:
        description: Index of an io-channels list entry bound to this axis.

      linux,code:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: EV_ABS specific event code generated by the axis.

      abs-range:
+0 −67
Original line number Diff line number Diff line
ADC attached resistor ladder buttons
------------------------------------

Required properties:
 - compatible: "adc-keys"
 - io-channels: Phandle to an ADC channel
 - io-channel-names = "buttons";
 - keyup-threshold-microvolt: Voltage above or equal to which all the keys are
			      considered up.

Optional properties:
	- poll-interval: Poll interval time in milliseconds
	- autorepeat: Boolean, Enable auto repeat feature of Linux input
	  subsystem.

Each button (key) is represented as a sub-node of "adc-keys":

Required subnode-properties:
	- label: Descriptive name of the key.
	- linux,code: Keycode to emit.
	- press-threshold-microvolt: voltage above or equal to which this key is
				     considered pressed.

No two values of press-threshold-microvolt may be the same.
All values of press-threshold-microvolt must be less than
keyup-threshold-microvolt.

Example:

#include <dt-bindings/input/input.h>

	adc-keys {
		compatible = "adc-keys";
		io-channels = <&lradc 0>;
		io-channel-names = "buttons";
		keyup-threshold-microvolt = <2000000>;

		button-up {
			label = "Volume Up";
			linux,code = <KEY_VOLUMEUP>;
			press-threshold-microvolt = <1500000>;
		};

		button-down {
			label = "Volume Down";
			linux,code = <KEY_VOLUMEDOWN>;
			press-threshold-microvolt = <1000000>;
		};

		button-enter {
			label = "Enter";
			linux,code = <KEY_ENTER>;
			press-threshold-microvolt = <500000>;
		};
	};

+--------------------------------+------------------------+
| 2.000.000 <= value             | no key pressed         |
+--------------------------------+------------------------+
| 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed   |
+--------------------------------+------------------------+
| 1.000.000 <= value < 1.500.000 | KEY_VOLUMEDOWN pressed |
+--------------------------------+------------------------+
|   500.000 <= value < 1.000.000 | KEY_ENTER pressed      |
+--------------------------------+------------------------+
|              value <   500.000 | no key pressed         |
+--------------------------------+------------------------+
+103 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adc-keys.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: ADC attached resistor ladder buttons

maintainers:
  - Alexandre Belloni <alexandre.belloni@bootlin.com>

allOf:
  - $ref: input.yaml#

properties:
  compatible:
    const: adc-keys

  io-channels:
    maxItems: 1

  io-channel-names:
    const: buttons

  keyup-threshold-microvolt:
    description:
      Voltage above or equal to which all the keys are considered up.

  poll-interval: true
  autorepeat: true

patternProperties:
  '^button-':
    type: object
    $ref: input.yaml#
    additionalProperties: false
    description:
      Each button (key) is represented as a sub-node.

    properties:
      label: true

      linux,code: true

      press-threshold-microvolt:
        description:
          Voltage above or equal to which this key is considered pressed. No
          two values of press-threshold-microvolt may be the same. All values
          of press-threshold-microvolt must be less than
          keyup-threshold-microvolt.

    required:
      - linux,code
      - press-threshold-microvolt

required:
  - compatible
  - io-channels
  - io-channel-names
  - keyup-threshold-microvolt

additionalProperties: false

examples:
  - |
    #include <dt-bindings/input/input.h>
    // +--------------------------------+------------------------+
    // | 2.000.000 <= value             | no key pressed         |
    // +--------------------------------+------------------------+
    // | 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed   |
    // +--------------------------------+------------------------+
    // | 1.000.000 <= value < 1.500.000 | KEY_VOLUMEDOWN pressed |
    // +--------------------------------+------------------------+
    // |   500.000 <= value < 1.000.000 | KEY_ENTER pressed      |
    // +--------------------------------+------------------------+
    // |              value <   500.000 | no key pressed         |
    // +--------------------------------+------------------------+

    adc-keys {
        compatible = "adc-keys";
        io-channels = <&lradc 0>;
        io-channel-names = "buttons";
        keyup-threshold-microvolt = <2000000>;

        button-up {
            label = "Volume Up";
            linux,code = <KEY_VOLUMEUP>;
            press-threshold-microvolt = <1500000>;
        };

        button-down {
            label = "Volume Down";
            linux,code = <KEY_VOLUMEDOWN>;
            press-threshold-microvolt = <1000000>;
        };

        button-enter {
            label = "Enter";
            linux,code = <KEY_ENTER>;
            press-threshold-microvolt = <500000>;
        };
    };
...
+2 −3
Original line number Diff line number Diff line
@@ -44,14 +44,13 @@ properties:
patternProperties:
  "^button-[0-9]+$":
    type: object
    $ref: input.yaml#
    properties:
      label:
        $ref: /schemas/types.yaml#/definitions/string
        description: Descriptive name of the key

      linux,code:
        $ref: /schemas/types.yaml#/definitions/uint32
        description: Keycode to emit
      linux,code: true

      channel:
        $ref: /schemas/types.yaml#/definitions/uint32
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ description: |

allOf:
  - $ref: input.yaml#
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
  compatible:
Loading