diff mbox series

[v10,13/55] dt-bindings: input: atmel: add suspend mode support

Message ID 20200331105051.58896-14-jiada_wang@mentor.com (mailing list archive)
State Superseded
Headers show
Series atmel_mxt_ts misc | expand

Commit Message

Wang, Jiada March 31, 2020, 10:50 a.m. UTC
Add suspend mode support for atmel touchscreen driver

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
 .../bindings/input/atmel,maxtouch.txt         |  9 ++++++++
 MAINTAINERS                                   |  1 +
 include/dt-bindings/input/atmel_mxt_ts.h      | 23 +++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 include/dt-bindings/input/atmel_mxt_ts.h

Comments

Dmitry Osipenko April 1, 2020, 3:42 p.m. UTC | #1
31.03.2020 13:50, Jiada Wang пишет:
> Add suspend mode support for atmel touchscreen driver
> 
> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
> ---
>  .../bindings/input/atmel,maxtouch.txt         |  9 ++++++++
>  MAINTAINERS                                   |  1 +
>  include/dt-bindings/input/atmel_mxt_ts.h      | 23 +++++++++++++++++++
>  3 files changed, 33 insertions(+)
>  create mode 100644 include/dt-bindings/input/atmel_mxt_ts.h
> 
> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> index c88919480d37..0307e7f7bb43 100644
> --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> @@ -31,6 +31,15 @@ Optional properties for main touchpad device:
>  
>  - reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
>  
> +- atmel,suspend-mode: Select method used to suspend:
> +    MXT_SUSPEND_DEEP_SLEEP - use T7 to suspend the device into deep sleep
> +    MXT_SUSPEND_T9_CTRL - use T9.CTRL to turn off touch processing
> +    MXT_SUSPEND_REGULATOR - use regulators to power down device during suspend
> +    Definitions are in <dt-bindings/input/atmel_mxt_ts.h>.
> +
> +- vdd: Required supply regulator when MXT_SUSPEND_REGULATOR is used to suspend
> +- avdd: Required supply regulator when MXT_SUSPEND_REGULATOR is used to suspend

Some of NVIDIA Tegra devices have a VDD regulator in a form of GPIO,
which is turned off by default at a boot time, and thus, the
power-regulator needs to be enabled by the driver at a probe time in
order to power-up the touchscreen.

I think the VDD/AVDD description isn't correct because these are the
essential power regulators, they aren't used only for the suspending.

What about something more generic, like this:

- vdd: phandle to Power supply regulator
- avdd: phandle to Analog Power supply regulator
Wang, Jiada April 2, 2020, 8:28 a.m. UTC | #2
Hi Dmitry

On 2020/04/02 0:42, Dmitry Osipenko wrote:
> 31.03.2020 13:50, Jiada Wang пишет:
>> Add suspend mode support for atmel touchscreen driver
>>
>> Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
>> ---
>>   .../bindings/input/atmel,maxtouch.txt         |  9 ++++++++
>>   MAINTAINERS                                   |  1 +
>>   include/dt-bindings/input/atmel_mxt_ts.h      | 23 +++++++++++++++++++
>>   3 files changed, 33 insertions(+)
>>   create mode 100644 include/dt-bindings/input/atmel_mxt_ts.h
>>
>> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>> index c88919480d37..0307e7f7bb43 100644
>> --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
>> @@ -31,6 +31,15 @@ Optional properties for main touchpad device:
>>   
>>   - reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
>>   
>> +- atmel,suspend-mode: Select method used to suspend:
>> +    MXT_SUSPEND_DEEP_SLEEP - use T7 to suspend the device into deep sleep
>> +    MXT_SUSPEND_T9_CTRL - use T9.CTRL to turn off touch processing
>> +    MXT_SUSPEND_REGULATOR - use regulators to power down device during suspend
>> +    Definitions are in <dt-bindings/input/atmel_mxt_ts.h>.
>> +
>> +- vdd: Required supply regulator when MXT_SUSPEND_REGULATOR is used to suspend
>> +- avdd: Required supply regulator when MXT_SUSPEND_REGULATOR is used to suspend
> 
> Some of NVIDIA Tegra devices have a VDD regulator in a form of GPIO,
> which is turned off by default at a boot time, and thus, the
> power-regulator needs to be enabled by the driver at a probe time in
> order to power-up the touchscreen.
> 
> I think the VDD/AVDD description isn't correct because these are the
> essential power regulators, they aren't used only for the suspending.
> 
> What about something more generic, like this:
> 
> - vdd: phandle to Power supply regulator
> - avdd: phandle to Analog Power supply regulator
> 
I agree, will update with generic descriptions

Thanks,
Jiada
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
index c88919480d37..0307e7f7bb43 100644
--- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
+++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
@@ -31,6 +31,15 @@  Optional properties for main touchpad device:
 
 - reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
 
+- atmel,suspend-mode: Select method used to suspend:
+    MXT_SUSPEND_DEEP_SLEEP - use T7 to suspend the device into deep sleep
+    MXT_SUSPEND_T9_CTRL - use T9.CTRL to turn off touch processing
+    MXT_SUSPEND_REGULATOR - use regulators to power down device during suspend
+    Definitions are in <dt-bindings/input/atmel_mxt_ts.h>.
+
+- vdd: Required supply regulator when MXT_SUSPEND_REGULATOR is used to suspend
+- avdd: Required supply regulator when MXT_SUSPEND_REGULATOR is used to suspend
+
 Example:
 
 	touch@4b {
diff --git a/MAINTAINERS b/MAINTAINERS
index e48ab79879ac..350ae664e6f0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2873,6 +2873,7 @@  T:	git git://github.com/ndyer/linux.git
 S:	Maintained
 F:	Documentation/devicetree/bindings/input/atmel,maxtouch.txt
 F:	drivers/input/touchscreen/atmel_mxt_ts.c
+F:	include/dt-bindings/input/atmel_mxt_ts.h
 
 ATMEL WIRELESS DRIVER
 M:	Simon Kelley <simon@thekelleys.org.uk>
diff --git a/include/dt-bindings/input/atmel_mxt_ts.h b/include/dt-bindings/input/atmel_mxt_ts.h
new file mode 100644
index 000000000000..41ed0f8111aa
--- /dev/null
+++ b/include/dt-bindings/input/atmel_mxt_ts.h
@@ -0,0 +1,23 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Atmel maXTouch Touchscreen driver
+ *
+ * Copyright (C) 2015 Atmel Corporation
+ * Author: Nick Dyer <nick.dyer@itdev.co.uk>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+#ifndef __DT_BINDINGS_ATMEL_MXT_TS_H
+#define __DT_BINDINGS_ATMEL_MXT_TS_H
+
+enum mxt_suspend_mode {
+	MXT_SUSPEND_DEEP_SLEEP = 0,
+	MXT_SUSPEND_T9_CTRL = 1,
+	MXT_SUSPEND_REGULATOR = 2,
+};
+
+#endif /* __DT_BINDINGS_ATMEL_MXT_TS_H */