diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-12 22:34:19 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-12 22:34:19 +0100 |
commit | 70b943b48b5fba9ff5f7c911c1d2de03b2bf592e (patch) | |
tree | 7fc36669fe4b5665c22d6e722de3609c19e2ffcb /linux/Documentation/video4linux/v4l2-framework.txt | |
parent | 7787613f5c5a3a00ebd6aca9893ef2c4ad679bc1 (diff) | |
download | mediapointer-dvb-s2-70b943b48b5fba9ff5f7c911c1d2de03b2bf592e.tar.gz mediapointer-dvb-s2-70b943b48b5fba9ff5f7c911c1d2de03b2bf592e.tar.bz2 |
doc: improve the v4l2-framework documentation.
From: Hans Verkuil <hverkuil@xs4all.nl>
Emphasize the need to call i2c_set_adapdata and clarify the use of the
chipid in v4l2_i2c_new_(probed_)device().
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.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/linux/Documentation/video4linux/v4l2-framework.txt b/linux/Documentation/video4linux/v4l2-framework.txt index accc376e9..51a7b6db1 100644 --- a/linux/Documentation/video4linux/v4l2-framework.txt +++ b/linux/Documentation/video4linux/v4l2-framework.txt @@ -359,8 +359,8 @@ This loads the given module (can be NULL if no module needs to be loaded) and calls i2c_new_device() with the given i2c_adapter and chip/address arguments. If all goes well, then it registers the subdev with the v4l2_device. It gets the v4l2_device by calling i2c_get_adapdata(adapter), so you should make sure -that adapdata is set to v4l2_device when you setup the i2c_adapter in your -driver. +to call i2c_set_adapdata(adapter, v4l2_device) when you setup the i2c_adapter +in your driver. You can also use v4l2_i2c_new_probed_subdev() which is very similar to v4l2_i2c_new_subdev(), except that it has an array of possible I2C addresses @@ -368,6 +368,14 @@ that it should probe. Internally it calls i2c_new_probed_device(). Both functions return NULL if something went wrong. +Note that the chipid you pass to v4l2_i2c_new_(probed_)subdev() is usually +the same as the module name. It allows you to specify a chip variant, e.g. +"saa7114" or "saa7115". In general though the i2c driver autodetects this. +The use of chipid is something that needs to be looked at more closely at a +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. + struct video_device ------------------- |