* [PATCH 2.4] Fix bus reset in i2c-philips-par
2005-05-19 6:24 [PATCH 2.6] Fix bus reset in i2c-philips-par Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` [PATCH 2.6] " Greg KH
1 sibling, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2004-01-25 10:03 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2.6] Fix bus reset in i2c-philips-par
@ 2005-05-19 6:24 Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` [PATCH 2.6] " Greg KH
0 siblings, 2 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Hi Greg,
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 is type=0. I guess that
this driver will be abandoned in a while, but it probably doesn't hurt
to fix that.
I've committed a similar fix to our i2c CVS repository, and will send a
patch to Marcelo someday, in case he is interested in the fix for 2.4
too.
Thanks.
--- linux-2.6.2-rc1/drivers/i2c/busses/i2c-philips-par.c.orig 2004-01-23 11:28:51.000000000 +0100
+++ linux-2.6.2-rc1/drivers/i2c/busses/i2c-philips-par.c 2004-01-23 15:42:30.000000000 +0100
@@ -184,8 +184,8 @@
return;
}
/* reset hardware to sane state */
- 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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2.6] Fix bus reset in i2c-philips-par
2005-05-19 6:24 [PATCH 2.6] Fix bus reset in i2c-philips-par Jean Delvare
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Greg KH
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Fri, Jan 23, 2004 at 09:30:24PM +0100, Jean Delvare wrote:
> Hi Greg,
>
> 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 is type=0. I guess that
> this driver will be abandoned in a while, but it probably doesn't hurt
> to fix that.
Applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2.4] Fix bus reset in i2c-philips-par
@ 2005-05-19 6:24 ` Jean Delvare
0 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-05-19 6:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-19 6:24 [PATCH 2.6] Fix bus reset in i2c-philips-par Jean Delvare
2004-01-25 10:03 ` [PATCH 2.4] " Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` [PATCH 2.6] " Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.