diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-06-09 16:29:29 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 02:15:52 -0400 |
commit | 2c0b19ac3b73199fe7b3fbff884051046554c048 (patch) | |
tree | 320502dcdd999b825b7e01e8ccd2a18051c2bbad /Documentation | |
parent | f0222c7d860f09a61bec5e500539f28db0184b38 (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')
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 24 |
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. | |||
390 | To see which chip variants are supported you can look in the i2c driver code | 390 | To see which chip variants are supported you can look in the i2c driver code |
391 | for the i2c_device_id table. This lists all the possibilities. | 391 | for the i2c_device_id table. This lists all the possibilities. |
392 | 392 | ||
393 | There are two more helper functions: | ||
394 | |||
395 | v4l2_i2c_new_subdev_cfg: this function adds new irq and platform_data | ||
396 | arguments and has both 'addr' and 'probed_addrs' arguments: if addr is not | ||
397 | 0 then that will be used (non-probing variant), otherwise the probed_addrs | ||
398 | are probed. | ||
399 | |||
400 | For example: this will probe for address 0x10: | ||
401 | |||
402 | struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, | ||
403 | "module_foo", "chipid", 0, NULL, 0, I2C_ADDRS(0x10)); | ||
404 | |||
405 | v4l2_i2c_new_subdev_board uses an i2c_board_info struct which is passed | ||
406 | to the i2c driver and replaces the irq, platform_data and addr arguments. | ||
407 | |||
408 | If the subdev supports the s_config core ops, then that op is called with | ||
409 | the irq and platform_data arguments after the subdev was setup. The older | ||
410 | v4l2_i2c_new_(probed_)subdev functions will call s_config as well, but with | ||
411 | irq set to 0 and platform_data set to NULL. | ||
412 | |||
413 | Note that in the next kernel release the functions v4l2_i2c_new_subdev, | ||
414 | v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr will all be | ||
415 | replaced by a single v4l2_i2c_new_subdev that is identical to | ||
416 | v4l2_i2c_new_subdev_cfg but without the irq and platform_data arguments. | ||
393 | 417 | ||
394 | struct video_device | 418 | struct video_device |
395 | ------------------- | 419 | ------------------- |