1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _ESOC_CTRL_H_
8 #define _ESOC_CTRL_H_
9 #include <linux/types.h>
10 enum esoc_client_hook_prio {
11   ESOC_MHI_HOOK,
12   ESOC_MAX_HOOKS
13 };
14 struct esoc_link_data {
15   enum esoc_client_hook_prio prio;
16   __u64 link_id;
17 };
18 #define ESOC_CODE 0xCC
19 #define ESOC_CMD_EXE _IOW(ESOC_CODE, 1, unsigned int)
20 #define ESOC_WAIT_FOR_REQ _IOR(ESOC_CODE, 2, unsigned int)
21 #define ESOC_NOTIFY _IOW(ESOC_CODE, 3, unsigned int)
22 #define ESOC_GET_STATUS _IOR(ESOC_CODE, 4, unsigned int)
23 #define ESOC_GET_ERR_FATAL _IOR(ESOC_CODE, 5, unsigned int)
24 #define ESOC_WAIT_FOR_CRASH _IOR(ESOC_CODE, 6, unsigned int)
25 #define ESOC_REG_REQ_ENG _IO(ESOC_CODE, 7)
26 #define ESOC_REG_CMD_ENG _IO(ESOC_CODE, 8)
27 #define ESOC_GET_LINK_ID _IOWR(ESOC_CODE, 9, struct esoc_link_data)
28 #define ESOC_SET_BOOT_FAIL_ACT _IOW(ESOC_CODE, 10, unsigned int)
29 #define ESOC_SET_N_PON_TRIES _IOW(ESOC_CODE, 11, unsigned int)
30 #define ESOC_REQ_SEND_SHUTDOWN ESOC_REQ_SEND_SHUTDOWN
31 #define ESOC_REQ_CRASH_SHUTDOWN ESOC_REQ_CRASH_SHUTDOWN
32 #define ESOC_PON_RETRY ESOC_PON_RETRY
33 #define ESOC_BOOT_FAIL_ACTION
34 enum esoc_boot_fail_action {
35   BOOT_FAIL_ACTION_RETRY,
36   BOOT_FAIL_ACTION_COLD_RESET,
37   BOOT_FAIL_ACTION_SHUTDOWN,
38   BOOT_FAIL_ACTION_PANIC,
39   BOOT_FAIL_ACTION_NOP,
40   BOOT_FAIL_ACTION_S3_RESET,
41   BOOT_FAIL_ACTION_LAST,
42 };
43 enum esoc_evt {
44   ESOC_RUN_STATE = 0x1,
45   ESOC_UNEXPECTED_RESET,
46   ESOC_ERR_FATAL,
47   ESOC_IN_DEBUG,
48   ESOC_REQ_ENG_ON,
49   ESOC_REQ_ENG_OFF,
50   ESOC_CMD_ENG_ON,
51   ESOC_CMD_ENG_OFF,
52   ESOC_INVALID_STATE,
53   ESOC_RETRY_PON_EVT,
54   ESOC_BOOT_STATE,
55 };
56 enum esoc_cmd {
57   ESOC_PWR_ON = 1,
58   ESOC_PWR_OFF,
59   ESOC_FORCE_PWR_OFF,
60   ESOC_RESET,
61   ESOC_PREPARE_DEBUG,
62   ESOC_EXE_DEBUG,
63   ESOC_EXIT_DEBUG,
64 };
65 enum esoc_notify {
66   ESOC_IMG_XFER_DONE = 1,
67   ESOC_BOOT_DONE,
68   ESOC_BOOT_FAIL,
69   ESOC_IMG_XFER_RETRY,
70   ESOC_IMG_XFER_FAIL,
71   ESOC_UPGRADE_AVAILABLE,
72   ESOC_DEBUG_DONE,
73   ESOC_DEBUG_FAIL,
74   ESOC_PRIMARY_CRASH,
75   ESOC_PRIMARY_REBOOT,
76   ESOC_PON_RETRY,
77 };
78 enum esoc_req {
79   ESOC_REQ_IMG = 1,
80   ESOC_REQ_DEBUG,
81   ESOC_REQ_SHUTDOWN,
82   ESOC_REQ_SEND_SHUTDOWN,
83   ESOC_REQ_CRASH_SHUTDOWN,
84 };
85 #endif
86