aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-08-11 12:20:57 -0400
committerJean Delvare <khali@linux-fr.org>2010-08-11 12:20:57 -0400
commitd44f19d586b6113fb5db10e1a36457f0db3b01aa (patch)
treed1bd292c092874aad3cd97faea3baf7599d6ae02 /drivers/i2c/i2c-core.c
parent9a94241afcc9a481691a9c29b7460217925b59b8 (diff)
V4L/DVB: Use custom I2C probing function mechanism
Now that i2c-core offers the possibility to provide custom probing function for I2C devices, let's make use of it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index cf14ca063181..6e1c2f54d9cf 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1461,6 +1461,13 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
1461 return err; 1461 return err;
1462} 1462}
1463 1463
1464int i2c_probe_func_quick_read(struct i2c_adapter *adap, unsigned short addr)
1465{
1466 return i2c_smbus_xfer(adap, addr, 0, I2C_SMBUS_READ, 0,
1467 I2C_SMBUS_QUICK, NULL) >= 0;
1468}
1469EXPORT_SYMBOL_GPL(i2c_probe_func_quick_read);
1470
1464struct i2c_client * 1471struct i2c_client *
1465i2c_new_probed_device(struct i2c_adapter *adap, 1472i2c_new_probed_device(struct i2c_adapter *adap,
1466 struct i2c_board_info *info, 1473 struct i2c_board_info *info,