summaryrefslogtreecommitdiff
path: root/include/uapi/linux/i2c-dev.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2021-11-15 05:49:22 +0300
committerDavid S. Miller <davem@davemloft.net>2021-11-15 17:11:24 +0300
commit84a107e68b34217eff536e81a6a6f419ee0d0f7e (patch)
tree3beaf1ebf78e6a4330445b81b4dba7b78dc8b453 /include/uapi/linux/i2c-dev.h
parent13cae4a104d2b7205696229ba85d34cc035f8c84 (diff)
downloadlinux-84a107e68b34217eff536e81a6a6f419ee0d0f7e.tar.xz
i2c: dev: Handle 255 byte blocks for i2c ioctl
I2C_SMBUS is limited to 32 bytes due to compatibility with the 32 byte i2c_smbus_data.block I2C_RDWR allows larger transfers if sufficient sized buffers are passed. Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/i2c-dev.h')
-rw-r--r--include/uapi/linux/i2c-dev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/i2c-dev.h b/include/uapi/linux/i2c-dev.h
index 1c4cec4ddd84..46ce31d42f7d 100644
--- a/include/uapi/linux/i2c-dev.h
+++ b/include/uapi/linux/i2c-dev.h
@@ -39,12 +39,14 @@
/* This is the structure as used in the I2C_SMBUS ioctl call */
+#ifndef __KERNEL__
struct i2c_smbus_ioctl_data {
__u8 read_write;
__u8 command;
__u32 size;
union i2c_smbus_data __user *data;
};
+#endif
/* This is the structure as used in the I2C_RDWR ioctl call */
struct i2c_rdwr_ioctl_data {