diff options
| author | Josef Bacik <josef@toxicpanda.com> | 2026-10-04 22:15:41 +0000 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-10-20 15:41:23 -0700 |
| commit | 2281f0473fa257d19d59c9e430e91b5a76f418bc (patch) | |
| tree | eab68215b1230c83175dc35f2f9de79329397cab /tools/lib/python | |
| parent | 0b6eda22f9ab67ddb2a872b0c3fc578ad9f4e27e (diff) | |
| download | linux-2281f0473fa257d19d59c9e430e91b5a76f418bc.tar.gz linux-2281f0473fa257d19d59c9e430e91b5a76f418bc.zip | |
hwmon: (ftsteutates) serialise the watchdog and sensors
The registers of the chip are paged: fts_read_byte() and fts_write_byte()
select the page and then access the register. access_lock used to make
the two steps atomic. It has been removed because the hwmon core
serialises the sensor callbacks, but the watchdog code uses the same two
functions and is not called by the hwmon core.
So the sensors can now be read, or an alarm be cleared, while the watchdog
is being started or stopped. If one of them selects its page between the
two steps of the other, the second step hits a register of the wrong page.
Take the lock of the hwmon device in the watchdog callbacks, and for the
accesses of fts_watchdog_init(), which runs when the hwmon device has
already been registered. These are moved to a function of their own, so
that the lock is not held while the watchdog is being registered. devres
unregisters the watchdog before the hwmon device.
Fixes: fa035d98dbae ("hwmon: (ftsteutates) Rely on subsystem locking")
Assisted-by: LLM
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
