Re: I2C_TIMEOUT

From: Jean Delvare
Date: Thu Jan 13 2005 - 17:22:26 EST


Hi Kumar,

> 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,
--
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/