From: Thore Olthoff <thore.olthoff@iwr.uni-heidelberg.de>
To: <gregory.clement@bootlin.com>, <wsa+renesas@sang-engineering.com>,
<linux-i2c@vger.kernel.org>
Subject: [PATCH] i2c-mv46xxx driver
Date: Fri, 15 Mar 2024 09:08:35 +0100 [thread overview]
Message-ID: <c2aa287c-f576-4e9d-968a-7e412424a5d9@iwr.uni-heidelberg.de> (raw)
Fixing an inconvinience where a broken or loose connection could be only
found with additional equipment
occured when working with i2c and not figuring out why a connection
sometimes failed even thought the cables measured alright
enables developers to see the linestate on failure within dmesg no
further equipment needed
Sorry if anything is improperly done. This is the first time I do this.
--- linux/drivers/i2c/busses/i2c-mv64xxx.c.orig 2024-03-15
08:33:07.606227057 +0100
+++ linux/drivers/i2c/busses/i2c-mv64xxx.c 2024-03-15
08:34:54.191439990 +0100
@@ -582,8 +582,9 @@ mv64xxx_i2c_wait_for_completion(struct m
drv_data->state = MV64XXX_I2C_STATE_IDLE;
dev_err(&drv_data->adapter.dev,
"mv64xxx: I2C bus locked, block: %d, "
- "time_left: %d\n", drv_data->block,
- (int)time_left);
+ "time_left: %d, LCR: %X\n", drv_data->block,
+ (int)time_left, (int)readl(drv_data->reg_base + 0x20));
+ /*LCR just a -> sda+scl low | 1a sda low | 2a scl low*/
mv64xxx_i2c_hw_init(drv_data);
i2c_recover_bus(&drv_data->adapter);
}
Signed-off-by: Thore Olthoff <thore.olthoff@iwr.uni-heidelberg.de>
reply other threads:[~2024-03-15 8:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=c2aa287c-f576-4e9d-968a-7e412424a5d9@iwr.uni-heidelberg.de \
--to=thore.olthoff@iwr.uni-heidelberg.de \
--cc=gregory.clement@bootlin.com \
--cc=linux-i2c@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).