|
OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>#include <string.h>#include "libutil.h"#include "sensor.h"#include "plat_i2c.h"#include "plat_gpio.h"#include "plat_hook.h"#include "plat_sensor_table.h"#include "i2c-mux-tca9548.h"#include "pex89000.h"#include "pmbus.h"#include "nvme.h"#include "plat_pldm_monitor.h"#include "plat_mctp.h"#include "plat_fru.h"#include "plat_class.h"#include "tmp75.h"#include <logging/log.h>
Macros | |
| #define | ADJUST_MP5990_POWER(x) ((x * 1.0004) + 6.5116) |
| #define | ADJUST_MP5990_CURRENT(x) ((x * 0.9993) + 0.6114) |
| #define | ADJUST_LTC4282_POWER(x) ((x * 0.9722) - 16.315) |
| #define | ADJUST_LTC4282_CURRENT(x) ((x * 0.9634) - 1.0236) |
| #define | ADJUST_LTC4286_POWER(x) ((x * 0.95) - 8.6) |
| #define | ADJUST_LTC4286_CURRENT(x) ((x * 0.95) - 0.7) |
Functions | |
| LOG_MODULE_REGISTER (plat_hook) | |
| K_MUTEX_DEFINE (i2c_bus6_mutex) | |
| K_MUTEX_DEFINE (i2c_bus9_mutex) | |
| K_MUTEX_DEFINE (i2c_bus10_mutex) | |
| bool | pre_vr_read (sensor_cfg *cfg, void *args) |
| bool | pre_pex89000_read (sensor_cfg *cfg, void *args) |
| bool | pre_i2c_bus_read (sensor_cfg *cfg, void *args) |
| bool | post_i2c_bus_read (sensor_cfg *cfg, void *args, int *reading) |
| bool | post_mp5990_read (sensor_cfg *cfg, void *args, int *reading) |
| bool | post_ltc4282_read (sensor_cfg *cfg, void *args, int *reading) |
| bool | post_ltc4286_read (sensor_cfg *cfg, void *args, int *reading) |
| struct k_mutex * | find_bus_mutex (sensor_cfg *cfg) |
| void | ssd_drive_reinit (void) |
| void | nic_drive_reinit_for_pollara (void) |
| void | nic_optics_drive_reinit_for_pollara (void) |
| bool | is_mb_dc_on () |
| void | set_cx7_init_arg_to_thor2 () |
| #define ADJUST_LTC4282_CURRENT | ( | x | ) | ((x * 0.9634) - 1.0236) |
| #define ADJUST_LTC4282_POWER | ( | x | ) | ((x * 0.9722) - 16.315) |
| #define ADJUST_LTC4286_CURRENT | ( | x | ) | ((x * 0.95) - 0.7) |
| #define ADJUST_LTC4286_POWER | ( | x | ) | ((x * 0.95) - 8.6) |
| #define ADJUST_MP5990_CURRENT | ( | x | ) | ((x * 0.9993) + 0.6114) |
| #define ADJUST_MP5990_POWER | ( | x | ) | ((x * 1.0004) + 6.5116) |
| struct k_mutex * find_bus_mutex | ( | sensor_cfg * | cfg | ) |
| bool is_mb_dc_on | ( | ) |

| K_MUTEX_DEFINE | ( | i2c_bus10_mutex | ) |
| K_MUTEX_DEFINE | ( | i2c_bus6_mutex | ) |
| K_MUTEX_DEFINE | ( | i2c_bus9_mutex | ) |
| LOG_MODULE_REGISTER | ( | plat_hook | ) |
| void nic_drive_reinit_for_pollara | ( | void | ) |

| void nic_optics_drive_reinit_for_pollara | ( | void | ) |

| bool post_i2c_bus_read | ( | sensor_cfg * | cfg, |
| void * | args, | ||
| int * | reading | ||
| ) |
Because BUS9 has two mux behind 16 E1.S with the same i2c address, so close all mux channels after the sensor read to avoid conflict with other devices reading.

| bool post_ltc4282_read | ( | sensor_cfg * | cfg, |
| void * | args, | ||
| int * | reading | ||
| ) |

| bool post_ltc4286_read | ( | sensor_cfg * | cfg, |
| void * | args, | ||
| int * | reading | ||
| ) |

| bool post_mp5990_read | ( | sensor_cfg * | cfg, |
| void * | args, | ||
| int * | reading | ||
| ) |

| bool pre_i2c_bus_read | ( | sensor_cfg * | cfg, |
| void * | args | ||
| ) |

| bool pre_pex89000_read | ( | sensor_cfg * | cfg, |
| void * | args | ||
| ) |

| bool pre_vr_read | ( | sensor_cfg * | cfg, |
| void * | args | ||
| ) |

| void set_cx7_init_arg_to_thor2 | ( | ) |
| void ssd_drive_reinit | ( | void | ) |

| adc_asd_init_arg ast_adc_init_args[] |
| cx7_init_arg cx7_init_args[] |
| ina230_init_arg ina230_nic_sensor_init_args[] |
| ina230_init_arg ina230_pex_p1v25_sensor_init_args[] |
| ina230_init_arg ina230_pex_p1v8_sensor_init_args[] |
| ina230_init_arg ina230_ssd_sensor_init_args[] |
| isl28022_init_arg isl28022_nic_sensor_init_args[] |
| isl28022_init_arg isl28022_pex_p1v25_sensor_init_args[] |
| isl28022_init_arg isl28022_pex_p1v8_sensor_init_args[] |
| isl28022_init_arg isl28022_ssd_sensor_init_args[] |
| ltc4282_init_arg ltc4282_hsc_init_args[] |
| ltc4286_init_arg ltc4286_hsc_init_args[] |
| mp5990_init_arg mp5990_hsc_init_args[] |
| struct tca9548 mux_conf_addr_0xe0[] |
| struct tca9548 mux_conf_addr_0xe2[] |
| nct7718w_init_arg nct7718w_init_args[] |
| pex89000_pre_proc_arg pex89000_pre_read_args[] |
| pex89000_init_arg pex_sensor_init_args[] |
| vr_pre_proc_arg vr_pre_read_args[] |