[lm-sensors] [PATCH] hwmon: (pmbus) Fix two issues
guenter.roeck at ericsson.com
Tue Nov 15 05:14:34 CET 2011
On Mon, Nov 14, 2011 at 09:58:03PM -0500, Tang Yuantian-B29983 wrote:
> > -----Original Message-----
> > From: Guenter Roeck [mailto:guenter.roeck at ericsson.com]
> > Hmm ... looking into the code, I2C_FUNC_SMBUS_READ_BLOCK_DATA is missing
> > from I2C_FUNC_SMBUS_EMUL.
> > Now that is interesting.
> > If you change mpc_functionality() to
> > return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
> > I2C_FUNC_SMBUS_READ_BLOCK_DATA; I bet your problem will disappear.
> > Jean, any idea why I2C_FUNC_SMBUS_EMUL doesn't include
> > I2C_FUNC_SMBUS_READ_BLOCK_DATA ?
> [Yuantian:] unfortunately no, Even I add I2C_FUNC_SMBUS_READ_BLOCK_DATA support,
> The return value is not correct.
Actually, you are right. The i2c-mpc driver would also have to handle the I2C_M_RECV_LEN
flag, where the 1st received byte indicates the receive length. That would probably require
a change in mpc_read(), telling it that the first byte to be received is the length.
Something like the attached. Completely untested, of course ...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2564 bytes
Desc: not available
More information about the lm-sensors