lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2016, ZIXC Corporation. |
| 3 | * |
| 4 | */ |
| 5 | |
| 6 | #ifndef __POWER_H__ |
| 7 | #define __POWER_H__ |
| 8 | |
| 9 | #include <boot_mode.h> |
| 10 | |
| 11 | |
| 12 | /* PMU½Ó¿Úº¯Êý */ |
| 13 | struct pmu_opt{ |
| 14 | int (*read_reg)(ushort reg, uchar *val); |
| 15 | int (*write_reg)(ushort reg, uchar *val); |
| 16 | int (*get_boot_reason)(boot_reason_t *boot_reason); |
| 17 | int (*ps_hold_pull_on)(void); |
| 18 | int (*ps_hold_pull_off)(void); |
| 19 | int (*ps_hold2_pull_on)(void); |
| 20 | int (*ps_hold2_pull_off)(void); |
| 21 | int (*power_off)(void); |
| 22 | |
| 23 | }; |
| 24 | |
| 25 | int pmu_init(void); |
| 26 | int power_init(void); |
| 27 | int register_pmu_opt(struct pmu_opt *opt); |
| 28 | struct pmu_opt * get_pmu_opt(void); |
| 29 | |
| 30 | |
| 31 | #endif /* __POWER_H__ */ |