summaryrefslogtreecommitdiff
path: root/linux/Documentation/video4linux/v4l2-framework.txt
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-06-09 22:29:29 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2009-06-09 22:29:29 +0200
commit9bd4b1d143281470bf7a00afda20a7368154e213 (patch)
tree7a1164825bb00a152fc3143323f55190359bd30b /linux/Documentation/video4linux/v4l2-framework.txt
parent3d617ed4e7e3194bfe53f0182f22327d76e571d6 (diff)
downloadmediapointer-dvb-s2-9bd4b1d143281470bf7a00afda20a7368154e213.tar.gz
mediapointer-dvb-s2-9bd4b1d143281470bf7a00afda20a7368154e213.tar.bz2
v4l2: update framework documentation.
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/Documentation/video4linux/v4l2-framework.txt')
-rw-r--r--linux/Documentation/video4linux/v4l2-framework.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/linux/Documentation/video4linux/v4l2-framework.txt b/linux/Documentation/video4linux/v4l2-framework.txt
index d54c1e4c6..ba4706afc 100644
--- a/linux/Documentation/video4linux/v4l2-framework.txt
+++ b/linux/Documentation/video4linux/v4l2-framework.txt
@@ -390,6 +390,30 @@ later date. It differs between i2c drivers and as such can be confusing.
To see which chip variants are supported you can look in the i2c driver code
for the i2c_device_id table. This lists all the possibilities.
+There are two more helper functions:
+
+v4l2_i2c_new_subdev_cfg: this function adds new irq and platform_data
+arguments and has both 'addr' and 'probed_addrs' arguments: if addr is not
+0 then that will be used (non-probing variant), otherwise the probed_addrs
+are probed.
+
+For example: this will probe for address 0x10:
+
+struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter,
+ "module_foo", "chipid", 0, NULL, 0, I2C_ADDRS(0x10));
+
+v4l2_i2c_new_subdev_board uses an i2c_board_info struct which is passed
+to the i2c driver and replaces the irq, platform_data and addr arguments.
+
+If the subdev supports the s_config core ops, then that op is called with
+the irq and platform_data arguments after the subdev was setup. The older
+v4l2_i2c_new_(probed_)subdev functions will call s_config as well, but with
+irq set to 0 and platform_data set to NULL.
+
+Note that in the next kernel release the functions v4l2_i2c_new_subdev,
+v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr will all be
+replaced by a single v4l2_i2c_new_subdev that is identical to
+v4l2_i2c_new_subdev_cfg but without the irq and platform_data arguments.
struct video_device
-------------------