Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c3c7a25 authored by Ira W. Snyder's avatar Ira W. Snyder Committed by Jean Delvare
Browse files

hwmon: (lm90) Use programmed update rate



The lm90 driver programs the sensor chip to update its readings at 2 Hz
(500 ms between readings). However, the driver only does reads from the
chip at intervals of 2 * HZ (2000 ms between readings). Change the driver
update rate to the programmed update rate.

Signed-off-by: default avatarIra W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 729d273a
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -982,7 +982,8 @@ static struct lm90_data *lm90_update_device(struct device *dev)


	mutex_lock(&data->update_lock);
	mutex_lock(&data->update_lock);


	if (time_after(jiffies, data->last_updated + HZ * 2) || !data->valid) {
	if (time_after(jiffies, data->last_updated + HZ / 2 + HZ / 10)
	 || !data->valid) {
		u8 h, l;
		u8 h, l;


		dev_dbg(&client->dev, "Updating lm90 data.\n");
		dev_dbg(&client->dev, "Updating lm90 data.\n");