OpenBIC
OpenSource Bridge-IC
plat_pldm_sensor.c File Reference
#include <logging/log.h>
#include "pmbus.h"
#include "ads7830.h"
#include "pdr.h"
#include "tmp431.h"
#include "sensor.h"
#include "pldm_sensor.h"
#include "pldm_monitor.h"
#include "plat_hook.h"
#include "plat_i2c.h"
#include "plat_pldm_sensor.h"
#include "plat_class.h"
#include "plat_gpio.h"
#include "emc1413.h"
Include dependency graph for plat_pldm_sensor.c:

Classes

struct  plat_sensor_vr_extend_info
 
struct  plat_sensor_tmp_extend_info
 

Typedefs

typedef struct plat_sensor_vr_extend_info plat_sensor_vr_extend_info
 
typedef struct plat_sensor_tmp_extend_info plat_sensor_tmp_extend_info
 

Functions

 LOG_MODULE_REGISTER (plat_pldm_sensor)
 
void find_vr_addr_by_sensor_id (uint8_t sensor_id, uint8_t *vr_addr)
 
uint32_t plat_get_pdr_size (uint8_t pdr_type)
 
pldm_sensor_threadplat_pldm_sensor_load_thread ()
 
pldm_sensor_infoplat_pldm_sensor_load (int thread_id)
 
int plat_pldm_sensor_get_sensor_count (int thread_id)
 
void plat_pldm_sensor_get_pdr_numeric_sensor (int thread_id, int sensor_num, PDR_numeric_sensor *numeric_sensor_table)
 
void plat_load_numeric_sensor_pdr_table (PDR_numeric_sensor *numeric_sensor_table)
 
void plat_load_aux_sensor_names_pdr_table (PDR_sensor_auxiliary_names *aux_sensor_name_table)
 
size_t char16_strlen (const char16_t *str)
 
char16_tchar16_strcpy (char16_t *dest, const char16_t *src)
 
char16_tchar16_strcat_char (char16_t *dest, char16_t ch)
 
void plat_init_entity_aux_names_pdr_table ()
 
void plat_load_entity_aux_names_pdr_table (PDR_entity_auxiliary_names *entity_aux_name_table)
 
uint16_t plat_get_pdr_entity_aux_names_size ()
 
void find_tmp_addr_and_offset_by_sensor_id (uint8_t sensor_id, uint8_t *tmp_addr, uint16_t *tmp_offset)
 
void set_plat_sensor_polling_enable_flag (bool value)
 
void set_plat_sensor_temp_polling_enable_flag (bool value)
 
void set_plat_sensor_vr_polling_enable_flag (bool value)
 
void set_plat_sensor_adc_polling_enable_flag (bool value)
 
bool get_plat_sensor_polling_enable_flag ()
 
bool get_plat_sensor_adc_polling_enable_flag ()
 
bool get_plat_sensor_temp_polling_enable_flag ()
 
bool get_plat_sensor_vr_polling_enable_flag ()
 
bool is_adc_access (uint8_t sensor_num)
 
bool is_temp_access (uint8_t cfg_idx)
 
bool is_vr_access (uint8_t sensor_num)
 
bool get_sensor_info_by_sensor_id (uint8_t sensor_id, uint8_t *vr_bus, uint8_t *vr_addr, uint8_t *sensor_dev)
 
sensor_cfgget_sensor_cfg_by_sensor_id (uint8_t sensor_id)
 

Variables

plat_sensor_vr_extend_info plat_sensor_vr_extend_table []
 
plat_sensor_tmp_extend_info plat_sensor_tmp_extend_table [] = {}
 
pldm_sensor_info plat_pldm_sensor_temp_table []
 
pldm_sensor_info plat_pldm_sensor_vr_table []
 
pldm_sensor_info plat_pldm_sensor_adc_table []
 
PDR_sensor_auxiliary_names plat_pdr_sensor_aux_names_table []
 
PDR_entity_auxiliary_names plat_pdr_entity_aux_names_table []
 
uint16_t plat_pdr_entity_aux_names_table_size = 0
 

Typedef Documentation

◆ plat_sensor_tmp_extend_info

◆ plat_sensor_vr_extend_info

Function Documentation

◆ char16_strcat_char()

char16_t * char16_strcat_char ( char16_t dest,
char16_t  ch 
)
Here is the call graph for this function:

◆ char16_strcpy()

char16_t * char16_strcpy ( char16_t dest,
const char16_t src 
)

◆ char16_strlen()

size_t char16_strlen ( const char16_t str)

◆ find_tmp_addr_and_offset_by_sensor_id()

void find_tmp_addr_and_offset_by_sensor_id ( uint8_t  sensor_id,
uint8_t *  tmp_addr,
uint16_t *  tmp_offset 
)

◆ find_vr_addr_by_sensor_id()

void find_vr_addr_by_sensor_id ( uint8_t  sensor_id,
uint8_t *  vr_addr 
)

◆ get_plat_sensor_adc_polling_enable_flag()

bool get_plat_sensor_adc_polling_enable_flag ( )

◆ get_plat_sensor_polling_enable_flag()

bool get_plat_sensor_polling_enable_flag ( )

◆ get_plat_sensor_temp_polling_enable_flag()

bool get_plat_sensor_temp_polling_enable_flag ( )

◆ get_plat_sensor_vr_polling_enable_flag()

bool get_plat_sensor_vr_polling_enable_flag ( )

◆ get_sensor_cfg_by_sensor_id()

sensor_cfg * get_sensor_cfg_by_sensor_id ( uint8_t  sensor_id)
Here is the call graph for this function:

◆ get_sensor_info_by_sensor_id()

bool get_sensor_info_by_sensor_id ( uint8_t  sensor_id,
uint8_t *  vr_bus,
uint8_t *  vr_addr,
uint8_t *  sensor_dev 
)
Here is the call graph for this function:

◆ is_adc_access()

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

◆ is_temp_access()

bool is_temp_access ( uint8_t  cfg_idx)
Here is the call graph for this function:

◆ is_vr_access()

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

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_pldm_sensor  )

◆ plat_get_pdr_entity_aux_names_size()

uint16_t plat_get_pdr_entity_aux_names_size ( )

◆ plat_get_pdr_size()

uint32_t plat_get_pdr_size ( uint8_t  pdr_type)
Here is the call graph for this function:

◆ plat_init_entity_aux_names_pdr_table()

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

◆ plat_load_aux_sensor_names_pdr_table()

void plat_load_aux_sensor_names_pdr_table ( PDR_sensor_auxiliary_names aux_sensor_name_table)

◆ plat_load_entity_aux_names_pdr_table()

void plat_load_entity_aux_names_pdr_table ( PDR_entity_auxiliary_names entity_aux_name_table)

◆ plat_load_numeric_sensor_pdr_table()

void plat_load_numeric_sensor_pdr_table ( PDR_numeric_sensor numeric_sensor_table)
Here is the call graph for this function:

◆ plat_pldm_sensor_get_pdr_numeric_sensor()

void plat_pldm_sensor_get_pdr_numeric_sensor ( int  thread_id,
int  sensor_num,
PDR_numeric_sensor numeric_sensor_table 
)

◆ plat_pldm_sensor_get_sensor_count()

int plat_pldm_sensor_get_sensor_count ( int  thread_id)

◆ plat_pldm_sensor_load()

pldm_sensor_info * plat_pldm_sensor_load ( int  thread_id)

◆ plat_pldm_sensor_load_thread()

pldm_sensor_thread * plat_pldm_sensor_load_thread ( )

◆ set_plat_sensor_adc_polling_enable_flag()

void set_plat_sensor_adc_polling_enable_flag ( bool  value)

◆ set_plat_sensor_polling_enable_flag()

void set_plat_sensor_polling_enable_flag ( bool  value)

◆ set_plat_sensor_temp_polling_enable_flag()

void set_plat_sensor_temp_polling_enable_flag ( bool  value)

◆ set_plat_sensor_vr_polling_enable_flag()

void set_plat_sensor_vr_polling_enable_flag ( bool  value)

Variable Documentation

◆ plat_pdr_entity_aux_names_table

PDR_entity_auxiliary_names plat_pdr_entity_aux_names_table[]
Initial value:
= { {
{
.record_handle = 0x00000000,
.PDR_header_version = 0x01,
.record_change_number = 0x0000,
.data_length = 0x0000,
},
.entity_type = 0x0000,
.entity_instance_number = 0x0001,
.container_id = 0x0000,
.shared_name_count = 0x0,
.nameStringCount = 0x1,
.nameLanguageTag = "en",
} }
@ PLDM_ENTITY_AUXILIARY_NAMES_PDR
Definition: pdr.h:54

◆ plat_pdr_entity_aux_names_table_size

uint16_t plat_pdr_entity_aux_names_table_size = 0

◆ plat_pdr_sensor_aux_names_table

PDR_sensor_auxiliary_names plat_pdr_sensor_aux_names_table[]

◆ plat_pldm_sensor_adc_table

pldm_sensor_info plat_pldm_sensor_adc_table[]

◆ plat_pldm_sensor_temp_table

pldm_sensor_info plat_pldm_sensor_temp_table[]

◆ plat_pldm_sensor_vr_table

pldm_sensor_info plat_pldm_sensor_vr_table[]

◆ plat_sensor_tmp_extend_table

plat_sensor_tmp_extend_info plat_sensor_tmp_extend_table[] = {}

◆ plat_sensor_vr_extend_table

plat_sensor_vr_extend_info plat_sensor_vr_extend_table[]
Initial value:
= {
}
#define VR_ASIC_P0V825_A0_MP2971_ADDR
Definition: plat_pldm_sensor.h:31
@ SENSOR_NUM_VR_ASIC_P0V825_A2_PWR_W
Definition: plat_pldm_sensor.h:61
@ SENSOR_NUM_VR_ASIC_P0V895_PEX_PWR_W
Definition: plat_pldm_sensor.h:49
@ SENSOR_NUM_VR_ASIC_P0V895_PEX_TEMP_C
Definition: plat_pldm_sensor.h:46
@ SENSOR_NUM_VR_ASIC_P0V825_A1_TEMP_C
Definition: plat_pldm_sensor.h:54
@ SENSOR_NUM_VR_ASIC_P0V825_A1_VOLT_V
Definition: plat_pldm_sensor.h:55
@ SENSOR_NUM_VR_ASIC_P0V895_PEX_CURR_A
Definition: plat_pldm_sensor.h:48
@ SENSOR_NUM_VR_ASIC_P0V895_PEX_VOLT_V
Definition: plat_pldm_sensor.h:47
@ SENSOR_NUM_VR_ASIC_P0V825_A2_CURR_A
Definition: plat_pldm_sensor.h:60
@ SENSOR_NUM_VR_ASIC_P0V825_A1_PWR_W
Definition: plat_pldm_sensor.h:57
@ SENSOR_NUM_VR_ASIC_P0V825_A2_VOLT_V
Definition: plat_pldm_sensor.h:59
@ SENSOR_NUM_VR_ASIC_P0V825_A0_CURR_A
Definition: plat_pldm_sensor.h:52
@ SENSOR_NUM_VR_ASIC_P0V825_A2_TEMP_C
Definition: plat_pldm_sensor.h:58
@ SENSOR_NUM_VR_ASIC_P0V825_A0_TEMP_C
Definition: plat_pldm_sensor.h:50
@ SENSOR_NUM_VR_ASIC_P0V825_A1_CURR_A
Definition: plat_pldm_sensor.h:56
@ SENSOR_NUM_VR_ASIC_P0V825_A0_VOLT_V
Definition: plat_pldm_sensor.h:51
@ SENSOR_NUM_VR_ASIC_P0V825_A0_PWR_W
Definition: plat_pldm_sensor.h:53
#define VR_ASIC_P0V825_A1_MP2971_ADDR
Definition: plat_pldm_sensor.h:34
#define VR_ASIC_P0V825_A2_MP2971_ADDR
Definition: plat_pldm_sensor.h:37
#define VR_ASIC_P0V895_PEX_MP2971_ADDR
Definition: plat_pldm_sensor.h:28