summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2021-11-15 10:49:24 +0800
committerDavid S. Miller <davem@davemloft.net>2021-11-15 14:11:24 +0000
commit3ef2de27a05a2dc7425431d9aa780e08e56ddb7f (patch)
treec25098cf89b8797daa54bfe1922c6fcfda0a8cd1 /drivers/i2c
parent1b2ba1f591c9d083cc1928f8337fcbf6a749e935 (diff)
i2c: npcm7xx: Allow 255 byte block SMBus transfers
255 byte support has been tested on a npcm750 board Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Reviewed-by: Tali Perry <tali.perry1@gmail.com> Reviewed-by: Patrick Venture <venture@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-npcm7xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index 2ad166355ec9..6d60f65add85 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -1399,7 +1399,7 @@ static void npcm_i2c_irq_master_handler_read(struct npcm_i2c *bus)
if (bus->read_block_use) {
/* first byte in block protocol is the size: */
data = npcm_i2c_rd_byte(bus);
- data = clamp_val(data, 1, I2C_SMBUS_BLOCK_MAX);
+ data = clamp_val(data, 1, I2C_SMBUS_V3_BLOCK_MAX);
bus->rd_size = data + block_extra_bytes_size;
bus->rd_buf[bus->rd_ind++] = data;
@@ -2187,6 +2187,7 @@ static u32 npcm_i2c_functionality(struct i2c_adapter *adap)
I2C_FUNC_SMBUS_EMUL |
I2C_FUNC_SMBUS_BLOCK_DATA |
I2C_FUNC_SMBUS_PEC |
+ I2C_FUNC_SMBUS_V3_BLOCK |
I2C_FUNC_SLAVE;
}