coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i2c.c File Reference
#include <device/i2c_simple.h>
#include <stdint.h>
Include dependency graph for i2c.c:

Go to the source code of this file.

Functions

int i2c_read_field (unsigned int bus, uint8_t chip, uint8_t reg, uint8_t *data, uint8_t mask, uint8_t shift)
 
int i2c_write_field (unsigned int bus, uint8_t chip, uint8_t reg, uint8_t data, uint8_t mask, uint8_t shift)
 

Function Documentation

◆ i2c_read_field()

int i2c_read_field ( unsigned int  bus,
uint8_t  chip,
uint8_t  reg,
uint8_t data,
uint8_t  mask,
uint8_t  shift 
)

Definition at line 6 of file i2c.c.

References buf, chip, i2c_readb(), and mask.

Referenced by da9212_probe(), get_mt6311_chip_id(), get_mt6691_chip_id(), mt6311_hw_init(), and mt6691_get_voltage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ i2c_write_field()

int i2c_write_field ( unsigned int  bus,
uint8_t  chip,
uint8_t  reg,
uint8_t  data,
uint8_t  mask,
uint8_t  shift 
)