OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <logging/log.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "isl69259.h"
#include "libutil.h"
Classes | |
struct | raa_config |
struct | raa_data |
Macros | |
#define | VR_IMG_HDR_SYMBOL 0x49 |
#define | VR_IMG_BODY_SYMBOL 0x00 |
#define | VR_WARN_REMAIN_WR 3 |
#define | VR_RAA_REG_REMAIN_WR 0x35 |
#define | VR_RAA_REG_DMA_ADDR 0xC7 |
#define | VR_RAA_REG_DMA_DATA 0xC5 |
#define | VR_RAA_REG_HEX_MODE_CFG0 0x87 |
#define | VR_RAA_REG_HEX_MODE_CFG1 0xBD |
#define | VR_RAA_REG_CRC 0x94 |
#define | VR_RAA_REG_PROG_STATUS 0x7E |
#define | VR_RAA_GEN3_SW_REV_MIN 0x06 |
#define | VR_RAA_GEN3_HW_REV_MIN 0x00 |
#define | VR_RAA_REG_GEN2_CRC 0x3F |
#define | VR_RAA_GEN2_SW_REV_MIN 0x02 |
#define | VR_RAA_GEN2_HW_REV_MIN 0x03 |
#define | VR_RAA_REG_GEN2_REMAIN_WR 0xC2 |
#define | VR_RAA_REG_GEN2_PROG_STATUS 0x07 |
#define | ISL69259_READ_VOUT_RESOLUTION 0.001 |
#define | ISL69260_VOUT_MAX_REG 0x24 |
#define | ISL69260_VOUT_MIN_REG 0x2B |
Typedefs | |
typedef struct raa_config | raa_config_t |
Enumerations | |
enum | { RAA_GEN2 , RAA_GEN3_LEGACY , RAA_GEN3_PRODUCTION } |
Functions | |
LOG_MODULE_REGISTER (isl69259) | |
bool | isl69260_i2c_read (uint8_t bus, uint8_t addr, uint8_t reg, uint8_t *data, uint8_t len) |
bool | isl69260_i2c_write (uint8_t bus, uint8_t addr, uint8_t reg, uint8_t *data, uint8_t len) |
bool | isl69260_set_page (uint8_t bus, uint8_t addr, uint8_t page) |
bool | isl69260_get_vout_max (sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt) |
bool | isl69260_get_vout_min (sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt) |
bool | isl69260_set_vout_max (sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt) |
bool | isl69260_set_vout_min (sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt) |
bool | get_raa_remaining_wr (uint8_t bus, uint8_t addr, uint8_t mode, uint16_t *remain) |
bool | isl69259_get_raa_crc (uint8_t bus, uint8_t addr, uint8_t mode, uint32_t *crc) |
bool | isl69259_get_raa_hex_mode (uint8_t bus, uint8_t addr, uint8_t *mode) |
bool | isl69259_fwupdate (uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size) |
bool | isl69260_get_vout_command (sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt) |
bool | isl69260_set_vout_command (sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt) |
bool | isl69260_get_vr_status (sensor_cfg *cfg, uint8_t rail, uint8_t vr_status_rail, uint16_t *vr_status) |
bool | isl69260_clear_vr_status (sensor_cfg *cfg, uint8_t rail) |
bool | adjust_of_twos_complement (uint8_t offset, int *val) |
uint8_t | isl69259_read (sensor_cfg *cfg, int *reading) |
uint8_t | isl69259_init (sensor_cfg *cfg) |
Variables | |
uint8_t | addr |
uint8_t | cmd |
uint8_t | data [] |
#define ISL69259_READ_VOUT_RESOLUTION 0.001 |
#define ISL69260_VOUT_MAX_REG 0x24 |
#define ISL69260_VOUT_MIN_REG 0x2B |
#define VR_IMG_BODY_SYMBOL 0x00 |
#define VR_IMG_HDR_SYMBOL 0x49 |
#define VR_RAA_GEN2_HW_REV_MIN 0x03 |
#define VR_RAA_GEN2_SW_REV_MIN 0x02 |
#define VR_RAA_GEN3_HW_REV_MIN 0x00 |
#define VR_RAA_GEN3_SW_REV_MIN 0x06 |
#define VR_RAA_REG_CRC 0x94 |
#define VR_RAA_REG_DMA_ADDR 0xC7 |
#define VR_RAA_REG_DMA_DATA 0xC5 |
#define VR_RAA_REG_GEN2_CRC 0x3F |
#define VR_RAA_REG_GEN2_PROG_STATUS 0x07 |
#define VR_RAA_REG_GEN2_REMAIN_WR 0xC2 |
#define VR_RAA_REG_HEX_MODE_CFG0 0x87 |
#define VR_RAA_REG_HEX_MODE_CFG1 0xBD |
#define VR_RAA_REG_PROG_STATUS 0x7E |
#define VR_RAA_REG_REMAIN_WR 0x35 |
#define VR_WARN_REMAIN_WR 3 |
typedef struct raa_config raa_config_t |
bool adjust_of_twos_complement | ( | uint8_t | offset, |
int * | val | ||
) |
bool get_raa_remaining_wr | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t | mode, | ||
uint16_t * | remain | ||
) |
bool isl69259_fwupdate | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t * | img_buff, | ||
uint32_t | img_size | ||
) |
bool isl69259_get_raa_crc | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t | mode, | ||
uint32_t * | crc | ||
) |
bool isl69259_get_raa_hex_mode | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t * | mode | ||
) |
uint8_t isl69259_init | ( | sensor_cfg * | cfg | ) |
uint8_t isl69259_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
bool isl69260_clear_vr_status | ( | sensor_cfg * | cfg, |
uint8_t | rail | ||
) |
bool isl69260_get_vout_command | ( | sensor_cfg * | cfg, |
uint8_t | rail, | ||
uint16_t * | millivolt | ||
) |
bool isl69260_get_vout_max | ( | sensor_cfg * | cfg, |
uint8_t | rail, | ||
uint16_t * | millivolt | ||
) |
bool isl69260_get_vout_min | ( | sensor_cfg * | cfg, |
uint8_t | rail, | ||
uint16_t * | millivolt | ||
) |
bool isl69260_get_vr_status | ( | sensor_cfg * | cfg, |
uint8_t | rail, | ||
uint8_t | vr_status_rail, | ||
uint16_t * | vr_status | ||
) |
bool isl69260_i2c_read | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t | reg, | ||
uint8_t * | data, | ||
uint8_t | len | ||
) |
bool isl69260_i2c_write | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t | reg, | ||
uint8_t * | data, | ||
uint8_t | len | ||
) |
bool isl69260_set_page | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t | page | ||
) |
bool isl69260_set_vout_command | ( | sensor_cfg * | cfg, |
uint8_t | rail, | ||
uint16_t * | millivolt | ||
) |
bool isl69260_set_vout_max | ( | sensor_cfg * | cfg, |
uint8_t | rail, | ||
uint16_t * | millivolt | ||
) |
bool isl69260_set_vout_min | ( | sensor_cfg * | cfg, |
uint8_t | rail, | ||
uint16_t * | millivolt | ||
) |
LOG_MODULE_REGISTER | ( | isl69259 | ) |
uint8_t addr |
uint8_t cmd |
struct pldm_oem_read_file_data_info data |