]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/x86: oxpec: Adhere to sysfs-class-hwmon and enable pwm on 2
authorAntheas Kapenekakis <lkml@antheas.dev>
Fri, 25 Apr 2025 11:18:16 +0000 (13:18 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 30 Apr 2025 11:05:39 +0000 (14:05 +0300)
commit36a65fa84ac30b8df25799dfcedda76dfd7d087b
tree2c99ea4f4ef75c742251ef9ca9c411f91ac9529f
parent665fab3381220cf8925b9f7c4c8d6512e47efe99
platform/x86: oxpec: Adhere to sysfs-class-hwmon and enable pwm on 2

Currently, the driver does not adhere to the sysfs-class-hwmon
specification: 0 is used for auto fan control and 1 is used for manual
control. However, it is expected that 0 sets the fan to full speed,
1 sets the fan to manual, and then 2 is used for automatic control.

Therefore, change the sysfs API to reflect this and enable pwm on 2.

As we are breaking the ABI for this driver, rename oxpec to oxp_ec,
reflecting the naming convention used by other drivers, to allow for
a smooth migration in current userspace programs.

Closes: https://lore.kernel.org/linux-hwmon/20241027174836.8588-1-derekjohn.clark@gmail.com/
Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
Link: https://lore.kernel.org/r/20250425111821.88746-12-lkml@antheas.dev
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/oxpec.c