diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-09-12 08:32:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 19:01:16 -0200 |
commit | 8ffbc6559493c64d6194c92d856196fdaeb8a5fb (patch) | |
tree | b279073efa70f56cf6f0614a6a96374464e492ec /include/media/v4l2-common.h | |
parent | 5ef4730d1bfe5be71ce54d927c510ad5da968854 (diff) | |
download | lwn-8ffbc6559493c64d6194c92d856196fdaeb8a5fb.tar.gz lwn-8ffbc6559493c64d6194c92d856196fdaeb8a5fb.zip |
V4L/DVB (6451): v4l2: add support for bus-based I2C drivers
Two new headers were added: one for I2C drivers that are only used
by V4L2 drivers converted to the new bus-based I2C API, and one that
can be used by both converted and unconverted drivers (at the expense of
some additional overhead).
To support the legacy I2C API a helper function was added to v4l2-common.c.
These headers take care of all the 'boilerplate' code that all V4L2 I2C drivers
have in common and will automatically support the bus-based I2C API introduced
in kernel 2.6.22.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r-- | include/media/v4l2-common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index c019c1e99895..475d0d8275e0 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h @@ -104,6 +104,17 @@ int v4l2_chip_match_host(u32 id_type, u32 chip_id); /* ------------------------------------------------------------------------- */ +/* Helper function for I2C legacy drivers */ + +struct i2c_driver; +struct i2c_adapter; +struct i2c_client; + +int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver *driver, + const char *name, int (*probe)(struct i2c_client *)); + +/* ------------------------------------------------------------------------- */ + /* Internal ioctls */ /* VIDIOC_INT_DECODE_VBI_LINE */ |