Watch
1
Fork
You've already forked kernel_a52xq
0
mirror of https://github.com/a52xq-dev/kernel.git synced 2026-10-18 21:58:11 +07:00
kernel_a52xq/include/trace/events/thermal_virtual.h
Ram Chandrasekar 3b10834869 ANDROID: GKI: Add devm_thermal_of_virtual_sensor_register API.
This API registers a virtual thermal sensor.

Test: build
Bug: 149945768
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Change-Id: I72b29b4296d9be949d096913471153b596c67e1f
[hridya: commit amended to only pull in the API implementation and code
needed to build it.]
(cherry picked commit from 8a12149c264c7b871932ad90f76e5981452bb4bb)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-03-12 10:46:18 -07:00

46 lines
1.1 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
*/
#undef TRACE_SYSTEM
#define TRACE_SYSTEM thermal_virtual
#if !defined(_TRACE_VIRTUAL_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_VIRTUAL_H
#include <linux/thermal.h>
#include <linux/tracepoint.h>
TRACE_EVENT(virtual_temperature,
TP_PROTO(struct thermal_zone_device *virt_tz,
struct thermal_zone_device *tz, int sens_temp,
int est_temp),
TP_ARGS(virt_tz, tz, sens_temp, est_temp),
TP_STRUCT__entry(
__string(virt_zone, virt_tz->type)
__string(therm_zone, tz->type)
__field(int, sens_temp)
__field(int, est_temp)
),
TP_fast_assign(
__assign_str(virt_zone, virt_tz->type);
__assign_str(therm_zone, tz->type);
__entry->sens_temp = sens_temp;
__entry->est_temp = est_temp;
),
TP_printk("virt_zone=%s zone=%s temp=%d virtual zone estimated temp=%d",
__get_str(virt_zone), __get_str(therm_zone),
__entry->sens_temp,
__entry->est_temp)
);
#endif /* _TRACE_VIRTUAL_H */
/* This part must be outside protection */
#include <trace/define_trace.h>