13d0407baSopenharmony_ci/* 23d0407baSopenharmony_ci * include/linux/wakeup_reason.h 33d0407baSopenharmony_ci * 43d0407baSopenharmony_ci * Logs the reason which caused the kernel to resume 53d0407baSopenharmony_ci * from the suspend mode. 63d0407baSopenharmony_ci * 73d0407baSopenharmony_ci * Copyright (C) 2014 Google, Inc. 83d0407baSopenharmony_ci * This software is licensed under the terms of the GNU General Public 93d0407baSopenharmony_ci * License version 2, as published by the Free Software Foundation, and 103d0407baSopenharmony_ci * may be copied, distributed, and modified under those terms. 113d0407baSopenharmony_ci * 123d0407baSopenharmony_ci * This program is distributed in the hope that it will be useful, 133d0407baSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 143d0407baSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 153d0407baSopenharmony_ci * GNU General Public License for more details. 163d0407baSopenharmony_ci */ 173d0407baSopenharmony_ci 183d0407baSopenharmony_ci#ifndef _LINUX_WAKEUP_REASON_H 193d0407baSopenharmony_ci#define _LINUX_WAKEUP_REASON_H 203d0407baSopenharmony_ci 213d0407baSopenharmony_ci#define MAX_SUSPEND_ABORT_LEN 256 223d0407baSopenharmony_ci 233d0407baSopenharmony_ci#ifdef CONFIG_SUSPEND 243d0407baSopenharmony_civoid log_irq_wakeup_reason(int irq); 253d0407baSopenharmony_civoid log_threaded_irq_wakeup_reason(int irq, int parent_irq); 263d0407baSopenharmony_civoid log_suspend_abort_reason(const char *fmt, ...); 273d0407baSopenharmony_civoid log_abnormal_wakeup_reason(const char *fmt, ...); 283d0407baSopenharmony_civoid clear_wakeup_reasons(void); 293d0407baSopenharmony_ci#else 303d0407baSopenharmony_cistatic inline void log_irq_wakeup_reason(int irq) { } 313d0407baSopenharmony_cistatic inline void log_threaded_irq_wakeup_reason(int irq, int parent_irq) { } 323d0407baSopenharmony_cistatic inline void log_suspend_abort_reason(const char *fmt, ...) { } 333d0407baSopenharmony_cistatic inline void log_abnormal_wakeup_reason(const char *fmt, ...) { } 343d0407baSopenharmony_cistatic inline void clear_wakeup_reasons(void) { } 353d0407baSopenharmony_ci#endif 363d0407baSopenharmony_ci 373d0407baSopenharmony_ci#endif /* _LINUX_WAKEUP_REASON_H */ 38