* 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. */
| 40 | * 'i2c_transfer()' as their entry point. |
| 41 | */ |
| 42 | static 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. |
no test coverage detected