Skip to contentSkip to conversation

patch "io: accel: kxcjk1013: restore the range after resume." added to staging-linus

PATCH [email protected] 1 participant 1 message Apr 2, 2019

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

io: accel: kxcjk1013: restore the range after resume.

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From fe2d3df639a7940a125a33d6460529b9689c5406 Mon Sep 17 00:00:00 2001
From: "he, bo" <[email protected]>
Date: Wed, 6 Mar 2019 10:32:20 +0800
Subject: io: accel: kxcjk1013: restore the range after resume.

On some laptops, kxcjk1013 is powered off when system enters S3. We need restore the range regiter during resume. Otherwise, the sensor doesn't work properly after S3.

---
 drivers/iio/accel/kxcjk-1013.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/iio/accel/kxcjk-1013.c +2 -0
index 7096e577b23f..50f3ff386bea 100644
@@ -1437,6 +1437,8 @@ static int kxcjk1013_resume(struct device *dev)
 
 	mutex_lock(&data->mutex);
 	ret = kxcjk1013_set_mode(data, OPERATION);
+	if (ret == 0)
+		ret = kxcjk1013_set_range(data, data->range);
 	mutex_unlock(&data->mutex);
 
 	return ret;
Signature · 1 line
2.21.0