Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Rob Herring <robh@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210302102158.10533-2-digetx@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Dmitry Osipenko and committed by
Dmitry Torokhov
ae4c86a0 4895bfe9

+39
+29
Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
··· 39 39 (active low). The line must be flagged with 40 40 GPIO_ACTIVE_LOW. 41 41 42 + wake-gpios: 43 + maxItems: 1 44 + description: 45 + Optional GPIO specifier for the touchscreen's wake pin 46 + (active low). The line must be flagged with 47 + GPIO_ACTIVE_LOW. 48 + 42 49 linux,gpio-keymap: 43 50 $ref: /schemas/types.yaml#/definitions/uint32-array 44 51 description: | ··· 60 53 or experiment to determine which bit corresponds to which input. Use 61 54 KEY_RESERVED for unused padding values. 62 55 56 + atmel,wakeup-method: 57 + $ref: /schemas/types.yaml#/definitions/uint32 58 + description: | 59 + The WAKE line is an active-low input that is used to wake up the touch 60 + controller from deep-sleep mode before communication with the controller 61 + could be started. This optional feature used to minimize current 62 + consumption when the controller is in deep sleep mode. This feature is 63 + relevant only to some controller families, like mXT1386 controller for 64 + example. 65 + 66 + The WAKE pin can be connected in one of the following ways: 67 + 1) left permanently low 68 + 2) connected to the I2C-compatible SCL pin 69 + 3) connected to a GPIO pin on the host 70 + enum: 71 + - 0 # ATMEL_MXT_WAKEUP_NONE 72 + - 1 # ATMEL_MXT_WAKEUP_I2C_SCL 73 + - 2 # ATMEL_MXT_WAKEUP_GPIO 74 + default: 0 75 + 63 76 required: 64 77 - compatible 65 78 - reg ··· 90 63 examples: 91 64 - | 92 65 #include <dt-bindings/interrupt-controller/irq.h> 66 + #include <dt-bindings/input/atmel-maxtouch.h> 93 67 #include <dt-bindings/gpio/gpio.h> 94 68 i2c { 95 69 #address-cells = <1>; ··· 103 75 reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; 104 76 vdda-supply = <&ab8500_ldo_aux2_reg>; 105 77 vdd-supply = <&ab8500_ldo_aux5_reg>; 78 + atmel,wakeup-method = <ATMEL_MXT_WAKEUP_I2C_SCL>; 106 79 }; 107 80 }; 108 81
+10
include/dt-bindings/input/atmel-maxtouch.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0+ */ 2 + 3 + #ifndef _DT_BINDINGS_ATMEL_MAXTOUCH_H 4 + #define _DT_BINDINGS_ATMEL_MAXTOUCH_H 5 + 6 + #define ATMEL_MXT_WAKEUP_NONE 0 7 + #define ATMEL_MXT_WAKEUP_I2C_SCL 1 8 + #define ATMEL_MXT_WAKEUP_GPIO 2 9 + 10 + #endif /* _DT_BINDINGS_ATMEL_MAXTOUCH_H */