Hi Prakash,

On Thu, 2 Oct 2008 09:52:42 -0400, Mortha, Prakash wrote:
> In the patch I sent to you, I used the approach where I need to send
> MSByte first and then LSByte for I2C_SMBUS_PROC_CALL case.
> 
> If we need to keep this in accordance with other cases, We need to
> interchange the below lines: ( in i2c-viapro.patch)
>               outb_p((data->word & 0xff00) >> 8, SMBHSTDAT0);
>               outb_p(data->word & 0xff, SMBHSTDAT1);

The SMBus specification says that LSB always goes first when sending or
receiving a 16-byte word. i2c-core and individual i2c bus drivers must
follow this specification, even though most I2C slave devices actually
transmit the MSB first. It is the responsibility of the I2C chip driver
(or user-space in the case of i2c-dev) to swap the bytes if needed. See
for example the lm75 driver.

-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

Reply via email to