• Matt Johnston's avatar
    i2c: core: Allow 255 byte transfers for SMBus 3.x · 13cae4a1
    Matt Johnston authored
    SMBus 3.0 increased the maximum block transfer size from 32 bytes to
    255 bytes. We increase the size of struct i2c_smbus_data's block[]
    member.
    
    i2c_smbus_xfer() and i2c_smbus_xfer_emulated() now support 255 byte
    block operations, other block functions remain limited to 32 bytes for
    compatibility with existing callers.
    
    We allow adapters to indicate support for the larger size with
    I2C_FUNC_SMBUS_V3_BLOCK. Most emulated drivers should be able to use 255
    byte blocks by replacing I2C_SMBUS_BLOCK_MAX with I2C_SMBUS_V3_BLOCK_MAX
    though some will have hardware limitations that need testing.
    Signed-off-by: default avatarMatt Johnston <matt@codeconstruct.com.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    13cae4a1
i2c-core-smbus.c 20.3 KB