From: Atif Ashhar <atifashhar@google.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Wolfram Sang <wsa@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Atif Ashhar <atifashhar@google.com>
Subject: Re: [PATCH] i2c: designware: Release slave SCL hold in __i2c_dw_disable()
Date: Tue, 10 Nov 2026 19:05:59 +0000 [thread overview]
Message-ID: <20261110190559.819337-1-atifashhar@google.com> (raw)
In-Reply-To: <20261109102006.GJ176724@black.igk.intel.com>
Hi Mika,
On Mon, Nov 09, 2026 at 11:20:06AM +0100, Mika Westerberg wrote:
> > + if (tx_hold) {
> > + regmap_read(dev->map, DW_IC_CLR_RD_REQ, &dummy);
> > + regmap_read(dev->map, DW_IC_CLR_TX_ABRT, &dummy);
> > + regmap_write(dev->map, DW_IC_DATA_CMD, 0xFF);
>
> I'm not super familiar with the slave mode so adding Heikki just in case.
> Can this cause some unintended traffic on the bus towards the master?
No, it cannot initiate new traffic. DW_IC_STATUS_SLAVE_HOLD_TX_FIFO_EMPTY
is only asserted when an external master has already addressed this
controller and initiated a read transfer, and the slave hardware is
actively stretching SCL low waiting for TX data. When no slave read
hold is active, i2c_dw_release_slave_hold() returns early without
writing to DW_IC_DATA_CMD.
Writing 0xff simply satisfies the ongoing master-clocked read byte
while keeping SDA passively high (released via pull-ups), allowing the
external master to finish clocking the byte and terminate the transfer
with NACK/STOP instead of hanging the bus indefinitely.
> Also use 0xff instead.
Ack, I will update 0xFF to 0xff (and wait to see if Heikki has any
comments before sending v2).
Thanks,
Atif
prev parent reply other threads:[~2026-11-10 19:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 13:37 Atif Ashhar
2026-11-09 10:20 ` Mika Westerberg
2026-11-10 19:05 ` Atif Ashhar [this message]
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=20261110190559.819337-1-atifashhar@google.com \
--to=atifashhar@google.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=wsa@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
all inboxes | Powered by JetHome®