Go to the documentation of this file.
27 #ifndef _UAPI_LINUX_I2C_H
28 #define _UAPI_LINUX_I2C_H
30 #include <linux/types.h>
71 #define I2C_M_TEN 0x0010
72 #define I2C_M_RD 0x0001
73 #define I2C_M_STOP 0x8000
74 #define I2C_M_NOSTART 0x4000
75 #define I2C_M_REV_DIR_ADDR 0x2000
76 #define I2C_M_IGNORE_NAK 0x1000
77 #define I2C_M_NO_RD_ACK 0x0800
78 #define I2C_M_RECV_LEN 0x0400
85 #define I2C_FUNC_I2C 0x00000001
86 #define I2C_FUNC_10BIT_ADDR 0x00000002
87 #define I2C_FUNC_PROTOCOL_MANGLING 0x00000004
88 #define I2C_FUNC_SMBUS_PEC 0x00000008
89 #define I2C_FUNC_NOSTART 0x00000010
90 #define I2C_FUNC_SMBUS_BLOCK_PROC_CALL 0x00008000
91 #define I2C_FUNC_SMBUS_QUICK 0x00010000
92 #define I2C_FUNC_SMBUS_READ_BYTE 0x00020000
93 #define I2C_FUNC_SMBUS_WRITE_BYTE 0x00040000
94 #define I2C_FUNC_SMBUS_READ_BYTE_DATA 0x00080000
95 #define I2C_FUNC_SMBUS_WRITE_BYTE_DATA 0x00100000
96 #define I2C_FUNC_SMBUS_READ_WORD_DATA 0x00200000
97 #define I2C_FUNC_SMBUS_WRITE_WORD_DATA 0x00400000
98 #define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
99 #define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
100 #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
101 #define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000
102 #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000
104 #define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
105 I2C_FUNC_SMBUS_WRITE_BYTE)
106 #define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \
107 I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
108 #define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \
109 I2C_FUNC_SMBUS_WRITE_WORD_DATA)
110 #define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
111 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
112 #define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
113 I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
115 #define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
116 I2C_FUNC_SMBUS_BYTE | \
117 I2C_FUNC_SMBUS_BYTE_DATA | \
118 I2C_FUNC_SMBUS_WORD_DATA | \
119 I2C_FUNC_SMBUS_PROC_CALL | \
120 I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
121 I2C_FUNC_SMBUS_I2C_BLOCK | \
127 #define I2C_SMBUS_BLOCK_MAX 32
136 #define I2C_SMBUS_READ 1
137 #define I2C_SMBUS_WRITE 0
141 #define I2C_SMBUS_QUICK 0
142 #define I2C_SMBUS_BYTE 1
143 #define I2C_SMBUS_BYTE_DATA 2
144 #define I2C_SMBUS_WORD_DATA 3
145 #define I2C_SMBUS_PROC_CALL 4
146 #define I2C_SMBUS_BLOCK_DATA 5
147 #define I2C_SMBUS_I2C_BLOCK_BROKEN 6
148 #define I2C_SMBUS_BLOCK_PROC_CALL 7
149 #define I2C_SMBUS_I2C_BLOCK_DATA 8