diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-06-09 22:12:33 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-06-09 22:12:33 +0200 |
commit | 404f85e5ea9ee93c2a52e01b98acafa010c4d013 (patch) | |
tree | 11c5ea00ad453cbd9da69c4afc136ecfcf911b56 /linux/include/media/v4l2-common.h | |
parent | 7ef1e386396d4ebc645310511099bf2526e519c4 (diff) | |
download | mediapointer-dvb-s2-404f85e5ea9ee93c2a52e01b98acafa010c4d013.tar.gz mediapointer-dvb-s2-404f85e5ea9ee93c2a52e01b98acafa010c4d013.tar.bz2 |
v4l2: add new s_config subdev ops and v4l2_i2c_new_subdev_cfg/board calls
From: Hans Verkuil <hverkuil@xs4all.nl>
Add a new s_config core ops call: this is called with the irq and platform
data to be used to initialize the subdev.
Added new v4l2_i2c_new_subdev_cfg and v4l2_i2c_new_subdev_board calls
that allows you to pass these new arguments.
The existing v4l2_i2c_new_subdev functions were modified to also call
s_config.
In the future the existing v4l2_i2c_new_subdev functions will be replaced
by a single v4l2_i2c_new_subdev function similar to v4l2_i2c_new_subdev_cfg
but without the irq and platform_data arguments.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/include/media/v4l2-common.h')
-rw-r--r-- | linux/include/media/v4l2-common.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index 54728d4c0..831c4c038 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -158,6 +158,24 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev, struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, const char *module_name, const char *client_type, u8 addr); + +/* Load an i2c module and return an initialized v4l2_subdev struct. + Only call request_module if module_name != NULL. + The client_type argument is the name of the chip that's on the adapter. */ +struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, + struct i2c_adapter *adapter, + const char *module_name, const char *client_type, + int irq, void *platform_data, + u8 addr, const unsigned short *probe_addrs); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +struct i2c_board_info; + +struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, + struct i2c_adapter *adapter, const char *module_name, + struct i2c_board_info *info, const unsigned short *probe_addrs); +#endif + /* Initialize an v4l2_subdev with data from an i2c_client struct */ void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, const struct v4l2_subdev_ops *ops); |