android_kernel_xiaomi_sm7250/Documentation/i2c
Jean Delvare a89ba0bc02 [PATCH] I2C: Rewrite i2c_probe
i2c_probe was quite complex and slow, so I rewrote it in a more
efficient and hopefully clearer way.

Note that this slightly changes the way the module parameters are
handled. This shouldn't change anything for the most common cases
though.

For one thing, the function now respects the order of the parameters
for address probing. It used to always do lower addresses first. The
new approach gives the user more control.

For another, ignore addresses don't overrule probe addresses anymore.
This could have been restored the way it was at the cost of a few more
lines of code, but I don't think it's worth it. Both lists are given
as module parameters, so a user would be quite silly to specify the
same addresses in both lists. The normal addresses list is the only
one that isn't controlled by a module parameter, thus is the only one
the user may reasonably want to remove an address from.

Another significant change is the fact that i2c_probe() will no more
stop when a detection function returns -ENODEV. Just because a driver
found a chip it doesn't support isn't a valid reason to stop all
probings for this one driver. This closes the long standing lm_sensors
ticket #1807.

  http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket=1807

I updated the documentation accordingly.

In terms of algorithmic complexity, the new code is way better. If
I is the ignore address count, P the probe address count, N the
normal address count and F the force address count, the old code
was doing 128 * (F + I + P + N) iterations max, while the new code
does F + P + ((I+1) * N) iterations max. For the most common case
where F, I and P are empty, this is down from 128 * N to N.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05 09:14:25 -07:00
..
busses [PATCH] I2C: Sensors mailing list has moved 2005-06-21 21:52:01 -07:00
chips [PATCH] I2C: max6875 documentation cleanup 2005-09-05 09:14:05 -07:00
dev-interface [PATCH] I2C: Clarify the usage of i2c-dev.h 2005-07-11 14:10:37 -07:00
functionality [PATCH] I2C: fix typo in documentation 2005-09-05 09:14:16 -07:00
i2c-protocol Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
i2c-stub Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
porting-clients [PATCH] hwmon: hwmon vs i2c, second round (07/11) 2005-09-05 09:14:22 -07:00
smbus-protocol Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
summary Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ten-bit-addresses Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
writing-clients [PATCH] I2C: Rewrite i2c_probe 2005-09-05 09:14:25 -07:00