diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-09-14 09:49:16 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-09-14 09:49:16 +0200 |
commit | 7c67eff2bb3420b8cd67577e4dd4af931de00690 (patch) | |
tree | 1ff8557c95e29060a55522980455d795de080df7 /linux/include/media/v4l2-i2c-drv.h | |
parent | d24bf7117c64db6acdfb27f2e1eb6afdab9851f8 (diff) | |
download | mediapointer-dvb-s2-7c67eff2bb3420b8cd67577e4dd4af931de00690.tar.gz mediapointer-dvb-s2-7c67eff2bb3420b8cd67577e4dd4af931de00690.tar.bz2 |
v4l2-i2c-drv: add legacy_probe function pointer
From: Hans Verkuil <hverkuil@xs4all.nl>
Some devices do complicated tests whether the device can be probed or not.
Add a legacy_probe function pointer to support that.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
linux/include/media/v4l2-i2c-drv-legacy.h | 6 ++++++
linux/include/media/v4l2-i2c-drv.h | 6 ++++++
2 files changed, 12 insertions(+)
Diffstat (limited to 'linux/include/media/v4l2-i2c-drv.h')
-rw-r--r-- | linux/include/media/v4l2-i2c-drv.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index f027f27fb..f5bcf0926 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -29,6 +29,7 @@ struct v4l2_i2c_driver_data { int (*remove)(struct i2c_client *client); int (*suspend)(struct i2c_client *client, pm_message_t state); int (*resume)(struct i2c_client *client); + int (*legacy_probe)(struct i2c_adapter *adapter); #ifdef I2C_CLASS_TV_ANALOG int legacy_class; #else @@ -73,6 +74,11 @@ static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, static int v4l2_i2c_drv_probe_legacy(struct i2c_adapter *adapter) { + if (v4l2_i2c_data.legacy_probe) { + if (v4l2_i2c_data.legacy_probe(adapter)) + return i2c_probe(adapter, &addr_data, v4l2_i2c_drv_attach_legacy); + return 0; + } #ifdef I2C_CLASS_TV_ANALOG if (adapter->class & v4l2_i2c_data.legacy_class) #else |