i2c: Add support for custom probe function

The probe method used by i2c_new_probed_device() may not be suitable
for all cases. Let the caller provide its own, optional probe
function.

Signed-off-by: Jean Delvare <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Jean Delvare 2010-08-11 18:20:56 +02:00
commit 9a94241afc
11 changed files with 31 additions and 21 deletions

View file

@ -322,10 +322,10 @@ do_attach( struct i2c_adapter *adapter )
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "therm_ds1775", I2C_NAME_SIZE);
i2c_new_probed_device(adapter, &info, scan_ds1775);
i2c_new_probed_device(adapter, &info, scan_ds1775, NULL);
strlcpy(info.type, "therm_adm1030", I2C_NAME_SIZE);
i2c_new_probed_device(adapter, &info, scan_adm1030);
i2c_new_probed_device(adapter, &info, scan_adm1030, NULL);
if( x.thermostat && x.fan ) {
x.running = 1;