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

 - a new charlieplex GPIO keypad driver

 - an update to aw86927 driver to support 86938 chip

 - an update for Chrome OS EC keyboard driver to support Fn-<key> keymap
   extension

 - an UAF fix in debugfs teardown in EDT touchscreen driver

 - a number of conversions for input drivers to use guard() and __free()
   cleanup primitives

 - several drivers for bus mice (inport, logibm) and other very old
   devices have been removed

 - OLPC HGPK PS/2 protocol has been removed as it's been broken and
   inactive for 10 something years

 - dedicated kpsmoused has been removed from psmouse driver

 - other assorted cleanups and fixups

* tag 'input-for-v7.1-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (101 commits)
  Input: charlieplex_keypad - add GPIO charlieplex keypad
  dt-bindings: input: add GPIO charlieplex keypad
  dt-bindings: input: add settling-time-us common property
  dt-bindings: input: add debounce-delay-ms common property
  Input: imx_keypad - fix spelling mistake "Colums" -> "Columns"
  Input: edt-ft5x06 - fix use-after-free in debugfs teardown
  Input: ims-pcu - fix heap-buffer-overflow in ims_pcu_process_data()
  Input: ct82c710 - remove driver
  Input: mk712 - remove driver
  Input: logibm - remove driver
  Input: inport - remove driver
  Input: qt1070 - inline i2c_check_functionality check
  Input: qt1050 - inline i2c_check_functionality check
  Input: aiptek - validate raw macro indices before updating state
  Input: gf2k - skip invalid hat lookup values
  Input: xpad - add RedOctane Games vendor id
  Input: xpad - remove stale TODO and changelog header
  Input: usbtouchscreen - refactor endpoint lookup
  Input: aw86927 - add support for Awinic AW86938
  dt-bindings: input: awinic,aw86927: Add Awinic AW86938
  ...
parents 2e680392 f4b369c6
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ maintainers:
  - Robin van der Gracht <robin@protonic.nl>

allOf:
  - $ref: /schemas/input/input.yaml#
  - $ref: /schemas/input/matrix-keymap.yaml#

properties:
@@ -33,9 +34,7 @@ properties:
  interrupts:
    maxItems: 1

  debounce-delay-ms:
    maxItems: 1
    description: Debouncing interval time in milliseconds
  debounce-delay-ms: true

  linux,keymap: true

+6 −1
Original line number Diff line number Diff line
@@ -11,7 +11,12 @@ maintainers:

properties:
  compatible:
    const: awinic,aw86927
    oneOf:
      - const: awinic,aw86927
      - items:
          - enum:
              - awinic,aw86938
          - const: awinic,aw86927

  reg:
    maxItems: 1
+3 −4
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ maintainers:
  - Alexander Sverdlin <alexander.sverdlin@gmail.com>

allOf:
  - $ref: input.yaml#
  - $ref: /schemas/input/matrix-keymap.yaml#

description:
@@ -37,10 +38,8 @@ properties:
  clocks:
    maxItems: 1

  debounce-delay-ms:
    description: |
          Time in microseconds that key must be pressed or
          released for state change interrupt to trigger.
  # Time for state change interrupt to trigger
  debounce-delay-ms: true

  cirrus,prescale:
    description: row/column counter pre-scaler load value
+108 −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/gpio-charlieplex-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: GPIO charlieplex keypad

maintainers:
  - Hugo Villeneuve <hvilleneuve@dimonoff.com>

description: |
  The charlieplex keypad supports N^2)-N different key combinations (where N is
  the number of I/O lines). Key presses and releases are detected by configuring
  only one line as output at a time, and reading other line states. This process
  is repeated for each line. Diodes are required to ensure current flows in only
  one direction between any pair of pins, as well as pull-up or pull-down
  resistors on all I/O lines.
  This mechanism doesn't allow to detect simultaneous key presses.

  Wiring example for 3 lines keyboard with 6 switches and 3 diodes (pull-up/down
  resistors not shown but needed on L0, L1 and L2):

  L0  --+---------------------+----------------------+
        |                     |                      |
  L1  -------+-----------+---------------------+     |
        |    |           |    |                |     |
  L2  -------------+----------------+-----+    |     |
        |    |     |     |    |     |     |    |     |
        |    |     |     |    |     |     |    |     |
        |  S1 \  S2 \    |  S3 \  S4 \    |  S5 \  S6 \
        |    |     |     |    |     |     |    |     |
        |    +--+--+     |    +--+--+     |    +--+--+
        |       |        |       |        |       |
        |    D1 v        |    D2 v        |    D3 v
        |       - (k)    |       - (k)    |       - (k)
        |       |        |       |        |       |
        +-------+        +-------+        +-------+

  L: GPIO line
  S: switch
  D: diode (k indicates cathode)

allOf:
  - $ref: input.yaml#
  - $ref: /schemas/input/matrix-keymap.yaml#

properties:
  compatible:
    const: gpio-charlieplex-keypad

  autorepeat: true

  debounce-delay-ms:
    default: 5

  line-gpios:
    description:
      List of GPIOs used as lines. The gpio specifier for this property
      depends on the gpio controller to which these lines are connected.

  linux,keymap: true

  poll-interval: true

  settling-time-us: true

  wakeup-source: true

required:
  - compatible
  - line-gpios
  - linux,keymap
  - poll-interval

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/input/input.h>

    keyboard {
        compatible = "gpio-charlieplex-keypad";
        debounce-delay-ms = <20>;
        poll-interval = <5>;
        settling-time-us = <2>;

        line-gpios = <&gpio2 25 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)
                      &gpio2 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)
                      &gpio2 27 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;

        /* MATRIX_KEY(output, input, key-code) */
        linux,keymap = <
            /*
             * According to wiring diagram above, if L1 is configured as
             * output and HIGH, and we detect a HIGH level on input L0,
             * then it means S1 is pressed: MATRIX_KEY(L1, L0, KEY...)
             */
            MATRIX_KEY(1, 0, KEY_F1) /* S1 */
            MATRIX_KEY(2, 0, KEY_F2) /* S2 */
            MATRIX_KEY(0, 1, KEY_F3) /* S3 */
            MATRIX_KEY(2, 1, KEY_F4) /* S4 */
            MATRIX_KEY(1, 2, KEY_F5) /* S5 */
            MATRIX_KEY(0, 2, KEY_F6) /* S6 */
        >;
    };
+2 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ description:
  report the event using GPIO interrupts to the cpu.

allOf:
  - $ref: input.yaml#
  - $ref: /schemas/input/matrix-keymap.yaml#

properties:
@@ -46,9 +47,7 @@ properties:
      Force GPIO polarity to active low.
      In the absence of this property GPIOs are treated as active high.

  debounce-delay-ms:
    description: Debounce interval in milliseconds.
    default: 0
  debounce-delay-ms: true

  col-scan-delay-us:
    description:
Loading