OpenBIC
OpenSource Bridge-IC
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
42typedef struct _ads112c_post_arg {
45
53};
54
55/**************************************************************************************************
56 * INIT ARGS
57**************************************************************************************************/
69/**************************************************************************************************
70 * POST ARGS
71**************************************************************************************************/
73
74/**************************************************************************************************
75 * PRE-HOOK/POST-HOOK FUNC
76 **************************************************************************************************/
83
84bool post_adm1272_read(sensor_cfg *cfg, void *args, int *reading);
85bool post_ads112c_read(sensor_cfg *cfg, void *args, int *reading);
86bool pre_PCA9546A_read(sensor_cfg *cfg, void *args);
87bool post_PCA9546A_read(sensor_cfg *cfg, void *args, int *reading);
88bool get_fb_present_status(uint16_t *fb_present_status);
89
90#endif
nct7363_init_arg nct7363_init_args[]
Definition: plat_hook.c:243
adm1272_init_arg adm1272_init_args[]
Definition: plat_hook.c:49
struct _ads112c_post_arg ads112c_post_arg
bool pre_PCA9546A_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:931
ina238_init_arg ina238_init_args[]
Definition: plat_hook.c:746
bool post_ads112c_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:1025
bool post_PCA9546A_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:958
mux_config bus_9_PCA9546A_configs[]
Definition: plat_hook.c:894
adc_asd_init_arg adc_asd_init_args[]
Definition: plat_hook.c:742
e50sn12051_init_arg e50sn12051_init_args[]
Definition: plat_hook.c:854
nct214_init_arg nct214_init_args[]
Definition: plat_hook.c:765
mux_config bus_2_PCA9546A_configs[]
Definition: plat_hook.c:871
ast_tach_init_arg ast_tach_init_args[]
Definition: plat_hook.c:849
xdp710_init_arg xdp710_init_args[]
Definition: plat_hook.c:788
hdc1080_init_arg hdc1080_init_args[]
Definition: plat_hook.c:808
bmr4922302_803_init_arg bmr4922302_803_init_args[]
Definition: plat_hook.c:858
bool get_fb_present_status(uint16_t *fb_present_status)
Definition: plat_hook.c:1178
ads112c_post_arg ads112c_post_args[]
Definition: plat_hook.c:733
mux_config bus_1_PCA9546A_configs[]
Definition: plat_hook.c:865
mux_config bus_6_PCA9546A_configs[]
Definition: plat_hook.c:877
mux_config bus_8_PCA9546A_configs[]
Definition: plat_hook.c:889
mux_config bus_7_PCA9546A_configs[]
Definition: plat_hook.c:883
ads112c_init_arg ads112c_init_args[]
Definition: plat_hook.c:636
PLATFORM_ADS112C_SENSOR_TYPE
Definition: plat_hook.h:46
@ PLATFORM_ADS112C_OTHER
Definition: plat_hook.h:51
@ PLATFORM_ADS112C_TEMP_RPU
Definition: plat_hook.h:49
@ PLATFORM_ADS112C_PRESS
Definition: plat_hook.h:48
@ PLATFORM_ADS112C_TEMP_RACK
Definition: plat_hook.h:50
@ PLATFORM_ADS112C_FLOW
Definition: plat_hook.h:47
@ PLATFORM_ADS112C_LEAKAGE
Definition: plat_hook.h:52
bool post_adm1272_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:980
uint8_t reading[1]
Definition: pldm_monitor.h:3
Definition: sensor.h:363
Definition: sensor.h:605
Definition: ads112c.h:88
Definition: plat_hook.h:42
uint8_t plat_sensor_type
Definition: plat_hook.h:43
Definition: ast_tach.h:44
Definition: bmr4922302_803.h:20
Definition: e50sn12051.h:20
Definition: hdc1080.h:24
Definition: ina238.h:23
Definition: common_i2c_mux.h:23
Definition: nct214.h:26
Definition: nct7363.h:87
Definition: sensor.h:255
Definition: xdp710.h:45