aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/video4linux
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-06-09 16:29:29 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-23 02:15:52 -0400
commit2c0b19ac3b73199fe7b3fbff884051046554c048 (patch)
tree320502dcdd999b825b7e01e8ccd2a18051c2bbad /Documentation/video4linux
parentf0222c7d860f09a61bec5e500539f28db0184b38 (diff)
V4L/DVB (12128): v4l2: update framework documentation.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r--Documentation/video4linux/v4l2-framework.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index d54c1e4c6a9c..ba4706afc5fb 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -390,6 +390,30 @@ later date. It differs between i2c drivers and as such can be confusing.
390To see which chip variants are supported you can look in the i2c driver code 390To see which chip variants are supported you can look in the i2c driver code
391for the i2c_device_id table. This lists all the possibilities. 391for the i2c_device_id table. This lists all the possibilities.
392 392
393There are two more helper functions:
394
395v4l2_i2c_new_subdev_cfg: this function adds new irq and platform_data
396arguments and has both 'addr' and 'probed_addrs' arguments: if addr is not
3970 then that will be used (non-probing variant), otherwise the probed_addrs
398are probed.
399
400For example: this will probe for address 0x10:
401
402struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter,
403 "module_foo", "chipid", 0, NULL, 0, I2C_ADDRS(0x10));
404
405v4l2_i2c_new_subdev_board uses an i2c_board_info struct which is passed
406to the i2c driver and replaces the irq, platform_data and addr arguments.
407
408If the subdev supports the s_config core ops, then that op is called with
409the irq and platform_data arguments after the subdev was setup. The older
410v4l2_i2c_new_(probed_)subdev functions will call s_config as well, but with
411irq set to 0 and platform_data set to NULL.
412
413Note that in the next kernel release the functions v4l2_i2c_new_subdev,
414v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr will all be
415replaced by a single v4l2_i2c_new_subdev that is identical to
416v4l2_i2c_new_subdev_cfg but without the irq and platform_data arguments.
393 417
394struct video_device 418struct video_device
395------------------- 419-------------------