PATCH: lm92: port for 2.6 kernel

Jean Delvare khali at
Tue Mar 1 09:18:49 CET 2005

Hi James,

> This was what was confusing me too. As I understand it now (Jean please
> correct me if I'm wrong) the core code behind the smbus read/write
> word_data() routines presents the u16 value as a little endian value.
> If the chip driver knows the chip implements 16-bit registers as big
> endian then it must swap the bytes, regardless of cpu endian.


> I don't think Jean's statement that "the conversion is done by the
> bus drivers" is true, but maybe I still don't understand... :)

It wasn't true in the case of Mark's driver, you are right. It is in
fact true only for SMBus master drivers. For I2C masters, the i2c-core
emulates the SMBus protocol, so the conversion is done by i2c-core.

What I wanted to focus on was the fact that, in the general case, any CPU
endianness issue would need to be fixed in the bus driver, not the chip

Jean Delvare

More information about the lm-sensors mailing list