OpenBIC
OpenSource Bridge-IC
plat_sensor_table.c File Reference
#include "plat_sensor_table.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <logging/log.h>
#include "pmbus.h"
#include "ast_adc.h"
#include "sensor.h"
#include "hal_gpio.h"
#include "plat_i2c.h"
#include "pex89000.h"
#include "plat_gpio.h"
#include "plat_hook.h"
#include "plat_class.h"
#include "plat_dev.h"
#include "sq52205.h"
#include "nvme.h"
#include "plat_pldm_monitor.h"
Include dependency graph for plat_sensor_table.c:

Macros

#define COMMON_SENSOR_MONITOR_INDEX   0
 

Functions

 LOG_MODULE_REGISTER (plat_sensor_table)
 
void load_sensor_config (void)
 
uint8_t pal_get_extend_sensor_config ()
 
void pal_extend_sensor_config ()
 
void update_plat_sensor_cfg_by_stage ()
 
sensor_cfgget_common_sensor_cfg_info (uint8_t sensor_num)
 
sensor_cfgget_accl_sensor_cfg_info (uint8_t card_id, uint8_t *cfg_count)
 
bool is_acb_power_good ()
 
bool get_accl_power_status (uint8_t card_id, uint8_t option)
 
bool is_accl_power_good (uint8_t card_id)
 
bool is_accl_cable_power_good (uint8_t card_id)
 
bool is_accl_cable_power_good_timeout (uint8_t card_id)
 
bool is_accl_cable_power_good_fault (uint8_t card_id)
 
bool is_dc_access (uint8_t sensor_num)
 
struct k_mutex * get_i2c_mux_mutex (uint8_t i2c_bus)
 
int get_accl_bus (uint8_t card_id, uint8_t sensor_number)
 
sensor_cfgget_accl_sensor_config (uint8_t card_id, uint8_t sensor_num)
 
bool get_accl_mux_config (uint8_t card_id, mux_config *accl_mux)
 
bool is_time_to_poll_card_sensor (uint8_t card_id)
 

Variables

struct k_mutex i2c_4_pi4msd5v9542_mutex
 
struct k_mutex i2c_7_accl_mutex
 
struct k_mutex i2c_8_accl_mutex
 
sensor_cfg plat_sensor_config []
 
sensor_cfg adm1272_sensor_config_table []
 
sensor_cfg ltc4286_sensor_config_table []
 
sensor_cfg q50sn120a1_sensor_config_table []
 
sensor_cfg bmr351_sensor_config_table []
 
sensor_cfg vr_xdpe15284_sensor_config_table []
 
sensor_cfg vr_mp2985h_sensor_config_table []
 
sensor_cfg power_monitor_ina233_sq52205_sensor_config_table []
 
sensor_cfg power_monitor_sq52205_ina230_sensor_config_table []
 
sensor_compatible_cfg pre_dvt_update_cfg_table []
 
sensor_poll_delay_cfg sensor_poll_delay_cfgs []
 
const int SENSOR_CONFIG_SIZE = ARRAY_SIZE(plat_sensor_config)
 

Macro Definition Documentation

◆ COMMON_SENSOR_MONITOR_INDEX

#define COMMON_SENSOR_MONITOR_INDEX   0

Function Documentation

◆ get_accl_bus()

int get_accl_bus ( uint8_t  card_id,
uint8_t  sensor_number 
)

◆ get_accl_mux_config()

bool get_accl_mux_config ( uint8_t  card_id,
mux_config accl_mux 
)

◆ get_accl_power_status()

bool get_accl_power_status ( uint8_t  card_id,
uint8_t  option 
)
Here is the call graph for this function:

◆ get_accl_sensor_cfg_info()

sensor_cfg * get_accl_sensor_cfg_info ( uint8_t  card_id,
uint8_t *  cfg_count 
)

◆ get_accl_sensor_config()

sensor_cfg * get_accl_sensor_config ( uint8_t  card_id,
uint8_t  sensor_num 
)
Here is the call graph for this function:

◆ get_common_sensor_cfg_info()

sensor_cfg * get_common_sensor_cfg_info ( uint8_t  sensor_num)
Here is the call graph for this function:

◆ get_i2c_mux_mutex()

struct k_mutex * get_i2c_mux_mutex ( uint8_t  i2c_bus)

◆ is_acb_power_good()

bool is_acb_power_good ( )
Here is the call graph for this function:

◆ is_accl_cable_power_good()

bool is_accl_cable_power_good ( uint8_t  card_id)
Here is the call graph for this function:

◆ is_accl_cable_power_good_fault()

bool is_accl_cable_power_good_fault ( uint8_t  card_id)
Here is the call graph for this function:

◆ is_accl_cable_power_good_timeout()

bool is_accl_cable_power_good_timeout ( uint8_t  card_id)
Here is the call graph for this function:

◆ is_accl_power_good()

bool is_accl_power_good ( uint8_t  card_id)
Here is the call graph for this function:

◆ is_dc_access()

bool is_dc_access ( uint8_t  sensor_num)
Here is the call graph for this function:

◆ is_time_to_poll_card_sensor()

bool is_time_to_poll_card_sensor ( uint8_t  card_id)
Here is the call graph for this function:

◆ load_sensor_config()

void load_sensor_config ( void  )
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_sensor_table  )

◆ pal_extend_sensor_config()

void pal_extend_sensor_config ( void  )

◆ pal_get_extend_sensor_config()

uint8_t pal_get_extend_sensor_config ( void  )

◆ update_plat_sensor_cfg_by_stage()

void update_plat_sensor_cfg_by_stage ( )
Here is the call graph for this function:

Variable Documentation

◆ adm1272_sensor_config_table

sensor_cfg adm1272_sensor_config_table[]

◆ bmr351_sensor_config_table

sensor_cfg bmr351_sensor_config_table[]
Initial value:
= {
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
}
#define I2C_BUS1
Definition: plat_i2c.h:24
#define SENSOR_NUM_VOL_P12V_AUX_1
Definition: plat_sensor_table.h:74
#define POWER_BRICK_2_ADDR
Definition: plat_sensor_table.h:37
#define SENSOR_NUM_CUR_P12V_AUX_1
Definition: plat_sensor_table.h:107
#define SENSOR_NUM_PWR_P12V_AUX_2
Definition: plat_sensor_table.h:133
#define POWER_BRICK_1_ADDR
Definition: plat_sensor_table.h:36
#define SENSOR_NUM_TEMP_POWER_BRICK_2
Definition: plat_sensor_table.h:64
#define SENSOR_NUM_PWR_P12V_AUX_1
Definition: plat_sensor_table.h:132
#define SENSOR_NUM_VOL_P12V_AUX_2
Definition: plat_sensor_table.h:75
#define SENSOR_NUM_CUR_P12V_AUX_2
Definition: plat_sensor_table.h:108
#define SENSOR_NUM_TEMP_POWER_BRICK_1
Definition: plat_sensor_table.h:63
@ PMBUS_READ_IOUT
Definition: pmbus.h:118
@ PMBUS_READ_VOUT
Definition: pmbus.h:117
@ PMBUS_READ_POUT
Definition: pmbus.h:128
@ PMBUS_READ_TEMPERATURE_1
Definition: pmbus.h:119
@ ENABLE_SENSOR_POLLING
Definition: sensor.h:197
@ SENSOR_INIT_STATUS
Definition: sensor.h:241
#define POLL_TIME_DEFAULT
Definition: sensor.h:48
@ sensor_dev_bmr351
Definition: sensor.h:163
#define SAMPLE_COUNT_DEFAULT
Definition: sensor.h:46
bool stby_access(uint8_t sensor_number)
Definition: sensor.c:1119

◆ i2c_4_pi4msd5v9542_mutex

struct k_mutex i2c_4_pi4msd5v9542_mutex

◆ i2c_7_accl_mutex

struct k_mutex i2c_7_accl_mutex

◆ i2c_8_accl_mutex

struct k_mutex i2c_8_accl_mutex

◆ ltc4286_sensor_config_table

sensor_cfg ltc4286_sensor_config_table[]

◆ plat_sensor_config

sensor_cfg plat_sensor_config[]

◆ power_monitor_ina233_sq52205_sensor_config_table

sensor_cfg power_monitor_ina233_sq52205_sensor_config_table[]

◆ power_monitor_sq52205_ina230_sensor_config_table

sensor_cfg power_monitor_sq52205_ina230_sensor_config_table[]

◆ pre_dvt_update_cfg_table

sensor_compatible_cfg pre_dvt_update_cfg_table[]

◆ q50sn120a1_sensor_config_table

sensor_cfg q50sn120a1_sensor_config_table[]
Initial value:
= {
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },
}
@ sensor_dev_q50sn120a1
Definition: sensor.h:150

◆ SENSOR_CONFIG_SIZE

const int SENSOR_CONFIG_SIZE = ARRAY_SIZE(plat_sensor_config)

◆ sensor_poll_delay_cfgs

sensor_poll_delay_cfg sensor_poll_delay_cfgs[]
Initial value:
= {
}
@ PCIE_CARD_6
Definition: plat_class.h:144
@ PCIE_CARD_3
Definition: plat_class.h:141
@ PCIE_CARD_7
Definition: plat_class.h:145
@ PCIE_CARD_4
Definition: plat_class.h:142
@ PCIE_CARD_1
Definition: plat_class.h:139
@ PCIE_CARD_10
Definition: plat_class.h:148
@ PCIE_CARD_11
Definition: plat_class.h:149
@ PCIE_CARD_9
Definition: plat_class.h:147
@ PCIE_CARD_12
Definition: plat_class.h:150
@ PCIE_CARD_8
Definition: plat_class.h:146
@ PCIE_CARD_2
Definition: plat_class.h:140
@ PCIE_CARD_5
Definition: plat_class.h:143
#define ACCL_POWER_GOOD_TIME_DEFAULT
Definition: plat_sensor_table.h:280

◆ vr_mp2985h_sensor_config_table

sensor_cfg vr_mp2985h_sensor_config_table[]

◆ vr_xdpe15284_sensor_config_table

sensor_cfg vr_xdpe15284_sensor_config_table[]