diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-29 18:20:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:21 -0400 |
commit | cc26b076cf8b1040ccc514302ef9a24042272ec3 (patch) | |
tree | 6b41545a2d59f531cffd32d7161dcabc1d40d0e1 /include/media/v4l2-subdev.h | |
parent | 7c9fc9d50f97c9a6733ff1a22b6e31bcd91778e2 (diff) |
V4L/DVB (11369): v4l2-subdev: add load_fw and use that instead of abusing core->init.
The init callback was used in several places to load firmware. Make a separate
load_fw callback for that. This makes the code a lot more understandable.
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.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index c84ff88c913f..38b89cf7c995 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -89,7 +89,9 @@ struct v4l2_crystal_freq { | |||
89 | values. Do not use for new drivers and should be removed in existing | 89 | values. Do not use for new drivers and should be removed in existing |
90 | drivers. | 90 | drivers. |
91 | 91 | ||
92 | reset: generic reset command. The argument selects which subsystems to | 92 | load_fw: load firmware. |
93 | |||
94 | reset: generic reset command. The argument selects which subsystems to | ||
93 | reset. Passing 0 will always reset the whole chip. Do not use for new | 95 | reset. Passing 0 will always reset the whole chip. Do not use for new |
94 | drivers without discussing this first on the linux-media mailinglist. | 96 | drivers without discussing this first on the linux-media mailinglist. |
95 | There should be no reason normally to reset a device. | 97 | There should be no reason normally to reset a device. |
@@ -101,6 +103,7 @@ struct v4l2_subdev_core_ops { | |||
101 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); | 103 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); |
102 | int (*log_status)(struct v4l2_subdev *sd); | 104 | int (*log_status)(struct v4l2_subdev *sd); |
103 | int (*init)(struct v4l2_subdev *sd, u32 val); | 105 | int (*init)(struct v4l2_subdev *sd, u32 val); |
106 | int (*load_fw)(struct v4l2_subdev *sd); | ||
104 | int (*reset)(struct v4l2_subdev *sd, u32 val); | 107 | int (*reset)(struct v4l2_subdev *sd, u32 val); |
105 | int (*s_gpio)(struct v4l2_subdev *sd, u32 val); | 108 | int (*s_gpio)(struct v4l2_subdev *sd, u32 val); |
106 | int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); | 109 | int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); |
@@ -175,31 +178,31 @@ struct v4l2_subdev_audio_ops { | |||
175 | v4l2_sliced_vbi_data struct. If no valid VBI data was found, then the | 178 | v4l2_sliced_vbi_data struct. If no valid VBI data was found, then the |
176 | type field is set to 0 on return. | 179 | type field is set to 0 on return. |
177 | 180 | ||
178 | s_vbi_data: used to generate VBI signals on a video signal. | 181 | s_vbi_data: used to generate VBI signals on a video signal. |
179 | v4l2_sliced_vbi_data is filled with the data packets that should be | 182 | v4l2_sliced_vbi_data is filled with the data packets that should be |
180 | output. Note that if you set the line field to 0, then that VBI signal | 183 | output. Note that if you set the line field to 0, then that VBI signal |
181 | is disabled. If no valid VBI data was found, then the type field is | 184 | is disabled. If no valid VBI data was found, then the type field is |
182 | set to 0 on return. | 185 | set to 0 on return. |
183 | 186 | ||
184 | g_vbi_data: used to obtain the sliced VBI packet from a readback register. | 187 | g_vbi_data: used to obtain the sliced VBI packet from a readback register. |
185 | Not all video decoders support this. If no data is available because | 188 | Not all video decoders support this. If no data is available because |
186 | the readback register contains invalid or erroneous data -EIO is | 189 | the readback register contains invalid or erroneous data -EIO is |
187 | returned. Note that you must fill in the 'id' member and the 'field' | 190 | returned. Note that you must fill in the 'id' member and the 'field' |
188 | member (to determine whether CC data from the first or second field | 191 | member (to determine whether CC data from the first or second field |
189 | should be obtained). | 192 | should be obtained). |
190 | 193 | ||
191 | s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by | 194 | s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by |
192 | video input devices. | 195 | video input devices. |
193 | 196 | ||
194 | s_crystal_freq: sets the frequency of the crystal used to generate the | 197 | s_crystal_freq: sets the frequency of the crystal used to generate the |
195 | clocks. An extra flags field allows device specific configuration | 198 | clocks. An extra flags field allows device specific configuration |
196 | regarding clock frequency dividers, etc. If not used, then set flags | 199 | regarding clock frequency dividers, etc. If not used, then set flags |
197 | to 0. If the frequency is not supported, then -EINVAL is returned. | 200 | to 0. If the frequency is not supported, then -EINVAL is returned. |
198 | 201 | ||
199 | g_input_status: get input status. Same as the status field in the v4l2_input | 202 | g_input_status: get input status. Same as the status field in the v4l2_input |
200 | struct. | 203 | struct. |
201 | 204 | ||
202 | s_routing: see s_routing in audio_ops, except this version is for video | 205 | s_routing: see s_routing in audio_ops, except this version is for video |
203 | devices. | 206 | devices. |
204 | */ | 207 | */ |
205 | struct v4l2_subdev_video_ops { | 208 | struct v4l2_subdev_video_ops { |