mirror of
https://github.com/revyos/thead-kernel.git
synced 2026-09-17 12:52:10 +02:00
35
include/linux/firmware/thead/light_event.h
Normal file
35
include/linux/firmware/thead/light_event.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _LIGHT_EVENT_H
|
||||
#define _LIGHT_EVENT_H
|
||||
|
||||
enum light_rebootmode_index {
|
||||
/* C902 event rebootmode */
|
||||
LIGHT_EVENT_PMIC_RESET = 0x0,
|
||||
LIGHT_EVENT_PMIC_ONKEY,
|
||||
LIGHT_EVENT_PMIC_POWERUP,
|
||||
|
||||
/* C910 event rebootmode */
|
||||
LIGHT_EVENT_SW_REBOOT = 0x20,
|
||||
LIGHT_EVENT_SW_WATCHDOG,
|
||||
LIGHT_EVENT_SW_PANIC,
|
||||
LIGHT_EVENT_SW_HANG,
|
||||
LIGHT_EVENT_MAX,
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_LIGHT_REBOOTMODE)
|
||||
extern int light_event_set_rebootmode(enum light_rebootmode_index mode);
|
||||
extern int light_event_get_rebootmode(enum light_rebootmode_index *mode);
|
||||
#else
|
||||
static int light_event_set_rebootmode(enum light_rebootmode_index mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static int light_event_get_rebootmode(enum light_rebootmode_index *mode)
|
||||
{
|
||||
*mode = LIGHT_EVENT_MAX;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user