mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
086fdb48bc
The Qualcomm PMIC PDCharger ULOG driver provides access to logs of the ADSP firmware PDCharger module in charge of Battery and Power Delivery on modern systems. Implement trace events as a simple rpmsg driver with an 1s interval to retrieve the messages. The interface allows filtering the messages by subsystem and priority level, this could be implemented later on. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20230908-topic-sm8550-upstream-pdcharge-ulog-v1-1-d1b16b02ced2@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
37 lines
747 B
C
37 lines
747 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2023, Linaro Ltd
|
|
*/
|
|
|
|
#if !defined(_TRACE_PMIC_PDCHARGER_ULOG_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_PMIC_PDCHARGER_ULOG_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM pmic_pdcharger_ulog
|
|
|
|
TRACE_EVENT(pmic_pdcharger_ulog_msg,
|
|
TP_PROTO(char *msg),
|
|
TP_ARGS(msg),
|
|
TP_STRUCT__entry(
|
|
__string(msg, msg)
|
|
),
|
|
TP_fast_assign(
|
|
__assign_str(msg, msg);
|
|
),
|
|
TP_printk("%s", __get_str(msg))
|
|
);
|
|
|
|
#endif /* _TRACE_PMIC_PDCHARGER_ULOG_H */
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#undef TRACE_INCLUDE_PATH
|
|
#define TRACE_INCLUDE_PATH .
|
|
|
|
#undef TRACE_INCLUDE_FILE
|
|
#define TRACE_INCLUDE_FILE pmic_pdcharger_ulog
|
|
|
|
#include <trace/define_trace.h>
|