You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.0 KiB
78 lines
2.0 KiB
7 months ago
|
/*
|
||
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2020. All rights reserved.
|
||
|
* Description: header file of drv_pmoc
|
||
|
*/
|
||
|
|
||
|
#ifndef __DRV_PMOC_H__
|
||
|
#define __DRV_PMOC_H__
|
||
|
|
||
|
#include "td_type.h"
|
||
|
#include "drv_pmoc_ext.h"
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
#if __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
typedef struct {
|
||
|
td_u32 gpio_aon_group_min;
|
||
|
td_u32 gpio_aon_group_max;
|
||
|
td_u32 reg_mute_addr;
|
||
|
td_u32 mute_wakeup_enable;
|
||
|
td_u32 mute_wakeup_disable;
|
||
|
td_u32 product_flag;
|
||
|
} pmoc_dts_info;
|
||
|
|
||
|
typedef struct {
|
||
|
td_u32 wakeup_type;
|
||
|
td_u32 gpio_wakeup_port;
|
||
|
td_u32 ir_low_val;
|
||
|
td_u32 ir_high_val;
|
||
|
td_u32 standby_period;
|
||
|
td_u16 lsadc_channel;
|
||
|
td_u16 lsadc_wakeup_key;
|
||
|
} pmoc_wakeup_message;
|
||
|
|
||
|
typedef union {
|
||
|
td_u32 val32;
|
||
|
td_u16 val16[2]; /* 2: array size */
|
||
|
td_u8 val8[4]; /* 4: array size */
|
||
|
} u32_data;
|
||
|
|
||
|
td_s32 pmoc_ioctl(td_u32 cmd, td_void *arg, td_void *private_data);
|
||
|
#ifndef MODULE
|
||
|
td_void pmoc_inject_timesleep_to_timekeeping(td_void);
|
||
|
#endif
|
||
|
td_s32 pmoc_get_suspend_param(td_void *arg);
|
||
|
td_s32 pmoc_get_standby_period(td_void *arg);
|
||
|
td_s32 pmoc_get_wakeup_attr(td_void *arg);
|
||
|
td_void pmoc_tsensor_init(td_void);
|
||
|
td_s32 pmoc_tsensor_read(td_s16 *temperature);
|
||
|
td_void pmoc_get_wakeup_message(td_void);
|
||
|
td_void pmoc_set_lpmcu_dbg_level(td_u32 value);
|
||
|
td_s32 pmoc_set_wakeup_type_to_hrf(ext_pmoc_wakeup_type type);
|
||
|
td_s32 pmoc_load_wakeup_param(td_void);
|
||
|
#ifndef CONFIG_SOCT_COMMON_KERNEL
|
||
|
#ifndef CONFIG_SOCT_OH_KERNEL
|
||
|
td_void pmoc_set_s3_s4_param(td_bool is_s3);
|
||
|
#endif
|
||
|
#endif
|
||
|
td_s32 pmoc_load_lpmcu(td_void);
|
||
|
td_void pmoc_unload_lpmcu(td_void);
|
||
|
td_s32 pmoc_sem_init(td_void);
|
||
|
td_void pmoc_sem_deinit(td_void);
|
||
|
td_s32 pmoc_register_remap(td_void);
|
||
|
td_void pmoc_register_unmap(td_void);
|
||
|
td_s32 pmoc_dts_read(td_void);
|
||
|
td_s32 pmoc_get_dts_data(pmoc_dts_info *info);
|
||
|
td_void pmoc_set_shutdown_type(ext_pmoc_wakeup_type type);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
#if __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
#endif /* End of #ifdef __cplusplus */
|
||
|
|
||
|
#endif /* End of #ifndef __DRV_PMOC_H__ */
|