mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ANDROID: thermal: Add vendor hook to get thermal zone device
Need to get temperature data and config info from thermal zone device. Bug: 208946028 Signed-off-by: Di Shen <di.shen@unisoc.com> Signed-off-by: Jeson Gao <jeson.gao@unisoc.com> Change-Id: I5945df5258181b4a441b6bbe09327099491418b3 (cherry picked from commitc53f0e3530) (cherry picked from commit12b8ef18b2)
This commit is contained in:
@@ -270,3 +270,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref);
|
|||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_register);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_register);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_unregister);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_unregister);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_get_thermal_zone_device);
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include <trace/events/thermal.h>
|
#include <trace/events/thermal.h>
|
||||||
|
#undef CREATE_TRACE_POINTS
|
||||||
|
#include <trace/hooks/thermal.h>
|
||||||
|
|
||||||
#include "thermal_core.h"
|
#include "thermal_core.h"
|
||||||
#include "thermal_hwmon.h"
|
#include "thermal_hwmon.h"
|
||||||
@@ -481,6 +483,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
|
|||||||
handle_thermal_trip(tz, count);
|
handle_thermal_trip(tz, count);
|
||||||
|
|
||||||
monitor_thermal_zone(tz);
|
monitor_thermal_zone(tz);
|
||||||
|
|
||||||
|
trace_android_vh_get_thermal_zone_device(tz);
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&tz->lock);
|
mutex_unlock(&tz->lock);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ DECLARE_HOOK(android_vh_thermal_unregister,
|
|||||||
TP_PROTO(struct cpufreq_policy *policy),
|
TP_PROTO(struct cpufreq_policy *policy),
|
||||||
TP_ARGS(policy));
|
TP_ARGS(policy));
|
||||||
|
|
||||||
|
DECLARE_HOOK(android_vh_get_thermal_zone_device,
|
||||||
|
TP_PROTO(struct thermal_zone_device *tz),
|
||||||
|
TP_ARGS(tz));
|
||||||
|
|
||||||
#endif /* _TRACE_HOOK_THERMAL_H */
|
#endif /* _TRACE_HOOK_THERMAL_H */
|
||||||
/* This part must be outside protection */
|
/* This part must be outside protection */
|
||||||
#include <trace/define_trace.h>
|
#include <trace/define_trace.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user