History

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.

Wolfram Sang committed 5 years ago

Commit 21500aa1 parent 1713d661 file · +5 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/i2c.h+5−0
@@ -129,6 +129,11 @@ struct i2c_msg { · 128 unmodified lines
129129 I2C_FUNC_SMBUS_I2C_BLOCK | \
130130 I2C_FUNC_SMBUS_PEC)
131131
132+/* if I2C_M_RECV_LEN is also supported */
133+#define I2C_FUNC_SMBUS_EMUL_ALL (I2C_FUNC_SMBUS_EMUL | \
134+ I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
135+ I2C_FUNC_SMBUS_BLOCK_PROC_CALL)
136+
132137 /*
133138 * Data for SMBus Messages
134139 */