linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: synaptics-rmi4 - Fix doze-holdoff value
@ 2021-10-28  9:33 Loic Poulain
  0 siblings, 0 replies; only message in thread
From: Loic Poulain @ 2021-10-28  9:33 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: aduggan, linux-input, Loic Poulain

doze-holdoff is in 100ms unit not 10us.

Fixes: d8a8b3edfd92 ("Input: synaptics-rmi4 - add device tree support for RMI4 I2C devices")
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/input/rmi4/rmi_f01.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c
index d7603c5..e90c618 100644
--- a/drivers/input/rmi4/rmi_f01.c
+++ b/drivers/input/rmi4/rmi_f01.c
@@ -362,13 +362,15 @@ static int rmi_f01_of_probe(struct device *dev,
 	if (retval)
 		return retval;
 
-	pdata->power_management.doze_holdoff = val * 100;
+	/* Doze holdoff is in 100ms unit */
+	pdata->power_management.doze_holdoff = val / 100;
 
 	retval = rmi_of_property_read_u32(dev, &val,
 			"syna,doze-interval-ms", 1);
 	if (retval)
 		return retval;
 
+	/* Doze interval is in 10ms unit */
 	pdata->power_management.doze_interval = val / 10;
 
 	return 0;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-28  9:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-28  9:33 [PATCH] Input: synaptics-rmi4 - Fix doze-holdoff value Loic Poulain

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).