[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210201195929.1200-2-erik.rosen@metormote.com>
Date: Mon, 1 Feb 2021 20:59:28 +0100
From: Erik Rosen <erik.rosen@...ormote.com>
To: linux-kernel@...r.kernel.org, linux-hwmon@...r.kernel.org,
Guenter Roeck <linux@...ck-us.net>,
Jean Delvare <jdelvare@...e.com>
Cc: Erik Rosen <erik.rosen@...ormote.com>
Subject: [PATCH 1/2] Clear sensor data after chip write
Set the sensor->data field to -ENODATA to force a chip access next time
the sensor value is read.
Signed-off-by: Erik Rosen <erik.rosen@...ormote.com>
---
drivers/hwmon/pmbus/pmbus_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index 192442b3b7a2..e27f23eee1e3 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -974,7 +974,7 @@ static ssize_t pmbus_set_sensor(struct device *dev,
if (ret < 0)
rv = ret;
else
- sensor->data = regval;
+ sensor->data = -ENODATA;
mutex_unlock(&data->update_lock);
return rv;
}
--
2.20.1
Powered by blists - more mailing lists