From: Jean Delvare <khali@linux-fr.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
LM Sensors <sensors@stimpy.netroedge.com>
Subject: [PATCH 2.4] Fix bus reset in i2c-philips-par
Date: Sun, 25 Jan 2004 11:03:58 +0100 [thread overview]
Message-ID: <20040125110358.770c41a1.khali@linux-fr.org> (raw)
In-Reply-To: <20040123213024.79b69112.khali@linux-fr.org>
Hi Marcelo,
This patch fixes the bus reset in i2c-philips-par when it is loaded with
type!=0. For now, the reset is always made as if type==0. This patch was
built and tested on 2.4.25-pre7.
I've committed a similar fix to our i2c CVS repository, and have sent
a patch to Greg KH for 2.6 too, which he already accepted.
This is a bug fix, however:
* I think that the i2c-philips-par driver isn't much used.
* I think that the i2c-philips-par driver with type!=0 is even less
used.
* The bus reset is more or less optional. Skipping it doesn't hurt much.
* The wrong reset doesn't hurt either.
So this is in no way critical (and explains why the bug wasn't
discovered earlier).
On the other hand the fix is easy and clear. Anyway I leave it to you to
decide if it should be applied to 2.4 or not.
Thanks.
--- linux-2.4.25-pre7/drivers/i2c/i2c-philips-par.c.orig Sun Jan 25 09:57:06 2004
+++ linux-2.4.25-pre7/drivers/i2c/i2c-philips-par.c Sun Jan 25 09:59:36 2004
@@ -212,8 +212,8 @@
/* reset hardware to sane state */
parport_claim_or_block(adapter->pdev);
- bit_lp_setsda(port, 1);
- bit_lp_setscl(port, 1);
+ adapter->bit_lp_data.setsda(port, 1);
+ adapter->bit_lp_data.setscl(port, 1);
parport_release(adapter->pdev);
if (i2c_bit_add_bus(&adapter->adapter) < 0)
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
parent reply other threads:[~2004-01-25 10:03 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20040123213024.79b69112.khali@linux-fr.org>]
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=20040125110358.770c41a1.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=sensors@stimpy.netroedge.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
Powered by JetHome