MCPcopy Create free account
hub / github.com/coreboot/coreboot / i2c_transfer

Function i2c_transfer

src/include/device/i2c_simple.h:42–50  ·  view source on GitHub ↗

* software_i2c is supposed to be a debug feature. It's usually not compiled in, * but when it is it can be dynamically enabled at runtime for certain buses. * Need this ugly stub to arbitrate since I2C device drivers hardcode * 'i2c_transfer()' as their entry point. */

Source from the content-addressed store, hash-verified

40 * 'i2c_transfer()' as their entry point.
41 */
42static inline int i2c_transfer(unsigned int bus, struct i2c_msg *segments,
43 int count)
44{
45 if (CONFIG(SOFTWARE_I2C))
46 if (bus < SOFTWARE_I2C_MAX_BUS && software_i2c[bus])
47 return software_i2c_transfer(bus, segments, count);
48
49 return platform_i2c_transfer(bus, segments, count);
50}
51
52/*
53 * Read a raw chunk of data in one segment and one frame.

Callers 15

eeprom_random_readFunction · 0.85
ledc_transferFunction · 0.85
iic_tpm_readFunction · 0.85
rcd_readdFunction · 0.85
rcd_writedFunction · 0.85
rcd_writebFunction · 0.85
bdk_twsix_read_iaFunction · 0.85
i2c_read_rawFunction · 0.85
i2c_write_rawFunction · 0.85
i2c_read_bytesFunction · 0.85
i2c_readbFunction · 0.85

Calls 2

software_i2c_transferFunction · 0.85
platform_i2c_transferFunction · 0.50

Tested by

no test coverage detected