[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211101090405.1405987-5-matt@codeconstruct.com.au>
Date: Mon, 1 Nov 2021 17:04:03 +0800
From: Matt Johnston <matt@...econstruct.com.au>
To: unlisted-recipients:; (no To-header on input)
Cc: Zev Weiss <zev@...ilderbeest.net>, Wolfram Sang <wsa@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Brendan Higgins <brendanhiggins@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Joel Stanley <joel@....id.au>,
Andrew Jeffery <andrew@...id.au>,
Avi Fishman <avifishman70@...il.com>,
Tomer Maimon <tmaimon77@...il.com>,
Tali Perry <tali.perry1@...il.com>,
Patrick Venture <venture@...gle.com>,
Nancy Yuen <yuenn@...gle.com>,
Benjamin Fair <benjaminfair@...gle.com>,
Jeremy Kerr <jk@...econstruct.com.au>,
linux-i2c@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH net-next 4/6] i2c: npcm7xx: Allow 255 byte block SMBus transfers
255 byte support has been tested on a npcm750 board
Signed-off-by: Matt Johnston <matt@...econstruct.com.au>
---
drivers/i2c/busses/i2c-npcm7xx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
}
--
2.32.0
Powered by blists - more mailing lists