diff options
| author | Armin Wolf <W_Armin@gmx.de> | 2025-10-24 20:38:23 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-10-27 20:56:01 +0100 |
| commit | 3d4ca76369782e9a55a6c07d4fdc492f9a731cdb (patch) | |
| tree | 5b3b30555eab94637dff5ebf81499648bcf8c86b /drivers/acpi/fan.h | |
| parent | 0670b9ad4d9c17461ce63761b02b4b594bec8916 (diff) | |
ACPI: fan: Add hwmon notification support
The platform firmware can notify the ACPI fan device that the fan
speed has changed. Relay this notification to the hwmon device if
present so that userspace applications can react to it.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20251024183824.5656-3-W_Armin@gmx.de
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/fan.h')
| -rw-r--r-- | drivers/acpi/fan.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/fan.h b/drivers/acpi/fan.h index 0d73433c3889..dcc1ad3118ff 100644 --- a/drivers/acpi/fan.h +++ b/drivers/acpi/fan.h @@ -56,6 +56,9 @@ struct acpi_fan { struct acpi_fan_fif fif; struct acpi_fan_fps *fps; int fps_count; +#if IS_REACHABLE(CONFIG_HWMON) + struct device *hdev; +#endif struct thermal_cooling_device *cdev; struct device_attribute fst_speed; struct device_attribute fine_grain_control; @@ -99,8 +102,10 @@ void acpi_fan_delete_attributes(struct acpi_device *device); #if IS_REACHABLE(CONFIG_HWMON) int devm_acpi_fan_create_hwmon(struct device *dev); +void acpi_fan_notify_hwmon(struct device *dev); #else static inline int devm_acpi_fan_create_hwmon(struct device *dev) { return 0; }; +static inline void acpi_fan_notify_hwmon(struct device *dev) { }; #endif #endif |