OpenBIC
OpenSource Bridge-IC
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
plat_hook.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef PLAT_HOOK_H
18#define PLAT_HOOK_H
19
20#include "pmbus.h"
21#include "sensor.h"
22#include "common_i2c_mux.h"
23#include "i2c-mux-pca954x.h"
24#include "ina238.h"
25#include "nct7363.h"
26#include "nct214.h"
27#include "ads112c.h"
28#include "tmp461.h"
29#include "hdc1080.h"
30#include "ast_tach.h"
31#include "xdp710.h"
32#include "e50sn12051.h"
33#include "bmr4922302_803.h"
34
35#define BUS_1_MUX_ADDR 0xE0 >> 1
36#define BUS_2_MUX_ADDR 0xE2 >> 1
37#define BUS_6_MUX_ADDR 0xE4 >> 1
38#define BUS_7_MUX_ADDR 0xE6 >> 1
39#define BUS_8_MUX_ADDR 0xE8 >> 1
40#define BUS_9_MUX_ADDR 0xE8 >> 1
41
45 double flow_val;
47
48typedef struct _ads112c_post_arg {
51
59};
60
61/**************************************************************************************************
62 * INIT ARGS
63**************************************************************************************************/
76/**************************************************************************************************
77 * POST ARGS
78**************************************************************************************************/
80
81/**************************************************************************************************
82 * PRE-HOOK/POST-HOOK FUNC
83 **************************************************************************************************/
90
91bool post_adm1272_read(sensor_cfg *cfg, void *args, int *reading);
92bool post_ads112c_read(sensor_cfg *cfg, void *args, int *reading);
93bool pre_PCA9546A_read(sensor_cfg *cfg, void *args);
94bool post_PCA9546A_read(sensor_cfg *cfg, void *args, int *reading);
95bool get_fb_present_status(uint16_t *fb_present_status);
97
98#endif
nct7363_init_arg nct7363_init_args[]
Definition: plat_hook.c:250
adm1272_init_arg adm1272_init_args[]
Definition: plat_hook.c:56
struct _flow_cache_data_mapping flow_cache_data_mapping
struct _ads112c_post_arg ads112c_post_arg
max11617_init_arg max11617_init_args[]
Definition: plat_hook.c:1223
bool pre_PCA9546A_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:938
ina238_init_arg ina238_init_args[]
Definition: plat_hook.c:753
bool post_ads112c_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:1052
bool post_PCA9546A_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:965
void clear_flow_cache_data()
Definition: plat_hook.c:1212
mux_config bus_9_PCA9546A_configs[]
Definition: plat_hook.c:901
adc_asd_init_arg adc_asd_init_args[]
Definition: plat_hook.c:749
e50sn12051_init_arg e50sn12051_init_args[]
Definition: plat_hook.c:861
nct214_init_arg nct214_init_args[]
Definition: plat_hook.c:772
mux_config bus_2_PCA9546A_configs[]
Definition: plat_hook.c:878
ast_tach_init_arg ast_tach_init_args[]
Definition: plat_hook.c:856
xdp710_init_arg xdp710_init_args[]
Definition: plat_hook.c:795
hdc1080_init_arg hdc1080_init_args[]
Definition: plat_hook.c:815
bmr4922302_803_init_arg bmr4922302_803_init_args[]
Definition: plat_hook.c:865
bool get_fb_present_status(uint16_t *fb_present_status)
Definition: plat_hook.c:1200
ads112c_post_arg ads112c_post_args[]
Definition: plat_hook.c:740
mux_config bus_1_PCA9546A_configs[]
Definition: plat_hook.c:872
mux_config bus_6_PCA9546A_configs[]
Definition: plat_hook.c:884
mux_config bus_8_PCA9546A_configs[]
Definition: plat_hook.c:896
mux_config bus_7_PCA9546A_configs[]
Definition: plat_hook.c:890
ads112c_init_arg ads112c_init_args[]
Definition: plat_hook.c:643
PLATFORM_ADS112C_SENSOR_TYPE
Definition: plat_hook.h:52
@ PLATFORM_ADS112C_OTHER
Definition: plat_hook.h:57
@ PLATFORM_ADS112C_TEMP_RPU
Definition: plat_hook.h:55
@ PLATFORM_ADS112C_PRESS
Definition: plat_hook.h:54
@ PLATFORM_ADS112C_TEMP_RACK
Definition: plat_hook.h:56
@ PLATFORM_ADS112C_FLOW
Definition: plat_hook.h:53
@ PLATFORM_ADS112C_LEAKAGE
Definition: plat_hook.h:58
bool post_adm1272_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:987
uint8_t reading[1]
Definition: pldm_monitor.h:3
Definition: sensor.h:365
Definition: sensor.h:607
Definition: ads112c.h:88
Definition: plat_hook.h:48
uint8_t plat_sensor_type
Definition: plat_hook.h:49
Definition: ast_tach.h:44
Definition: bmr4922302_803.h:20
Definition: e50sn12051.h:20
Definition: plat_hook.h:42
bool is_record
Definition: plat_hook.h:43
double flow_val
Definition: plat_hook.h:45
bool is_newest
Definition: plat_hook.h:44
Definition: hdc1080.h:24
Definition: ina238.h:23
Definition: sensor.h:753
Definition: common_i2c_mux.h:23
Definition: nct214.h:26
Definition: nct7363.h:87
Definition: sensor.h:257
Definition: xdp710.h:47