diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 13:09:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-30 13:09:14 -0400 |
commit | b94d10e7f6fce9af7d5054845511a00575c4b4f5 (patch) | |
tree | 8be617e5d9cfc8a1fe232ac2b6454caec7ca466a /include/media/v4l2-subdev.h | |
parent | b80e0d271606a0f5b35c85b11f9014ce09cbc415 (diff) | |
parent | fd3a019534e0a9ada11bcc357a8faa9251029cbb (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (707 commits)
V4L/DVB (11316): saa7191: tuner ops wasn't set.
V4L/DVB (11315): cx25840: fix 'unused variable' warning.
V4L/DVB (11314): au8522: remove unused I2C_DRIVERID
V4L/DVB (11313): v4l2-subdev: add enum_framesizes and enum_frameintervals.
V4L/DVB (11312): tuner: remove V4L1 code from this driver.
V4L/DVB (11311): v4l: replace 'ioctl' references in v4l i2c drivers
V4L/DVB (11310): cx18: remove intermediate 'ioctl' step
V4L/DVB (11309): cx25840: cleanup: remove intermediate 'ioctl' step
V4L/DVB (11308): msp3400: use the V4L2 header since no V4L1 code is there
V4L/DVB (11305): cx88: prevent probing rtc and ir devices
V4L/DVB (11304): v4l2: remove v4l2_subdev_command calls where they are no longer needed.
V4L/DVB (11303): tda7432: remove legacy code for old-style i2c API
V4L/DVB (11302): tda9875: remove legacy code for old-style i2c API
V4L/DVB (11301): wm8775: remove legacy code for old-style i2c API
V4L/DVB (11300): cx88: convert to v4l2_subdev.
V4L/DVB (11298): cx25840: remove legacy code for old-style i2c API
V4L/DVB (11297): cx23885: convert to v4l2_subdev.
V4L/DVB (11296): cx23885: bugfix error message if firmware is not found
V4L/DVB (11295): cx23885: convert to v4l2_device.
V4L/DVB (11293): uvcvideo: Add zero fill for VIDIOC_ENUM_FMT
...
Diffstat (limited to 'include/media/v4l2-subdev.h')
-rw-r--r-- | include/media/v4l2-subdev.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 37b09e56e943..1d181b4ccb01 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -78,6 +78,9 @@ struct v4l2_subdev_core_ops { | |||
78 | int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); | 78 | int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); |
79 | int (*g_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl); | 79 | int (*g_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl); |
80 | int (*s_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl); | 80 | int (*s_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl); |
81 | int (*g_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls); | ||
82 | int (*s_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls); | ||
83 | int (*try_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls); | ||
81 | int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm); | 84 | int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm); |
82 | long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); | 85 | long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); |
83 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 86 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
@@ -112,9 +115,17 @@ struct v4l2_subdev_video_ops { | |||
112 | int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data); | 115 | int (*g_vbi_data)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_data *vbi_data); |
113 | int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap); | 116 | int (*g_sliced_vbi_cap)(struct v4l2_subdev *sd, struct v4l2_sliced_vbi_cap *cap); |
114 | int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std); | 117 | int (*s_std_output)(struct v4l2_subdev *sd, v4l2_std_id std); |
118 | int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std); | ||
119 | int (*g_input_status)(struct v4l2_subdev *sd, u32 *status); | ||
115 | int (*s_stream)(struct v4l2_subdev *sd, int enable); | 120 | int (*s_stream)(struct v4l2_subdev *sd, int enable); |
116 | int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); | 121 | int (*enum_fmt)(struct v4l2_subdev *sd, struct v4l2_fmtdesc *fmtdesc); |
117 | int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); | 122 | int (*g_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); |
123 | int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); | ||
124 | int (*s_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt); | ||
125 | int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | ||
126 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | ||
127 | int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); | ||
128 | int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); | ||
118 | }; | 129 | }; |
119 | 130 | ||
120 | struct v4l2_subdev_ops { | 131 | struct v4l2_subdev_ops { |
@@ -132,7 +143,7 @@ struct v4l2_subdev_ops { | |||
132 | struct v4l2_subdev { | 143 | struct v4l2_subdev { |
133 | struct list_head list; | 144 | struct list_head list; |
134 | struct module *owner; | 145 | struct module *owner; |
135 | struct v4l2_device *dev; | 146 | struct v4l2_device *v4l2_dev; |
136 | const struct v4l2_subdev_ops *ops; | 147 | const struct v4l2_subdev_ops *ops; |
137 | /* name must be unique */ | 148 | /* name must be unique */ |
138 | char name[V4L2_SUBDEV_NAME_SIZE]; | 149 | char name[V4L2_SUBDEV_NAME_SIZE]; |
@@ -171,7 +182,7 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd, | |||
171 | /* ops->core MUST be set */ | 182 | /* ops->core MUST be set */ |
172 | BUG_ON(!ops || !ops->core); | 183 | BUG_ON(!ops || !ops->core); |
173 | sd->ops = ops; | 184 | sd->ops = ops; |
174 | sd->dev = NULL; | 185 | sd->v4l2_dev = NULL; |
175 | sd->name[0] = '\0'; | 186 | sd->name[0] = '\0'; |
176 | sd->grp_id = 0; | 187 | sd->grp_id = 0; |
177 | sd->priv = NULL; | 188 | sd->priv = NULL; |
@@ -186,4 +197,9 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd, | |||
186 | (!(sd) ? -ENODEV : (((sd) && (sd)->ops->o && (sd)->ops->o->f) ? \ | 197 | (!(sd) ? -ENODEV : (((sd) && (sd)->ops->o && (sd)->ops->o->f) ? \ |
187 | (sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD)) | 198 | (sd)->ops->o->f((sd) , ##args) : -ENOIOCTLCMD)) |
188 | 199 | ||
200 | /* Send a notification to v4l2_device. */ | ||
201 | #define v4l2_subdev_notify(sd, notification, arg) \ | ||
202 | ((!(sd) || !(sd)->v4l2_dev || !(sd)->v4l2_dev->notify) ? -ENODEV : \ | ||
203 | (sd)->v4l2_dev->notify((sd), (notification), (arg))) | ||
204 | |||
189 | #endif | 205 | #endif |