hwmon: (aspeed-pwm-tacho) mutex for tach reading
authorLoic Prylli <lprylli@netflix.com>
Fri, 3 Nov 2023 10:30:55 +0000 (11:30 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 4 Feb 2024 14:43:44 +0000 (06:43 -0800)
commit1168491e7f53581ba7b6014a39a49cfbbb722feb
treec7a0358998ad5a6645ac7537cb0716e5929c5498
parent54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478
hwmon: (aspeed-pwm-tacho) mutex for tach reading

the ASPEED_PTCR_RESULT Register can only hold the result for a
single fan input. Adding a mutex to protect the register until the
reading is done.

Signed-off-by: Loic Prylli <lprylli@netflix.com>
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Fixes: 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
Link: https://lore.kernel.org/r/121d888762a1232ef403cf35230ccf7b3887083a.1699007401.git.alexander.hansen@9elements.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/aspeed-pwm-tacho.c