October 2017
Intermediate to advanced
586 pages
14h 8m
English
SMBus is a two-wire bus developed by Intel and is very similar to I2C. I2C devices are SMBus-compatible but not the reverse. Therefore, it is better to use SMBus functions if you have any doubt about the chip you are writing the driver for.
The following shows some of the SMBus API:
s32 i2c_smbus_read_byte_data(struct i2c_client *client, u8 command); s32 i2c_smbus_write_byte_data(struct i2c_client *client, u8 command, u8 value); s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command); s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value); s32 i2c_smbus_read_block_data(struct i2c_client *client, u8 command, u8 *values); s32 i2c_smbus_write_block_data(struct ...