Hi Sergio, On Thu, 11 Dec 2008 17:55:26 -0600, Aguirre Rodriguez, Sergio Alberto wrote: > Some days back, Vaibhav Hiremath submitted patches to linux-omap and > video4linux trees for an I2C video codec chip, and he was suggested to > use SMBUS API instead of manually constructing i2c messages and sending > using i2c_transfer API. > > So I attempted to do the same for a camera sensor I've been working on. > > But one thing I noticed is that my sensor needs to access 16-bit register > addresses in the device, and I saw in SMBUS spec 2.0 that the equivalent > thing (SMBUS commands) are only 8-bit length. > > So, should this automatically discard using SMBUS api for my case, or am > I missing something else? (like a SMBUS 16-bit expansion or so) You are correct, SMBus messaging implies an 8-bit command field (which is most frequently used for register addressing.) There are no 16-bit command variants. For writes, we can cheat because there is no direction change between the address and the data, but for reads there's simply nothing we can do to work around this limitation. So, unless your device is write-only, you indeed can't use the SMBus-level API for 16-bit register addresses and you have to stick to the I2C-level API. -- Jean Delvare -- 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