linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] io: accel: kxcjk1013: restore the range after resume.
@ 2019-02-21  3:13 He, Bo
  2019-03-03 16:17 ` Jonathan Cameron
  0 siblings, 1 reply; 7+ messages in thread
From: He, Bo @ 2019-02-21  3:13 UTC (permalink / raw)
  To: linux-kernel, linux-iio, ic23, knaack.h, lars, pmeerw, Chen, Hu1

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@intel.com>
Signed-off-by: Chen, Hu <hu1.chen@intel.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




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-03-09 17:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-21  3:13 [PATCH] io: accel: kxcjk1013: restore the range after resume He, Bo
2019-03-03 16:17 ` Jonathan Cameron
2019-03-04  7:05   ` [PATCH v2] " Chen, Hu
2019-03-04  9:16     ` Hans de Goede
2019-03-06  2:32       ` [PATCH v3] " Chen, Hu
2019-03-06  8:43         ` Hans de Goede
2019-03-09 17:32           ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).