[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CD6925E8781EFD4D8E11882D20FC406D52A4C63F@SHSMSX104.ccr.corp.intel.com>
Date: Thu, 21 Feb 2019 03:13:44 +0000
From: "He, Bo" <bo.he@...el.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"ic23@...nel.org" <ic23@...nel.org>,
"knaack.h@....de" <knaack.h@....de>,
"lars@...afoo.de" <lars@...afoo.de>,
"pmeerw@...erw.net" <pmeerw@...erw.net>,
"Chen, Hu1" <hu1.chen@...el.com>
Subject: [PATCH] io: accel: kxcjk1013: restore the range after resume.
restore the range register in case kxcjk1013 power is off after suspend
we see the issue on some laptops, after system suspend and resume,
the CTRL_REG1 register changed from 0xc8 to 0x80, so acceleration range
is changed, the patch is to restore the acceleration range after resume.
Signed-off-by: he, bo <bo.he@...el.com>
Signed-off-by: Chen, Hu <hu1.chen@...el.com>
---
drivers/iio/accel/kxcjk-1013.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
index 7506bd9..c6bb3be 100644
--- a/drivers/iio/accel/kxcjk-1013.c
+++ b/drivers/iio/accel/kxcjk-1013.c
@@ -1340,6 +1340,7 @@ static int kxcjk1013_resume(struct device *dev)
mutex_lock(&data->mutex);
ret = kxcjk1013_set_mode(data, OPERATION);
+ ret += kxcjk1013_set_range(data, data->range);
mutex_unlock(&data->mutex);
return ret;
--
2.7.4
Powered by blists - more mailing lists