OpenBIC
OpenSource Bridge-IC
plat_hook.c File Reference
#include <stdio.h>
#include <string.h>
#include "libutil.h"
#include "ast_adc.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "plat_sensor_table.h"
#include "plat_hook.h"
#include <logging/log.h>
Include dependency graph for plat_hook.c:

Functions

 LOG_MODULE_REGISTER (plat_hook)
 
bool pre_ina233_read (sensor_cfg *cfg, void *args)
 
bool pre_isl69254iraz_t_read (sensor_cfg *cfg, void *args)
 

Variables

adc_asd_init_arg adc_asd_init_args []
 
ina230_init_arg ina231_init_args []
 
isl28022_init_arg isl28022_init_args []
 

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_hook  )

◆ pre_ina233_read()

bool pre_ina233_read ( sensor_cfg cfg,
void *  args 
)
Here is the call graph for this function:

◆ pre_isl69254iraz_t_read()

bool pre_isl69254iraz_t_read ( sensor_cfg cfg,
void *  args 
)
Here is the call graph for this function:

Variable Documentation

◆ adc_asd_init_args

adc_asd_init_arg adc_asd_init_args[]
Initial value:
= {
[0] = { .is_init = false,
.deglitch[1] = { .deglitch_en = true, .upper_bound = 0x2FD },
.deglitch[2] = { .deglitch_en = true, .upper_bound = 0x2FD },
.deglitch[3] = { .deglitch_en = true, .upper_bound = 0x24A },
.deglitch[4] = { .deglitch_en = true, .upper_bound = 0x24A },
.deglitch[5] = { .deglitch_en = true, .upper_bound = 0x24A },
.deglitch[6] = { .deglitch_en = true, .upper_bound = 0x24A },
.deglitch[7] = { .deglitch_en = true, .upper_bound = 0x24A },
},
[1] = {
.is_init = false,
.deglitch[0] = { .deglitch_en = true, .upper_bound = 0x2FD },
.deglitch[1] = { .deglitch_en = true, .upper_bound = 0x2FD },
.deglitch[2] = { .deglitch_en = true, .upper_bound = 0x2FD },
.deglitch[3] = { .deglitch_en = true, .upper_bound = 0x2FD },
.deglitch[7] = { .deglitch_en = true, .upper_bound = 0x205 },
}
}

◆ ina231_init_args

ina230_init_arg ina231_init_args[]

◆ isl28022_init_args

isl28022_init_arg isl28022_init_args[]
Initial value:
= {
[0] = { .config.fields.MODE = 0b111,
.config.fields.SADC = 0b1111,
.config.fields.BADC = 0b1111,
.config.fields.PG = 0b11,
.config.fields.BRNG = 0b00,
.r_shunt = 10,
.is_init = false },
[1] = { .config.fields.MODE = 0b111,
.config.fields.SADC = 0b1111,
.config.fields.BADC = 0b1111,
.config.fields.PG = 0b11,
.config.fields.BRNG = 0b00,
.r_shunt = 10,
.is_init = false },
[2] = { .config.fields.MODE = 0b111,
.config.fields.SADC = 0b1111,
.config.fields.BADC = 0b1111,
.config.fields.PG = 0b11,
.config.fields.BRNG = 0b00,
.r_shunt = 10,
.is_init = false },
[3] = { .config.fields.MODE = 0b111,
.config.fields.SADC = 0b1111,
.config.fields.BADC = 0b1111,
.config.fields.PG = 0b11,
.config.fields.BRNG = 0b00,
.r_shunt = 10,
.is_init = false },
}