diff options
| author | Gabor Juhos <j4g8y7@gmail.com> | 2026-02-02 16:58:57 +0100 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-02-02 09:00:28 -0800 |
| commit | 52fb36a5f9c15285b7d67c0ff87dc17b3206b5df (patch) | |
| tree | f0a5d6e080f81769519c8de07a039944cfed1cc9 /include/uapi/linux | |
| parent | f5c092787c48296633c2dd7240752f88fa9710fc (diff) | |
hwmon: (gpio-fan) Allow to stop FANs when CONFIG_PM is disabled
When CONFIG_PM is disabled, the GPIO controlled FANs can't be stopped by
using the sysfs attributes since commit 0d01110e6356 ("hwmon: (gpio-fan)
Add regulator support").
Using either the 'pwm1' or the 'fan1_target' attribute fails the same way:
$ echo 0 > /sys/class/hwmon/hwmon1/pwm1
ash: write error: Function not implemented
$ echo 0 > /sys/class/hwmon/hwmon1/fan1_target
ash: write error: Function not implemented
Both commands were working flawlessly before the mentioned commit.
The issue happens because pm_runtime_put_sync() returns with -ENOSYS
when CONFIG_PM is disabled, and the set_fan_speed() function handles
this as an error.
In order to restore the previous behaviour, change the error check in
the set_fan_speed() function to ignore the -ENOSYS error code.
Cc: stable@vger.kernel.org
Fixes: 0d01110e6356 ("hwmon: (gpio-fan) Add regulator support")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/r/20260202-gpio-fan-stop-fix-v1-1-c7853183d93d@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
