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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -129,6 +129,11 @@ struct i2c_msg { · 128 unmodified lines | ||
| 129 | 129 | I2C_FUNC_SMBUS_I2C_BLOCK | \ |
| 130 | 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 | 138 | * Data for SMBus Messages |
| 134 | 139 | */ |