OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <string.h>
#include "libutil.h"
#include "ast_adc.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "plat_i2c.h"
#include "plat_gpio.h"
#include "plat_sensor_table.h"
#include "plat_hook.h"
#include "plat_isr.h"
#include <logging/log.h>
#include "mp2971.h"
#include "isl69259.h"
#include "raa228249.h"
#include "tmp75.h"
#include "tmp431.h"
#include "emc1413.h"
#include "mp29816a.h"
#include "plat_pldm_sensor.h"
#include "plat_class.h"
#include "pmbus.h"
Macros | |
#define | ALERT_LEVEL_USER_SETTINGS_OFFSET 0x8200 |
#define | EEPROM_MAX_WRITE_TIME 5 |
#define | AEGIS_CPLD_ADDR (0x4C >> 1) |
#define | VR_PRE_READ_ARG(idx) |
#define | TEMP_THRESHOLD_USER_SETTINGS_OFFSET 0x8100 |
#define | VR_VOUT_USER_SETTINGS_OFFSET 0x8000 |
#define | PLAT_VOUT_GET_SET_HANDLER(get_set, min_max) |
Functions | |
LOG_MODULE_REGISTER (plat_hook) | |
int | power_level_send_event (bool is_assert, int ubc1_current, int ubc2_current) |
bool | post_ubc_read (sensor_cfg *cfg, void *args, int *reading) |
bool | temp_sensor_rail_name_get (uint8_t rail, uint8_t **name) |
bool | temp_sensor_rail_enum_get (uint8_t *name, uint8_t *num) |
void * | vr_mutex_get (enum VR_INDEX_E vr_index) |
bool | pre_vr_read (sensor_cfg *cfg, void *args) |
bool | post_vr_read (sensor_cfg *cfg, void *args, int *const reading) |
bool | is_mb_dc_on () |
void | vr_mutex_init (void) |
bool | vr_rail_name_get (uint8_t rail, uint8_t **name) |
bool | vr_status_name_get (uint8_t rail, uint8_t **name) |
bool | vr_rail_enum_get (uint8_t *name, uint8_t *num) |
bool | vr_status_enum_get (uint8_t *name, uint8_t *num) |
bool | vr_vout_user_settings_get (void *user_settings) |
bool | vr_vout_user_settings_set (void *user_settings) |
int | set_user_settings_alert_level_to_eeprom (void *user_settings, uint8_t data_length) |
int | get_user_settings_alert_level_from_eeprom (void *user_settings, uint8_t data_length) |
bool | temp_index_threshold_type_name_get (uint8_t type, uint8_t **name) |
bool | temp_threshold_type_enum_get (uint8_t *name, uint8_t *num) |
bool | temp_threshold_user_settings_get (void *temp_threshold_user_settings) |
bool | temp_threshold_user_settings_set (void *temp_threshold_user_settings) |
void | user_settings_init (void) |
void | set_uart_power_event_is_enable (bool is_enable) |
void | pwr_level_mutex_init (void) |
void | set_alert_level_to_default_or_user_setting (bool is_default, int32_t user_setting) |
int | get_alert_level_info (bool *is_assert, int32_t *default_value, int32_t *setting_value) |
bool | vr_rail_voltage_peak_get (uint8_t *name, int *peak_value) |
bool | vr_rail_voltage_peak_clear (uint8_t rail_index) |
bool | plat_get_vr_status (uint8_t rail, uint8_t vr_status_rail, uint16_t *vr_status) |
bool | plat_clear_vr_status (uint8_t rail) |
bool | perm_config_clear (void) |
bool | plat_get_vout_command (uint8_t rail, uint16_t *millivolt) |
bool | plat_set_vout_command (uint8_t rail, uint16_t *millivolt, bool is_default, bool is_perm) |
bool | plat_get_temp_status (uint8_t rail, uint8_t *temp_status) |
bool | plat_clear_temp_status (uint8_t rail) |
PLAT_VOUT_GET_SET_HANDLER (get, min) | |
PLAT_VOUT_GET_SET_HANDLER (get, max) | |
PLAT_VOUT_GET_SET_HANDLER (set, min) | |
PLAT_VOUT_GET_SET_HANDLER (set, max) | |
bool | plat_get_temp_threshold (uint8_t temp_index_threshold_type, uint32_t *millidegree_celsius) |
bool | plat_set_temp_threshold (uint8_t temp_index_threshold_type, uint32_t *millidegree_celsius, bool is_default, bool is_perm) |
Variables | |
int32_t | alert_level_mA_default = 110000 |
int32_t | alert_level_mA_user_setting = 110000 |
bool | alert_level_is_assert = false |
vr_pre_proc_arg | vr_pre_read_args [] |
mp2971_init_arg | mp2971_init_args [] |
isl69259_init_arg | isl69259_init_args [] |
temp_mapping_sensor | temp_index_table [] |
temp_threshold_mapping_sensor | temp_index_threshold_type_table [] |
temp_threshold_user_settings_struct | temp_threshold_user_settings = { 0 } |
struct temp_threshold_user_settings_struct | temp_threshold_default_settings = { 0 } |
vr_mapping_sensor | vr_rail_table [] |
vr_mapping_status | vr_status_table [] |
vr_vout_user_settings | user_settings = { 0 } |
struct vr_vout_user_settings | default_settings = { 0 } |
#define AEGIS_CPLD_ADDR (0x4C >> 1) |
#define ALERT_LEVEL_USER_SETTINGS_OFFSET 0x8200 |
#define EEPROM_MAX_WRITE_TIME 5 |
#define PLAT_VOUT_GET_SET_HANDLER | ( | get_set, | |
min_max | |||
) |
#define TEMP_THRESHOLD_USER_SETTINGS_OFFSET 0x8100 |
#define VR_PRE_READ_ARG | ( | idx | ) |
#define VR_VOUT_USER_SETTINGS_OFFSET 0x8000 |
int get_alert_level_info | ( | bool * | is_assert, |
int32_t * | default_value, | ||
int32_t * | setting_value | ||
) |
int get_user_settings_alert_level_from_eeprom | ( | void * | user_settings, |
uint8_t | data_length | ||
) |
bool is_mb_dc_on | ( | ) |
LOG_MODULE_REGISTER | ( | plat_hook | ) |
bool perm_config_clear | ( | void | ) |
bool plat_clear_temp_status | ( | uint8_t | rail | ) |
bool plat_clear_vr_status | ( | uint8_t | rail | ) |
bool plat_get_temp_status | ( | uint8_t | rail, |
uint8_t * | temp_status | ||
) |
bool plat_get_temp_threshold | ( | uint8_t | temp_index_threshold_type, |
uint32_t * | millidegree_celsius | ||
) |
bool plat_get_vout_command | ( | uint8_t | rail, |
uint16_t * | millivolt | ||
) |
bool plat_get_vr_status | ( | uint8_t | rail, |
uint8_t | vr_status_rail, | ||
uint16_t * | vr_status | ||
) |
bool plat_set_temp_threshold | ( | uint8_t | temp_index_threshold_type, |
uint32_t * | millidegree_celsius, | ||
bool | is_default, | ||
bool | is_perm | ||
) |
bool plat_set_vout_command | ( | uint8_t | rail, |
uint16_t * | millivolt, | ||
bool | is_default, | ||
bool | is_perm | ||
) |
PLAT_VOUT_GET_SET_HANDLER | ( | get | , |
max | |||
) |
PLAT_VOUT_GET_SET_HANDLER | ( | get | , |
min | |||
) |
PLAT_VOUT_GET_SET_HANDLER | ( | set | , |
max | |||
) |
PLAT_VOUT_GET_SET_HANDLER | ( | set | , |
min | |||
) |
bool post_ubc_read | ( | sensor_cfg * | cfg, |
void * | args, | ||
int * | reading | ||
) |
bool post_vr_read | ( | sensor_cfg * | cfg, |
void * | args, | ||
int *const | reading | ||
) |
int power_level_send_event | ( | bool | is_assert, |
int | ubc1_current, | ||
int | ubc2_current | ||
) |
bool pre_vr_read | ( | sensor_cfg * | cfg, |
void * | args | ||
) |
void pwr_level_mutex_init | ( | void | ) |
void set_alert_level_to_default_or_user_setting | ( | bool | is_default, |
int32_t | user_setting | ||
) |
void set_uart_power_event_is_enable | ( | bool | is_enable | ) |
int set_user_settings_alert_level_to_eeprom | ( | void * | user_settings, |
uint8_t | data_length | ||
) |
bool temp_index_threshold_type_name_get | ( | uint8_t | type, |
uint8_t ** | name | ||
) |
bool temp_sensor_rail_enum_get | ( | uint8_t * | name, |
uint8_t * | num | ||
) |
bool temp_sensor_rail_name_get | ( | uint8_t | rail, |
uint8_t ** | name | ||
) |
bool temp_threshold_type_enum_get | ( | uint8_t * | name, |
uint8_t * | num | ||
) |
bool temp_threshold_user_settings_get | ( | void * | temp_threshold_user_settings | ) |
bool temp_threshold_user_settings_set | ( | void * | temp_threshold_user_settings | ) |
void user_settings_init | ( | void | ) |
void * vr_mutex_get | ( | enum VR_INDEX_E | vr_index | ) |
void vr_mutex_init | ( | void | ) |
bool vr_rail_enum_get | ( | uint8_t * | name, |
uint8_t * | num | ||
) |
bool vr_rail_name_get | ( | uint8_t | rail, |
uint8_t ** | name | ||
) |
bool vr_rail_voltage_peak_clear | ( | uint8_t | rail_index | ) |
bool vr_rail_voltage_peak_get | ( | uint8_t * | name, |
int * | peak_value | ||
) |
bool vr_status_enum_get | ( | uint8_t * | name, |
uint8_t * | num | ||
) |
bool vr_status_name_get | ( | uint8_t | rail, |
uint8_t ** | name | ||
) |
bool vr_vout_user_settings_get | ( | void * | user_settings | ) |
bool vr_vout_user_settings_set | ( | void * | user_settings | ) |
bool alert_level_is_assert = false |
int32_t alert_level_mA_default = 110000 |
int32_t alert_level_mA_user_setting = 110000 |
struct vr_vout_user_settings default_settings = { 0 } |
temp_mapping_sensor temp_index_table[] |
temp_threshold_mapping_sensor temp_index_threshold_type_table[] |
struct temp_threshold_user_settings_struct temp_threshold_default_settings = { 0 } |
temp_threshold_user_settings_struct temp_threshold_user_settings = { 0 } |
vr_vout_user_settings user_settings = { 0 } |
vr_pre_proc_arg vr_pre_read_args[] |
vr_mapping_sensor vr_rail_table[] |
vr_mapping_status vr_status_table[] |