From: Andreas Oberritter <obi@saftware.de>
To: greg@kroah.com
Cc: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com,
simon@tk.uni-linz.ac.at
Subject: [PATCH] possible bug in i2c-algo-bit's inb function
Date: Sun, 27 Feb 2005 05:49:32 +0100 [thread overview]
Message-ID: <E1D5GN2-0000Bi-KG@localhost.localdomain> (raw)
Hi,
while writing a driver for a cardbus card which is supposed to use the
bit-banging algorithm I noticed that communication with the I2C slave
(Philips TDA10046) would fail without this patch. It forces SDA to high
for every bit in i2c_inb() instead of once per byte. Can this patch go
into the mainline kernel or will this break other drivers? I am using
Kernel version 2.6.10.
Signed-off-by: Andreas Oberritter <obi@saftware.de>
--- linux-2.6/drivers/i2c/algos/i2c-algo-bit.c.orig 2005-02-27 04:39:33.663444536 +0100
+++ linux-2.6/drivers/i2c/algos/i2c-algo-bit.c 2005-02-27 04:39:54.978204200 +0100
@@ -197,8 +197,8 @@ static int i2c_inb(struct i2c_adapter *i
struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
/* assert: scl is low */
- sdahi(adap);
for (i=0;i<8;i++) {
+ sdahi(adap);
if (sclhi(adap)<0) { /* timeout */
DEB2(printk(KERN_DEBUG " i2c_inb: timeout at bit #%d\n", 7-i));
return -ETIMEDOUT;
next reply other threads:[~2005-02-27 4:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-27 4:49 Andreas Oberritter [this message]
2005-02-27 9:35 ` [PATCH] possible bug in i2c-algo-bit's inb function Jean Delvare
2005-02-27 18:13 ` Andreas Oberritter
2005-02-27 18:52 ` Jean Delvare
2005-02-27 21:55 ` Andreas Oberritter
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=E1D5GN2-0000Bi-KG@localhost.localdomain \
--to=obi@saftware.de \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@stimpy.netroedge.com \
--cc=simon@tk.uni-linz.ac.at \
/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