summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2021-01-09 13:43:09 +0100
committerWolfram Sang <wsa@kernel.org>2021-01-22 09:59:00 +0100
commit21500aa84024b3fc541197b2041d80538539740d (patch)
tree6010e73fb1b30c4bc933a815506f6e9e43d51259 /include
parent1713d66cae8acdf3d34bafe09598fec9d1fb4793 (diff)
downloadlinux-21500aa84024b3fc541197b2041d80538539740d.tar.bz2
i2c: uapi: add macro to describe support for all SMBus transfers
Some I2C bus master drivers which support I2C_M_RECV_LEN do not set the functionality bits of the now supported SMBus transfers. Add a convenience macro to make this very simple. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/i2c.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/i2c.h b/include/uapi/linux/i2c.h
index 7786551eb177..92326ebde350 100644
--- a/include/uapi/linux/i2c.h
+++ b/include/uapi/linux/i2c.h
@@ -129,6 +129,11 @@ struct i2c_msg {
I2C_FUNC_SMBUS_I2C_BLOCK | \
I2C_FUNC_SMBUS_PEC)
+/* if I2C_M_RECV_LEN is also supported */
+#define I2C_FUNC_SMBUS_EMUL_ALL (I2C_FUNC_SMBUS_EMUL | \
+ I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
+ I2C_FUNC_SMBUS_BLOCK_PROC_CALL)
+
/*
* Data for SMBus Messages
*/