[i2c] [PATCH][resend] I2C bus driver for Philips ARM boards

Jean Delvare khali at linux-fr.org
Thu Aug 10 11:03:51 CEST 2006


Hi Vitaly,

> > From what I see above, you didn't address my objection about stop being
> > sent between consecutive messages. You _need_ to find out how to
> > generate a "repeated start" condition on the bus between messages
> > instead. It's probably as easy as setting the start bit (rather than
> > the stop bit), or both the start and the stop bit at the same time.
> 
> this controller doesn't seem to understand 'repeated start' thingie. I
> can make a comment there in the code that it's a HW issue workaround.

A comment is needed but not sufficient. You also need to have the driver
explicitely advertise that it can't process more than one message at a
time. This means that:

1* i2c_pnx_xfer should only process the first message of the list, then
   return (1).

2* i2c_pnx_func shouldn't pretend that I2C_FUNC_SMBUS_EMUL is
   supported, as only a subset of it is actually supported:
   I2C_FUNC_SMBUS_QUICK                  supported
   I2C_FUNC_SMBUS_READ_BYTE              supported
   I2C_FUNC_SMBUS_WRITE_BYTE             supported
   I2C_FUNC_SMBUS_READ_BYTE_DATA         NOT supported
   I2C_FUNC_SMBUS_WRITE_BYTE_DATA        supported
   I2C_FUNC_SMBUS_READ_WORD_DATA         NOT supported
   I2C_FUNC_SMBUS_WRITE_WORD_DATA        supported
   I2C_FUNC_SMBUS_PROC_CALL              NOT supported
   I2C_FUNC_SMBUS_WRITE_BLOCK_DATA       supported
   I2C_FUNC_SMBUS_I2C_READ_BLOCK         NOT supported
   I2C_FUNC_SMBUS_I2C_WRITE_BLOCK        supported

Please double check though... The repeated start is a fundamental part
of the I2C protocol and I'm very surprised that your hardware wouldn't
support it. Especially when this is Philips hardware, and I2C was
specified by Philips in the first place. An I2C controller which cannot
handle combined transactions isn't of much use in the real world. Did
you try setting the start bit (instead of stop bit) between messages as
I suggested?

-- 
Jean Delvare



More information about the i2c mailing list