OpenBIC
OpenSource Bridge-IC
m88rt51632.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/crc.h>
#include <logging/log.h>
#include "libutil.h"
#include "sensor.h"
#include "m88rt51632.h"
#include "hal_i2c.h"
#include "util_spi.h"
Include dependency graph for m88rt51632.c:

Functions

 LOG_MODULE_REGISTER (dev_m88rt51632)
 
 K_MUTEX_DEFINE (m88rt51632_mutex)
 
bool m88rt51632_get_vendor_id (I2C_MSG *msg)
 
bool montage_retimer_read (I2C_MSG *msg, uint32_t addr, uint32_t *data)
 
bool montage_retimer_write (I2C_MSG *msg, uint32_t addr, uint32_t data)
 
bool m88rt51632_get_fw_version (I2C_MSG *msg, uint32_t *version)
 
uint8_t m88rt51632_do_update (I2C_MSG *msg, uint32_t start_offset, uint8_t *txbuf, uint16_t msg_len)
 
uint8_t m88rt51632_fw_update (I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag)
 
uint8_t m88rt51632_get_temperature (I2C_MSG *msg, float *temperature0, float *temperature1)
 
uint8_t m88rt51632_read (sensor_cfg *cfg, int *reading)
 
uint8_t m88rt51632_init (sensor_cfg *cfg)
 

Function Documentation

◆ K_MUTEX_DEFINE()

K_MUTEX_DEFINE ( m88rt51632_mutex  )

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( dev_m88rt51632  )

◆ m88rt51632_do_update()

uint8_t m88rt51632_do_update ( I2C_MSG msg,
uint32_t  start_offset,
uint8_t *  txbuf,
uint16_t  msg_len 
)
Here is the call graph for this function:

◆ m88rt51632_fw_update()

uint8_t m88rt51632_fw_update ( I2C_MSG msg,
uint32_t  offset,
uint16_t  msg_len,
uint8_t *  msg_buf,
uint8_t  flag 
)

◆ m88rt51632_get_fw_version()

bool m88rt51632_get_fw_version ( I2C_MSG msg,
uint32_t *  version 
)
Here is the call graph for this function:

◆ m88rt51632_get_temperature()

uint8_t m88rt51632_get_temperature ( I2C_MSG msg,
float *  temperature0,
float *  temperature1 
)
Here is the call graph for this function:

◆ m88rt51632_get_vendor_id()

bool m88rt51632_get_vendor_id ( I2C_MSG msg)
Here is the call graph for this function:

◆ m88rt51632_init()

uint8_t m88rt51632_init ( sensor_cfg cfg)
Here is the call graph for this function:

◆ m88rt51632_read()

uint8_t m88rt51632_read ( sensor_cfg cfg,
int *  reading 
)

◆ montage_retimer_read()

bool montage_retimer_read ( I2C_MSG msg,
uint32_t  addr,
uint32_t *  data 
)

montage_retimer_read() - read retimer @addr: address to read @data: return data from retimer.

Return: true on success, or false.

◆ montage_retimer_write()

bool montage_retimer_write ( I2C_MSG msg,
uint32_t  addr,
uint32_t  data 
)

montage_retimer_write() - write retimer @addr: address to write @data: data to write

Return: true on success, or false.