diff options
author | Erik Rosen <erik.rosen@metormote.com> | 2021-02-01 20:59:28 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2021-02-01 16:23:47 -0800 |
commit | 1ae5aaf5d1c5473616413f3aa8ce05e9c739a298 (patch) | |
tree | 523e87a25f1bd0a534f082c76c6d62c74740e675 /drivers | |
parent | 66102281f94afdf1f41cf6147c7ddce73a8e75f2 (diff) |
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 <erik.rosen@metormote.com>
Link: https://lore.kernel.org/r/20210201195929.1200-2-erik.rosen@metormote.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/hwmon/pmbus/pmbus_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |