diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-07-28 17:42:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-03 16:28:18 -0400 |
commit | d839fe17a13562897e52e29c13d09ac0435dee85 (patch) | |
tree | 43160915e5a31e06b0d2ae6161cc423ba496285a /include | |
parent | 5476ea8d67b9e2b258c1c9ce6620e69bf13ecf0f (diff) |
[media] V4L: soc-camera: remove soc-camera client bus-param operations and supporting code
soc-camera has been completely ported over to V4L2 subdevice mbus-config
operations, soc-camera client bus-param operations and supporting code
can now be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/soc_camera.h | 52 |
1 files changed, 8 insertions, 44 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 73337cff85a3..1864e2242d45 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef SOC_CAMERA_H | 12 | #ifndef SOC_CAMERA_H |
13 | #define SOC_CAMERA_H | 13 | #define SOC_CAMERA_H |
14 | 14 | ||
15 | #include <linux/bitops.h> | ||
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
16 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
17 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
@@ -194,8 +195,6 @@ struct soc_camera_format_xlate { | |||
194 | }; | 195 | }; |
195 | 196 | ||
196 | struct soc_camera_ops { | 197 | struct soc_camera_ops { |
197 | unsigned long (*query_bus_param)(struct soc_camera_device *); | ||
198 | int (*set_bus_param)(struct soc_camera_device *, unsigned long); | ||
199 | const struct v4l2_queryctrl *controls; | 198 | const struct v4l2_queryctrl *controls; |
200 | int num_controls; | 199 | int num_controls; |
201 | }; | 200 | }; |
@@ -238,53 +237,18 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl( | |||
238 | return NULL; | 237 | return NULL; |
239 | } | 238 | } |
240 | 239 | ||
241 | #define SOCAM_MASTER (1 << 0) | 240 | #define SOCAM_DATAWIDTH(x) BIT((x) - 1) |
242 | #define SOCAM_SLAVE (1 << 1) | 241 | #define SOCAM_DATAWIDTH_4 SOCAM_DATAWIDTH(4) |
243 | #define SOCAM_HSYNC_ACTIVE_HIGH (1 << 2) | 242 | #define SOCAM_DATAWIDTH_8 SOCAM_DATAWIDTH(8) |
244 | #define SOCAM_HSYNC_ACTIVE_LOW (1 << 6) | 243 | #define SOCAM_DATAWIDTH_9 SOCAM_DATAWIDTH(9) |
245 | #define SOCAM_VSYNC_ACTIVE_HIGH (1 << 4) | 244 | #define SOCAM_DATAWIDTH_10 SOCAM_DATAWIDTH(10) |
246 | #define SOCAM_VSYNC_ACTIVE_LOW (1 << 5) | 245 | #define SOCAM_DATAWIDTH_15 SOCAM_DATAWIDTH(15) |
247 | #define SOCAM_DATAWIDTH_4 (1 << 3) | 246 | #define SOCAM_DATAWIDTH_16 SOCAM_DATAWIDTH(16) |
248 | #define SOCAM_DATAWIDTH_8 (1 << 7) | ||
249 | #define SOCAM_DATAWIDTH_9 (1 << 8) | ||
250 | #define SOCAM_DATAWIDTH_10 (1 << 9) | ||
251 | #define SOCAM_DATAWIDTH_15 (1 << 14) | ||
252 | #define SOCAM_DATAWIDTH_16 (1 << 15) | ||
253 | #define SOCAM_PCLK_SAMPLE_RISING (1 << 12) | ||
254 | #define SOCAM_PCLK_SAMPLE_FALLING (1 << 13) | ||
255 | #define SOCAM_DATA_ACTIVE_HIGH (1 << 10) | ||
256 | #define SOCAM_DATA_ACTIVE_LOW (1 << 11) | ||
257 | #define SOCAM_MIPI_1LANE (1 << 16) | ||
258 | #define SOCAM_MIPI_2LANE (1 << 17) | ||
259 | #define SOCAM_MIPI_3LANE (1 << 18) | ||
260 | #define SOCAM_MIPI_4LANE (1 << 19) | ||
261 | #define SOCAM_MIPI (SOCAM_MIPI_1LANE | SOCAM_MIPI_2LANE | \ | ||
262 | SOCAM_MIPI_3LANE | SOCAM_MIPI_4LANE) | ||
263 | 247 | ||
264 | #define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \ | 248 | #define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_4 | SOCAM_DATAWIDTH_8 | \ |
265 | SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \ | 249 | SOCAM_DATAWIDTH_9 | SOCAM_DATAWIDTH_10 | \ |
266 | SOCAM_DATAWIDTH_15 | SOCAM_DATAWIDTH_16) | 250 | SOCAM_DATAWIDTH_15 | SOCAM_DATAWIDTH_16) |
267 | 251 | ||
268 | static inline unsigned long soc_camera_bus_param_compatible( | ||
269 | unsigned long camera_flags, unsigned long bus_flags) | ||
270 | { | ||
271 | unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode; | ||
272 | unsigned long mipi; | ||
273 | |||
274 | common_flags = camera_flags & bus_flags; | ||
275 | |||
276 | hsync = common_flags & (SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW); | ||
277 | vsync = common_flags & (SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW); | ||
278 | pclk = common_flags & (SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING); | ||
279 | data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); | ||
280 | mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); | ||
281 | buswidth = common_flags & SOCAM_DATAWIDTH_MASK; | ||
282 | mipi = common_flags & SOCAM_MIPI; | ||
283 | |||
284 | return ((!hsync || !vsync || !pclk || !data || !mode || !buswidth) && !mipi) ? 0 : | ||
285 | common_flags; | ||
286 | } | ||
287 | |||
288 | static inline void soc_camera_limit_side(int *start, int *length, | 252 | static inline void soc_camera_limit_side(int *start, int *length, |
289 | unsigned int start_min, | 253 | unsigned int start_min, |
290 | unsigned int length_min, unsigned int length_max) | 254 | unsigned int length_min, unsigned int length_max) |