Re: [PATCH] Bugfixes for i2c-cpm.c

Laurent Pinchart
2008-07-02T11:40:23Z

[-- Attachment #1.1: Type: text/plain, Size: 2102 bytes --]

On Tuesday 01 July 2008, Laurent Pinchart wrote:
> On Friday 27 June 2008, Jochen Friedrich wrote:
> > Hi Laurent,
> >
> > >> Bugfixes to the i2c-cpm driver
> > >>
> > >> - enable correct interrupts (I2CER_TXE instead of I2CER_BUSY)
> > >> - replace forgotten iic with i2c
> > >> - fix typo (devided)
> > >> - prefix debug-output on init with 0x and add frequency
> > >>
> > >> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > >
> > > Tested on a MPC8247 board. I have experienced I2C issues since migration
> > > from ppc to powerpc. This patch seems to solve the problem.
> >
> > What kind of problems have this been? In normal operation there shouldn't
> > be any I2CER_TXE interrupts being generated.
>
> I2C devices would frequently (about once every 10 cold boots) be undetected
> by the kernel. I tried to investigate the issue by hooking up a scope to the
> I2C signals, but haven't been able to reproduce the problem once the probes
> were connected.
>
> This might of course be a case of Murphy's law in action, but the problem
> disappeared after applying the patch.

Seems Murphy's law was involved :-( I've run into the same issue just now.

[ 0.555664] i2c /dev entries driver
[ 0.564539] rtc-pcf8563 0-0051: chip found, driver version 0.4.3
[ 0.570038] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[ 1.576209] i2c-adapter i2c-0: I2C transfer: timeout
[ 1.579642] lm75: probe of 0-0048 failed with error -1
[snip]
[ 2.766230] i2c-adapter i2c-0: I2C transfer: timeout
[ 2.769602] rtc-pcf8563 0-0051: pcf8563_get_datetime: read error
[ 2.775345] rtc-pcf8563 0-0051: hctosys: unable to read the hardware clock

The lm75 is there and works after a reboot. In this particular run the pcf8563 was detected, but it would sometimes time out during probe as well.

--
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]