Hello everyone, this is the next version for supporting switching off the pwm-fan regulator. Review points from Guenter are included. Changes in v5: * Added Guenter's R-b to Patch 1 & 4 * Removed useless goto (Patch 2) * Added error checking when switching off PWM (Patch 2) * Removed useless branches when switching power (Patch 3) * Removed useless (temporary) variable (Patch 3) * Updated Patch 5 to changes of previous patches * Dropped Patch 6 completly for lack of benefit Changes in v4: * Reordered commits so current behavior is the default all the time * Fixed pwm state bug in Patch 1, this affects the patch context in Patch 2 * Refactor even more code in Patch 3 & 4 for smaller further patches * Squashed the dynamic regulator switch patch and the sysfs attribute patch into one, keeping default behavior. Overhaul the patch to support different modes altogether * Fixed bugs in module removal in pwm1_enable=1 * Moved internal PWM state removal to the end to keep the patch smaller Best regards, Alexander Alexander Stein (5): hwmon: pwm-fan: Refactor fan power on/off hwmon: pwm-fan: Simplify enable/disable check hwmon: pwm-fan: Add dedicated power switch function hwmon: pwm-fan: split __set_pwm into locked/unlocked functions hwmon: pwm-fan: Switch regulator dynamically Documentation/hwmon/pwm-fan.rst | 12 ++ drivers/hwmon/pwm-fan.c | 312 +++++++++++++++++++++++--------- 2 files changed, 241 insertions(+), 83 deletions(-) -- 2.25.1