1I2C_SMBUS_READ_I2C_B(9) I2C and SMBus Subsystem I2C_SMBUS_READ_I2C_B(9)
2
3
4
6 i2c_smbus_read_i2c_block_data_or_emulated - read block or emulate
7
9 s32
10 i2c_smbus_read_i2c_block_data_or_emulated(const struct i2c_client * client,
11 u8 command, u8 length,
12 u8 * values);
13
15 client
16 Handle to slave device
17
18 command
19 Byte interpreted by slave
20
21 length
22 Size of data block; SMBus allows at most I2C_SMBUS_BLOCK_MAX bytes
23
24 values
25 Byte array into which data will be read; big enough to hold the
26 data returned by the slave. SMBus allows at most
27 I2C_SMBUS_BLOCK_MAX bytes.
28
30 This executes the SMBus “block read” protocol if supported by the
31 adapter. If block read is not supported, it emulates it using either
32 word or byte read protocols depending on availability.
33
34 The addresses of the I2C slave device that are accessed with this
35 function must be mapped to a linear region, so that a block read will
36 have the same effect as a byte read. Before using this function you
37 must double-check if the I2C slave does support exchanging a block
38 transfer with a byte transfer.
39
41Kernel Hackers Manual 3.10 June 2019 I2C_SMBUS_READ_I2C_B(9)