Commit ae4c86a0 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Dmitry Torokhov
Browse files

dt-bindings: input: atmel_mxt_ts: Document atmel,wakeup-method and WAKE line GPIO



Some Atmel touchscreen controllers have a WAKE line that needs to be
asserted low in order to wake up controller from a deep sleep. Document
the wakeup methods and the new GPIO properties.

Reviewed-by: default avatarRob Herring <robh@kernel.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210302102158.10533-2-digetx@gmail.com


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 4895bfe9
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -39,6 +39,13 @@ properties:
      (active low). The line must be flagged with
      GPIO_ACTIVE_LOW.

  wake-gpios:
    maxItems: 1
    description:
      Optional GPIO specifier for the touchscreen's wake pin
      (active low). The line must be flagged with
      GPIO_ACTIVE_LOW.

  linux,gpio-keymap:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description: |
@@ -53,6 +60,26 @@ properties:
      or experiment to determine which bit corresponds to which input. Use
      KEY_RESERVED for unused padding values.

  atmel,wakeup-method:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      The WAKE line is an active-low input that is used to wake up the touch
      controller from deep-sleep mode before communication with the controller
      could be started. This optional feature used to minimize current
      consumption when the controller is in deep sleep mode. This feature is
      relevant only to some controller families, like mXT1386 controller for
      example.

      The WAKE pin can be connected in one of the following ways:
       1) left permanently low
       2) connected to the I2C-compatible SCL pin
       3) connected to a GPIO pin on the host
    enum:
      - 0 # ATMEL_MXT_WAKEUP_NONE
      - 1 # ATMEL_MXT_WAKEUP_I2C_SCL
      - 2 # ATMEL_MXT_WAKEUP_GPIO
    default: 0

required:
  - compatible
  - reg
@@ -63,6 +90,7 @@ additionalProperties: false
examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/input/atmel-maxtouch.h>
    #include <dt-bindings/gpio/gpio.h>
    i2c {
      #address-cells = <1>;
@@ -75,6 +103,7 @@ examples:
        reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
        vdda-supply = <&ab8500_ldo_aux2_reg>;
        vdd-supply = <&ab8500_ldo_aux5_reg>;
        atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>;
      };
    };

+10 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0+ */

#ifndef _DT_BINDINGS_ATMEL_MAXTOUCH_H
#define _DT_BINDINGS_ATMEL_MAXTOUCH_H

#define ATMEL_MXT_WAKEUP_NONE		0
#define ATMEL_MXT_WAKEUP_I2C_SCL	1
#define ATMEL_MXT_WAKEUP_GPIO		2

#endif /* _DT_BINDINGS_ATMEL_MAXTOUCH_H */