[6/8] Input: atmel_mxt_ts - add active to idle timeout in T7.
diff mbox series

Message ID 20190828095349.30607-6-jongpuls@gmail.com
State New
Headers show
Series
  • [1/8] Input: atmel_mxt_ts - eanble calibration via sysfs
Related show

Commit Message

Jongpil Jung Aug. 28, 2019, 9:53 a.m. UTC
From: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com>

T7 has active to idle timeout information. Add active to idle timeout
information into structure so that we can refer information easily.

Change-Id: Ie4682cff3d3bb1b8b537702656862eb34f64a0b8
---
 drivers/input/touchscreen/atmel_mxt_ts.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 723ff75e798a..3a17adf04e2a 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -94,6 +94,7 @@ 
 struct t7_config {
 	u8 idle;
 	u8 active;
+	u8 activetoidleto;
 } __packed;
 
 #define MXT_POWER_CFG_RUN		0
@@ -2176,6 +2177,8 @@  static int mxt_set_t7_power_cfg(struct mxt_data *data, u8 sleep)
 	struct t7_config *new_config;
 	struct t7_config deepsleep = { .active = 0, .idle = 0 };
 
+	deepsleep.activetoidleto = data->t7_cfg.activetoidleto;
+
 	if (sleep == MXT_POWER_CFG_DEEPSLEEP)
 		new_config = &deepsleep;
 	else
@@ -2186,8 +2189,8 @@  static int mxt_set_t7_power_cfg(struct mxt_data *data, u8 sleep)
 	if (error)
 		return error;
 
-	dev_dbg(dev, "Set T7 ACTV:%d IDLE:%d\n",
-		new_config->active, new_config->idle);
+	dev_dbg(dev, "Set T7 ACTV:%d IDLE:%d ACTV2IDLETO:%d\n",
+		new_config->active, new_config->idle, new_config->activetoidleto);
 
 	return 0;
 }
@@ -2218,8 +2221,8 @@  static int mxt_init_t7_power_cfg(struct mxt_data *data)
 		}
 	}
 
-	dev_dbg(dev, "Initialized power cfg: ACTV %d, IDLE %d\n",
-		data->t7_cfg.active, data->t7_cfg.idle);
+	dev_dbg(dev, "Initialized power cfg: ACTV %d, IDLE %d, ACTV2IDLETO:%d\n",
+		data->t7_cfg.active, data->t7_cfg.idle, data->t7_cfg.activetoidleto);
 	return 0;
 }