From 1ae5aaf5d1c5473616413f3aa8ce05e9c739a298 Mon Sep 17 00:00:00 2001 From: Erik Rosen Date: Mon, 1 Feb 2021 20:59:28 +0100 Subject: hwmon: (pmbus) 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 Link: https://lore.kernel.org/r/20210201195929.1200-2-erik.rosen@metormote.com Signed-off-by: Guenter Roeck --- drivers/hwmon/pmbus/pmbus_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/hwmon/pmbus') diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index 1cf7d9e9d089..aadea85fe630 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; } -- cgit v1.2.3