Skip to contentSkip to conversation

i2c_probe() vs i2c_detect()

DISCUSSION Greg KH 3 participants 3 messages Apr 3, 2003 – May 19, 2005

lore
Share & tools
lore

Greg KH

author
#0 lore raw

Hi all,

Can anyone tell me why both i2c_probe() and i2c_detect() are in the kernel at the same time? They both almost do the same thing, with the exception being i2c_detect() can handle i2c devices on the isa bus.

It kind of looks like the older i2c code and drivers used the i2c_probe() call, while the lm_sensors code used i2c_detect().

If there are no objections, I'll merge the two of them, cutting about 2k out of the kernel :)

thanks,

greg k-h

#1 lore raw
Quoted 11 lines · Greg KH

Hi all,

Can anyone tell me why both i2c_probe() and i2c_detect() are in the kernel at the same time? They both almost do the same thing, with the exception being i2c_detect() can handle i2c devices on the isa bus.

It kind of looks like the older i2c code and drivers used the i2c_probe() call, while the lm_sensors code used i2c_detect().

If there are no objections, I'll merge the two of them, cutting about 2k out of the kernel :)

Once ou're at it you could also try to get rid of the check_region abuse in there :)

#2 lore raw
In reply to Greg KH

I guess you've identified the difference.
There's a fair amount of discussion in doc/writing-clients in the i2c tree, but that document doesn't really specify the difference either. mds

Quoted 16 lines · Greg KH

Hi all,

Can anyone tell me why both i2c_probe() and i2c_detect() are in the kernel at the same time? They both almost do the same thing, with the exception being i2c_detect() can handle i2c devices on the isa bus.

It kind of looks like the older i2c code and drivers used the i2c_probe() call, while the lm_sensors code used i2c_detect().

If there are no objections, I'll merge the two of them, cutting about 2k out of the kernel :)

thanks,

greg k-h