aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-subdev.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-06-09 16:12:33 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-23 02:15:47 -0400
commitf0222c7d860f09a61bec5e500539f28db0184b38 (patch)
treeabcd69a4421985d205ede4df0365c7616d192453 /include/media/v4l2-subdev.h
parent90135c96869fa0ef3182282b2a661b57fcdb7230 (diff)
V4L/DVB (12125): v4l2: add new s_config subdev ops and v4l2_i2c_new_subdev_cfg/board calls
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. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r--include/media/v4l2-subdev.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index a503e1cee78..5dcb3678552 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -79,7 +79,11 @@ struct v4l2_decode_vbi_line {
79 not yet implemented) since ops provide proper type-checking. 79 not yet implemented) since ops provide proper type-checking.
80 */ 80 */
81 81
82/* init: initialize the sensor registors to some sort of reasonable default 82/* s_config: if set, then it is always called by the v4l2_i2c_new_subdev*
83 functions after the v4l2_subdev was registered. It is used to pass
84 platform data to the subdev which can be used during initialization.
85
86 init: initialize the sensor registors to some sort of reasonable default
83 values. Do not use for new drivers and should be removed in existing 87 values. Do not use for new drivers and should be removed in existing
84 drivers. 88 drivers.
85 89
@@ -96,6 +100,7 @@ struct v4l2_decode_vbi_line {
96struct v4l2_subdev_core_ops { 100struct v4l2_subdev_core_ops {
97 int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); 101 int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip);
98 int (*log_status)(struct v4l2_subdev *sd); 102 int (*log_status)(struct v4l2_subdev *sd);
103 int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data);
99 int (*init)(struct v4l2_subdev *sd, u32 val); 104 int (*init)(struct v4l2_subdev *sd, u32 val);
100 int (*load_fw)(struct v4l2_subdev *sd); 105 int (*load_fw)(struct v4l2_subdev *sd);
101 int (*reset)(struct v4l2_subdev *sd, u32 val); 106 int (*reset)(struct v4l2_subdev *sd, u32 val);