hwmon: (aspeed-pwm-tacho) mutex for tach reading
authorLoic Prylli <lprylli@netflix.com>
Fri, 3 Nov 2023 10:30:55 +0000 (11:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:49 +0000 (19:10 +0100)
commitc9b0d253f1ab7a4f9526ea9c693664c1ab28cf08
treef7d640867531064599dcd76231fe4095c5edd08d
parent76ce07eb215d36c87a17c50ce96ed216bddd4926
hwmon: (aspeed-pwm-tacho) mutex for tach reading

[ Upstream commit 1168491e7f53581ba7b6014a39a49cfbbb722feb ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/aspeed-pwm-tacho.c