diff options
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r-- | include/media/soc_camera.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 34d2414f2b8c..865246b00127 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -146,9 +146,14 @@ struct soc_camera_subdev_desc { | |||
146 | /* sensor driver private platform data */ | 146 | /* sensor driver private platform data */ |
147 | void *drv_priv; | 147 | void *drv_priv; |
148 | 148 | ||
149 | /* Optional regulators that have to be managed on power on/off events */ | 149 | /* |
150 | struct regulator_bulk_data *regulators; | 150 | * Set unbalanced_power to true to deal with legacy drivers, failing to |
151 | int num_regulators; | 151 | * balance their calls to subdevice's .s_power() method. clock_state is |
152 | * then used internally by helper functions, it shouldn't be touched by | ||
153 | * drivers or the platform code. | ||
154 | */ | ||
155 | bool unbalanced_power; | ||
156 | unsigned long clock_state; | ||
152 | 157 | ||
153 | /* Optional callbacks to power on or off and reset the sensor */ | 158 | /* Optional callbacks to power on or off and reset the sensor */ |
154 | int (*power)(struct device *, int); | 159 | int (*power)(struct device *, int); |
@@ -162,6 +167,9 @@ struct soc_camera_subdev_desc { | |||
162 | int (*set_bus_param)(struct soc_camera_subdev_desc *, unsigned long flags); | 167 | int (*set_bus_param)(struct soc_camera_subdev_desc *, unsigned long flags); |
163 | unsigned long (*query_bus_param)(struct soc_camera_subdev_desc *); | 168 | unsigned long (*query_bus_param)(struct soc_camera_subdev_desc *); |
164 | void (*free_bus)(struct soc_camera_subdev_desc *); | 169 | void (*free_bus)(struct soc_camera_subdev_desc *); |
170 | |||
171 | /* Optional regulators that have to be managed on power on/off events */ | ||
172 | struct v4l2_subdev_platform_data sd_pdata; | ||
165 | }; | 173 | }; |
166 | 174 | ||
167 | struct soc_camera_host_desc { | 175 | struct soc_camera_host_desc { |
@@ -202,9 +210,10 @@ struct soc_camera_link { | |||
202 | 210 | ||
203 | void *priv; | 211 | void *priv; |
204 | 212 | ||
205 | /* Optional regulators that have to be managed on power on/off events */ | 213 | /* Set by platforms to handle misbehaving drivers */ |
206 | struct regulator_bulk_data *regulators; | 214 | bool unbalanced_power; |
207 | int num_regulators; | 215 | /* Used by soc-camera helper functions */ |
216 | unsigned long clock_state; | ||
208 | 217 | ||
209 | /* Optional callbacks to power on or off and reset the sensor */ | 218 | /* Optional callbacks to power on or off and reset the sensor */ |
210 | int (*power)(struct device *, int); | 219 | int (*power)(struct device *, int); |
@@ -218,6 +227,12 @@ struct soc_camera_link { | |||
218 | unsigned long (*query_bus_param)(struct soc_camera_link *); | 227 | unsigned long (*query_bus_param)(struct soc_camera_link *); |
219 | void (*free_bus)(struct soc_camera_link *); | 228 | void (*free_bus)(struct soc_camera_link *); |
220 | 229 | ||
230 | /* Optional regulators that have to be managed on power on/off events */ | ||
231 | struct regulator_bulk_data *regulators; | ||
232 | int num_regulators; | ||
233 | |||
234 | void *host_priv; | ||
235 | |||
221 | /* | 236 | /* |
222 | * Host part - keep at bottom and compatible to | 237 | * Host part - keep at bottom and compatible to |
223 | * struct soc_camera_host_desc | 238 | * struct soc_camera_host_desc |