From: Matt Johnston <matt@codeconstruct.com.au>
To: linux-i2c@vger.kernel.org, matt@codeconstruct.com.au
Cc: linux-aspeed@lists.ozlabs.org, jk@codeconstruct.com.au
Subject: [RFC PATCH 3/3] i2c: aspeed: allow 255 byte block transfers
Date: Wed, 2 Jun 2021 12:41:13 +0800 [thread overview]
Message-ID: <20210602044113.1581347-4-matt@codeconstruct.com.au> (raw)
In-Reply-To: <20210602044113.1581347-1-matt@codeconstruct.com.au>
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
---
drivers/i2c/busses/i2c-aspeed.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 724bf30600d6..04cb5d08daf5 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -533,7 +533,7 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
msg->buf[bus->buf_index++] = recv_byte;
if (msg->flags & I2C_M_RECV_LEN) {
- if (unlikely(recv_byte > I2C_SMBUS_BLOCK_MAX)) {
+ if (unlikely(recv_byte > I2C_SMBUS_V3_BLOCK_MAX)) {
bus->cmd_err = -EPROTO;
aspeed_i2c_do_stop(bus);
goto out_no_complete;
@@ -718,7 +718,8 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
static u32 aspeed_i2c_functionality(struct i2c_adapter *adap)
{
- return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_BLOCK_DATA;
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
+ I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_V3_BLOCK;
}
#if IS_ENABLED(CONFIG_I2C_SLAVE)
--
2.30.2
next prev parent reply other threads:[~2021-06-02 4:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 4:41 [RFC PATCH 0/3] Increase SMBus max block size to 255 Matt Johnston
2021-06-02 4:41 ` [RFC PATCH 1/3] i2c: core: Allow 255 byte transfers for SMBus 3.x Matt Johnston
2021-06-02 4:41 ` [RFC PATCH 2/3] i2c: dev: Handle 255 byte blocks for i2c ioctl Matt Johnston
2021-06-02 4:41 ` Matt Johnston [this message]
2021-06-07 19:50 ` [RFC PATCH 3/3] i2c: aspeed: allow 255 byte block transfers Brendan Higgins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210602044113.1581347-4-matt@codeconstruct.com.au \
--to=matt@codeconstruct.com.au \
--cc=jk@codeconstruct.com.au \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-i2c@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).