Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_I2C_DEV_H |
| 8 | #define _UAPI_LINUX_I2C_DEV_H |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/compiler.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define I2C_RETRIES 0x0701 |
| 12 | #define I2C_TIMEOUT 0x0702 |
| 13 | #define I2C_SLAVE 0x0703 |
| 14 | #define I2C_SLAVE_FORCE 0x0706 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 15 | #define I2C_TENBIT 0x0704 |
| 16 | #define I2C_FUNCS 0x0705 |
| 17 | #define I2C_RDWR 0x0707 |
| 18 | #define I2C_PEC 0x0708 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 19 | #define I2C_SMBUS 0x0720 |
| 20 | struct i2c_smbus_ioctl_data { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 21 | __u8 read_write; |
| 22 | __u8 command; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | __u32 size; |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 24 | union i2c_smbus_data * data; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | }; |
| 26 | struct i2c_rdwr_ioctl_data { |
Elliott Hughes | 0f0c18f | 2023-03-29 15:53:31 -0700 | [diff] [blame] | 27 | struct i2c_msg * msgs; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 | __u32 nmsgs; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 30 | #define I2C_RDWR_IOCTL_MAX_MSGS 42 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 31 | #define I2C_RDRW_IOCTL_MAX_MSGS I2C_RDWR_IOCTL_MAX_MSGS |
Nick Kralevich | a67e4de | 2013-01-14 11:28:26 -0800 | [diff] [blame] | 32 | #endif |