Re: [PATCH] i2c: mxs: Rework the PIO mode operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear to-fleischer@xxxxxxxxxxx,

> Hi,
> 
> > > Analyze and rework the PIO mode operation. The PIO mode operation
> > > was unreliable on MX28, by analyzing the bus with LA, the checks for
> > > when data were available or were to be sent were wrong.
> > > 
> > > The PIO WRITE has to be completely reworked as it multiple problems.
> > > The MX23 datasheet helped here, see comments in the code for
> > > details.
> > > The problems boil down to:
> > > - RUN bit in CTRL0 must be set after DATA register was written - The
> > > PIO transfer must be 4 bytes long tops, otherwise use
> > > clock stretching.
> > > Both of these fixes are implemented.
> > > 
> > > The PIO READ operation can only be done for up to four bytes as we
> > > are unable to read out the data from the DATA register fast enough.
> > > 
> > > This patch also tries to document the investigation within the code.
> > > 
> > > Signed-off-by: Marek Vasut <marex@xxxxxxx>
> > > Cc: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxxxxxxxxx>
> > > Cc: Fabio Estevam <r49496@xxxxxxxxxxxxx>
> > > Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
> > > Cc: Shawn Guo <shawn.guo@xxxxxxxxxx>
> > > Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx>
> > > Cc: <to-fleischer@xxxxxxxxxxx>
> > 
> > I so far got confirmation from ALexandre this patch works. Can someone
> > else test it please? I'd like to roll out a final version to close
> > this issue.
> 
> sorry, I couldn't  test the patch until today on my iMX283 board.
> It works when reading the registers from the temperature sensor TCN75A.
> But it fails when writing less than 7 bytes to the EEPROM (24LC32). Then
> I always get a 'Connection timed out' error in the user space.

Thinking about this, did you correctly configure the EEPROM write sector size? I 
think it's 32 bytes for this device.

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux