android_kernel_xiaomi_sm8450/include/trace/hooks/wakeupbypass.h
Vatsal Parasrampuria b4b7d22830 ANDROID: wakeupbypass: Add vendor hook for batteryswap
Implemented a hook to check if battery swap is enabled in
alarm timer suspend routine. During a battery swap, it is
crucial to ensure that the device remains in a suspended
state, relying on a limited backup power source. It is
essential to prevent any unintended awakenings in this
state, as they could potentially lead to sudden surges
in the power consumption, ultimately resulting in a
device shutdown. Hence, we disable alarmtimer IRQs when
in batteryswap mode.

Bug: 290881352
Change-Id: I31dc30d9a3168bb1356cccba49f0a70fd6b73782
Signed-off-by: Vatsal Parasrampuria <vp9924@zebra.com>
2023-07-20 00:34:49 +00:00

18 lines
507 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM wakeupbypass
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_WAKEUPBYPASS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_WAKEUPBYPASS_H
#include <trace/hooks/vendor_hooks.h>
DECLARE_HOOK(android_vh_wakeup_bypass,
TP_PROTO(int *is_wakeup_bypassed),
TP_ARGS(is_wakeup_bypassed));
#endif /* _TRACE_HOOK_WAKEUPBYPASS_H */
/* This part must be outside protection */
#include <trace/define_trace.h>