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
129 I2C_FUNC_SMBUS_I2C_BLOCK | \129 I2C_FUNC_SMBUS_I2C_BLOCK | \
130 I2C_FUNC_SMBUS_PEC)130 I2C_FUNC_SMBUS_PEC)
131 131
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
132/*137/*
133 * Data for SMBus Messages138 * Data for SMBus Messages
134 */139 */