[PATCH] Input: synaptics-rmi4 - Fix doze-holdoff value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux