diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-29 19:20:26 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 21:44:21 -0300 |
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 c84ff88c913..38b89cf7c99 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -89,7 +89,9 @@ struct v4l2_crystal_freq { values. Do not use for new drivers and should be removed in existing drivers. - reset: generic reset command. The argument selects which subsystems to + load_fw: load firmware. + + reset: generic reset command. The argument selects which subsystems to reset. Passing 0 will always reset the whole chip. Do not use for new drivers without discussing this first on the linux-media mailinglist. There should be no reason normally to reset a device. @@ -101,6 +103,7 @@ struct v4l2_subdev_core_ops { int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); int (*log_status)(struct v4l2_subdev *sd); int (*init)(struct v4l2_subdev *sd, u32 val); + int (*load_fw)(struct v4l2_subdev *sd); int (*reset)(struct v4l2_subdev *sd, u32 val); int (*s_gpio)(struct v4l2_subdev *sd, u32 val); int (*queryctrl)(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc); @@ -175,31 +178,31 @@ struct v4l2_subdev_audio_ops { v4l2_sliced_vbi_data struct. If no valid VBI data was found, then the type field is set to 0 on return. - s_vbi_data: used to generate VBI signals on a video signal. + s_vbi_data: used to generate VBI signals on a video signal. v4l2_sliced_vbi_data is filled with the data packets that should be output. Note that if you set the line field to 0, then that VBI signal is disabled. If no valid VBI data was found, then the type field is set to 0 on return. - g_vbi_data: used to obtain the sliced VBI packet from a readback register. + g_vbi_data: used to obtain the sliced VBI packet from a readback register. Not all video decoders support this. If no data is available because the readback register contains invalid or erroneous data -EIO is returned. Note that you must fill in the 'id' member and the 'field' member (to determine whether CC data from the first or second field should be obtained). - s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by + s_std_output: set v4l2_std_id for video OUTPUT devices. This is ignored by video input devices. - s_crystal_freq: sets the frequency of the crystal used to generate the + s_crystal_freq: sets the frequency of the crystal used to generate the clocks. An extra flags field allows device specific configuration regarding clock frequency dividers, etc. If not used, then set flags to 0. If the frequency is not supported, then -EINVAL is returned. - g_input_status: get input status. Same as the status field in the v4l2_input + g_input_status: get input status. Same as the status field in the v4l2_input struct. - s_routing: see s_routing in audio_ops, except this version is for video + s_routing: see s_routing in audio_ops, except this version is for video devices. */ struct v4l2_subdev_video_ops { |