summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/i2c.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2021-11-15 10:49:22 +0800
committerDavid S. Miller <davem@davemloft.net>2021-11-15 14:11:24 +0000
commit84a107e68b34217eff536e81a6a6f419ee0d0f7e (patch)
tree3beaf1ebf78e6a4330445b81b4dba7b78dc8b453 /include/uapi/linux/i2c.h
parent13cae4a104d2b7205696229ba85d34cc035f8c84 (diff)
downloadcachepc-linux-84a107e68b34217eff536e81a6a6f419ee0d0f7e.tar.gz
cachepc-linux-84a107e68b34217eff536e81a6a6f419ee0d0f7e.zip
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.h')
-rw-r--r--include/uapi/linux/i2c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/i2c.h b/include/uapi/linux/i2c.h
index 7b7d90b50cf0..c3534ab1ae53 100644
--- a/include/uapi/linux/i2c.h
+++ b/include/uapi/linux/i2c.h
@@ -109,6 +109,8 @@ struct i2c_msg {
#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
#define I2C_FUNC_SMBUS_HOST_NOTIFY 0x10000000 /* SMBus 2.0 or later */
#define I2C_FUNC_SMBUS_V3_BLOCK 0x20000000 /* Device supports 255 byte block */
+ /* Note that I2C_SMBUS ioctl only */
+ /* supports a 32 byte block */
#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
I2C_FUNC_SMBUS_WRITE_BYTE)