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**************************************************************************************************/
70/**************************************************************************************************
71 * POST ARGS
72**************************************************************************************************/
74
75/**************************************************************************************************
76 * PRE-HOOK/POST-HOOK FUNC
77 **************************************************************************************************/
84
85bool post_adm1272_read(sensor_cfg *cfg, void *args, int *reading);
86bool post_ads112c_read(sensor_cfg *cfg, void *args, int *reading);
87bool pre_PCA9546A_read(sensor_cfg *cfg, void *args);
88bool post_PCA9546A_read(sensor_cfg *cfg, void *args, int *reading);
89bool get_fb_present_status(uint16_t *fb_present_status);
90
91#endif
nct7363_init_arg nct7363_init_args[]
Definition: plat_hook.c:245
adm1272_init_arg adm1272_init_args[]
Definition: plat_hook.c:51
struct _ads112c_post_arg ads112c_post_arg
max11617_init_arg max11617_init_args[]
Definition: plat_hook.c:1192
bool pre_PCA9546A_read(sensor_cfg *cfg, void *args)
Definition: plat_hook.c:933
ina238_init_arg ina238_init_args[]
Definition: plat_hook.c:748
bool post_ads112c_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:1027
bool post_PCA9546A_read(sensor_cfg *cfg, void *args, int *reading)
Definition: plat_hook.c:960
mux_config bus_9_PCA9546A_configs[]
Definition: plat_hook.c:896
adc_asd_init_arg adc_asd_init_args[]
Definition: plat_hook.c:744
e50sn12051_init_arg e50sn12051_init_args[]
Definition: plat_hook.c:856
nct214_init_arg nct214_init_args[]
Definition: plat_hook.c:767
mux_config bus_2_PCA9546A_configs[]
Definition: plat_hook.c:873
ast_tach_init_arg ast_tach_init_args[]
Definition: plat_hook.c:851
xdp710_init_arg xdp710_init_args[]
Definition: plat_hook.c:790
hdc1080_init_arg hdc1080_init_args[]
Definition: plat_hook.c:810
bmr4922302_803_init_arg bmr4922302_803_init_args[]
Definition: plat_hook.c:860
bool get_fb_present_status(uint16_t *fb_present_status)
Definition: plat_hook.c:1180
ads112c_post_arg ads112c_post_args[]
Definition: plat_hook.c:735
mux_config bus_1_PCA9546A_configs[]
Definition: plat_hook.c:867
mux_config bus_6_PCA9546A_configs[]
Definition: plat_hook.c:879
mux_config bus_8_PCA9546A_configs[]
Definition: plat_hook.c:891
mux_config bus_7_PCA9546A_configs[]
Definition: plat_hook.c:885
ads112c_init_arg ads112c_init_args[]
Definition: plat_hook.c:638
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:982
uint8_t reading[1]
Definition: pldm_monitor.h:3
Definition: sensor.h:364
Definition: sensor.h:606
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: sensor.h:752
Definition: common_i2c_mux.h:23
Definition: nct214.h:26
Definition: nct7363.h:87
Definition: sensor.h:256
Definition: xdp710.h:45