Skip to contentSkip to conversation

I2C_TIMEOUT

DISCUSSION Kumar Gala 2 participants 2 messages Jan 13, 2005 – Jan 14, 2005

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

Greg,

What is the intended purpose of the I2C_TIMEOUT cmd? It clearly sets the adapter timeout, I'm just trying to understand if there is a standard usage for the adapter's timeout.

thanks

- kumar

#1 lore raw

Hi Kumar,

Quoted 3 lines

What is the intended purpose of the I2C_TIMEOUT cmd? It clearly sets the adapter timeout, I'm just trying to understand if there is a standard usage for the adapter's timeout.

An adapter's timeout is supposedly the time the adapter driver will wait for a client to answer before giving up. As far as I can see, most SMBus master drivers do *not* properly use this, ie they use a local variable instead of the i2c_adapter struct member, so you cannot use the command to change their default timeout value. Some other bus drivers (most notably all i2c-algo-bit-based ones, but also i2c-iop3xx and i2c-ibm_iic.c) do properly use the timeout member so the command should work for them.

Note that I never saw the command used. Where it would make the more sense is from user-space through i2c-dev, but even then I believe that everyone is just happy with the default timeouts the bus drivers come with.

Hope that helps,

Signature · 2 lines
Jean Delvare
http://khali.linux-fr.org/