23 #ifndef _UAPI_LINUX_I2C_H 24 #define _UAPI_LINUX_I2C_H 58 #define I2C_M_TEN 0x0010 65 #define I2C_M_RD 0x0001 76 #define I2C_M_STOP 0x8000 86 #define I2C_M_NOSTART 0x4000 96 #define I2C_M_REV_DIR_ADDR 0x2000 106 #define I2C_M_IGNORE_NAK 0x1000 117 #define I2C_M_NO_RD_ACK 0x0800 130 #define I2C_M_RECV_LEN 0x0400 178 #define I2C_FUNC_I2C 0x00000001 179 #define I2C_FUNC_10BIT_ADDR 0x00000002 180 #define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 181 #define I2C_FUNC_SMBUS_PEC 0x00000008 182 #define I2C_FUNC_NOSTART 0x00000010 183 #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000 184 #define I2C_FUNC_SMBUS_QUICK 0x00010000 185 #define I2C_FUNC_SMBUS_READ_BYTE 0x00020000 186 #define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000 187 #define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000 188 #define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000 189 #define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000 190 #define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000 191 #define I2C_FUNC_SMBUS_PROC_CALL 0x00800000 192 #define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000 193 #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000 194 #define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 195 #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 197 #define I2C_FUNC_SMBUS_BYTE \ 198 (I2C_FUNC_SMBUS_READ_BYTE | I2C_FUNC_SMBUS_WRITE_BYTE) 200 #define I2C_FUNC_SMBUS_BYTE_DATA \ 201 (I2C_FUNC_SMBUS_READ_BYTE_DATA | I2C_FUNC_SMBUS_WRITE_BYTE_DATA) 203 #define I2C_FUNC_SMBUS_WORD_DATA \ 204 (I2C_FUNC_SMBUS_READ_WORD_DATA | I2C_FUNC_SMBUS_WRITE_WORD_DATA) 206 #define I2C_FUNC_SMBUS_BLOCK_DATA \ 207 (I2C_FUNC_SMBUS_READ_BLOCK_DATA | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA) 209 #define I2C_FUNC_SMBUS_I2C_BLOCK \ 210 (I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK) 212 #define I2C_FUNC_SMBUS_EMUL \ 213 (I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA \ 214 | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_PROC_CALL \ 215 | I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | I2C_FUNC_SMBUS_I2C_BLOCK \ 216 | I2C_FUNC_SMBUS_PEC) 223 #define I2C_SMBUS_BLOCK_MAX 32 240 #define I2C_SMBUS_READ 1 242 #define I2C_SMBUS_WRITE 0 252 #define I2C_SMBUS_QUICK 0 254 #define I2C_SMBUS_BYTE 1 256 #define I2C_SMBUS_BYTE_DATA 2 258 #define I2C_SMBUS_WORD_DATA 3 260 #define I2C_SMBUS_PROC_CALL 4 262 #define I2C_SMBUS_BLOCK_DATA 5 264 #define I2C_SMBUS_I2C_BLOCK_BROKEN 6 266 #define I2C_SMBUS_BLOCK_PROC_CALL 7 268 #define I2C_SMBUS_I2C_BLOCK_DATA 8 uint16_t addr
The slave address.
Definition: i2c.h:144
SMBus data.
Definition: i2c.h:228
I2C transfer message.
Definition: i2c.h:137
uint16_t len
The message data length in bytes.
Definition: i2c.h:164
uint16_t flags
The message flags.
Definition: i2c.h:159
uint8_t * buf
Pointer to the message data.
Definition: i2c.h:169
#define I2C_SMBUS_BLOCK_MAX
Maximum SMBus data block count.
Definition: i2c.h:223