diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2009-10-05 09:48:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:41:03 -0500 |
commit | 622b828ab795580903e79acb33fb44f5c9ce7b0f (patch) | |
tree | 6bd14a6769bd4caefdb1583c661948041b8a31d3 /include | |
parent | 7ef68e60d9435eb604a346babccb48000b94bc76 (diff) |
V4L/DVB (13238): v4l2_subdev: rename tuner s_standby operation to core s_power
Upcoming I2C v4l2_subdev drivers need a way to control the subdevice
power state from the core. This use case is already partially covered by
the tuner s_standby operation, but no way to explicitly come back from
the standby state is available.
Rename the tuner s_standby operation to core s_power, and fix tuner
drivers accordingly. The tuner core will call s_power(0) instead of
s_standby(). No explicit call to s_power(1) is required for tuners as
they are supposed to wake up from standby automatically.
[mchehab@redhat.com: CodingStyle fix]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/v4l2-subdev.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index ecc2818938b3..88c13d6f7912 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -106,6 +106,9 @@ struct v4l2_decode_vbi_line { | |||
106 | 106 | ||
107 | s_gpio: set GPIO pins. Very simple right now, might need to be extended with | 107 | s_gpio: set GPIO pins. Very simple right now, might need to be extended with |
108 | a direction argument if needed. | 108 | a direction argument if needed. |
109 | |||
110 | s_power: puts subdevice in power saving mode (on == 0) or normal operation | ||
111 | mode (on == 1). | ||
109 | */ | 112 | */ |
110 | struct v4l2_subdev_core_ops { | 113 | struct v4l2_subdev_core_ops { |
111 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); | 114 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); |
@@ -128,6 +131,7 @@ struct v4l2_subdev_core_ops { | |||
128 | int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); | 131 | int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); |
129 | int (*s_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); | 132 | int (*s_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); |
130 | #endif | 133 | #endif |
134 | int (*s_power)(struct v4l2_subdev *sd, int on); | ||
131 | }; | 135 | }; |
132 | 136 | ||
133 | /* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio. | 137 | /* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio. |
@@ -137,8 +141,6 @@ struct v4l2_subdev_core_ops { | |||
137 | s_type_addr: sets tuner type and its I2C addr. | 141 | s_type_addr: sets tuner type and its I2C addr. |
138 | 142 | ||
139 | s_config: sets tda9887 specific stuff, like port1, port2 and qss | 143 | s_config: sets tda9887 specific stuff, like port1, port2 and qss |
140 | |||
141 | s_standby: puts tuner on powersaving state, disabling it, except for i2c. | ||
142 | */ | 144 | */ |
143 | struct v4l2_subdev_tuner_ops { | 145 | struct v4l2_subdev_tuner_ops { |
144 | int (*s_mode)(struct v4l2_subdev *sd, enum v4l2_tuner_type); | 146 | int (*s_mode)(struct v4l2_subdev *sd, enum v4l2_tuner_type); |
@@ -151,7 +153,6 @@ struct v4l2_subdev_tuner_ops { | |||
151 | int (*s_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm); | 153 | int (*s_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm); |
152 | int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type); | 154 | int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type); |
153 | int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config); | 155 | int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config); |
154 | int (*s_standby)(struct v4l2_subdev *sd); | ||
155 | }; | 156 | }; |
156 | 157 | ||
157 | /* s_clock_freq: set the frequency (in Hz) of the audio clock output. | 158 | /* s_clock_freq: set the frequency (in Hz) of the audio clock output. |