Lines Matching full:file
35 Next thing, open the device file, as follows::
37 int file;
42 file = open(filename, O_RDWR);
43 if (file < 0) {
53 if (ioctl(file, I2C_SLAVE, addr) < 0) {
67 res = i2c_smbus_read_word_data(file, reg);
76 * i2c_smbus_write_word_data(file, reg, 0x6543)
81 if (write(file, buf, 3) != 3) {
85 /* Using I2C Read, equivalent of i2c_smbus_read_byte(file) */
86 if (read(file, buf, 1) != 1) {
107 ``ioctl(file, I2C_SLAVE, long addr)``
112 ``ioctl(file, I2C_TENBIT, long select)``
117 ``ioctl(file, I2C_PEC, long select)``
124 ``ioctl(file, I2C_FUNCS, unsigned long *funcs)``
127 ``ioctl(file, I2C_RDWR, struct i2c_rdwr_ioctl_data *msgset)``
143 ``ioctl(file, I2C_SMBUS, struct i2c_smbus_ioctl_data *args)``
151 You can do SMBus level transactions (see documentation file smbus-protocol.rst
154 __s32 i2c_smbus_write_quick(int file, __u8 value);
155 __s32 i2c_smbus_read_byte(int file);
156 __s32 i2c_smbus_write_byte(int file, __u8 value);
157 __s32 i2c_smbus_read_byte_data(int file, __u8 command);
158 __s32 i2c_smbus_write_byte_data(int file, __u8 command, __u8 value);
159 __s32 i2c_smbus_read_word_data(int file, __u8 command);
160 __s32 i2c_smbus_write_word_data(int file, __u8 command, __u16 value);
161 __s32 i2c_smbus_process_call(int file, __u8 command, __u16 value);
162 __s32 i2c_smbus_block_process_call(int file, __u8 command, __u8 length,
164 __s32 i2c_smbus_read_block_data(int file, __u8 command, __u8 *values);
165 __s32 i2c_smbus_write_block_data(int file, __u8 command, __u8 length,