aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/video4linux/v4l2-framework.txt16
1 files changed, 6 insertions, 10 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index ba4706afc5fb..e395a9cdc533 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -370,19 +370,20 @@ from the remove() callback ensures that this is always done correctly.
370The bridge driver also has some helper functions it can use: 370The bridge driver also has some helper functions it can use:
371 371
372struct v4l2_subdev *sd = v4l2_i2c_new_subdev(v4l2_dev, adapter, 372struct v4l2_subdev *sd = v4l2_i2c_new_subdev(v4l2_dev, adapter,
373 "module_foo", "chipid", 0x36); 373 "module_foo", "chipid", 0x36, NULL);
374 374
375This loads the given module (can be NULL if no module needs to be loaded) and 375This loads the given module (can be NULL if no module needs to be loaded) and
376calls i2c_new_device() with the given i2c_adapter and chip/address arguments. 376calls i2c_new_device() with the given i2c_adapter and chip/address arguments.
377If all goes well, then it registers the subdev with the v4l2_device. 377If all goes well, then it registers the subdev with the v4l2_device.
378 378
379You can also use v4l2_i2c_new_probed_subdev() which is very similar to 379You can also use the last argument of v4l2_i2c_new_subdev() to pass an array
380v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses 380of possible I2C addresses that it should probe. These probe addresses are
381that it should probe. Internally it calls i2c_new_probed_device(). 381only used if the previous argument is 0. A non-zero argument means that you
382know the exact i2c address so in that case no probing will take place.
382 383
383Both functions return NULL if something went wrong. 384Both functions return NULL if something went wrong.
384 385
385Note that the chipid you pass to v4l2_i2c_new_(probed_)subdev() is usually 386Note that the chipid you pass to v4l2_i2c_new_subdev() is usually
386the same as the module name. It allows you to specify a chip variant, e.g. 387the same as the module name. It allows you to specify a chip variant, e.g.
387"saa7114" or "saa7115". In general though the i2c driver autodetects this. 388"saa7114" or "saa7115". In general though the i2c driver autodetects this.
388The use of chipid is something that needs to be looked at more closely at a 389The use of chipid is something that needs to be looked at more closely at a
@@ -410,11 +411,6 @@ the 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 411v4l2_i2c_new_(probed_)subdev functions will call s_config as well, but with
411irq set to 0 and platform_data set to NULL. 412irq set to 0 and platform_data set to NULL.
412 413
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.
417
418struct video_device 414struct video_device
419------------------- 415-------------------
420 416