mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
1773572863
The thresholds exist but there is no notification neither action code related to them yet. These changes implement the netlink for the notifications when the thresholds are crossed, added, deleted or flushed as well as the commands which allows to get the list of the thresholds, flush them, add and delete. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/20241022155147.463475-3-daniel.lezcano@linaro.org [ rjw: Use the thermal_zone guard for locking, subject edit ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
20 lines
789 B
C
20 lines
789 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __THERMAL_THRESHOLDS_H__
|
|
#define __THERMAL_THRESHOLDS_H__
|
|
|
|
struct user_threshold {
|
|
struct list_head list_node;
|
|
int temperature;
|
|
int direction;
|
|
};
|
|
|
|
int thermal_thresholds_init(struct thermal_zone_device *tz);
|
|
void thermal_thresholds_exit(struct thermal_zone_device *tz);
|
|
void thermal_thresholds_handle(struct thermal_zone_device *tz, int *low, int *high);
|
|
void thermal_thresholds_flush(struct thermal_zone_device *tz);
|
|
int thermal_thresholds_add(struct thermal_zone_device *tz, int temperature, int direction);
|
|
int thermal_thresholds_delete(struct thermal_zone_device *tz, int temperature, int direction);
|
|
int thermal_thresholds_for_each(struct thermal_zone_device *tz,
|
|
int (*cb)(struct user_threshold *, void *arg), void *arg);
|
|
#endif
|