aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/media/soc_camera.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 844cd09d7d3e..238bd334fd83 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -109,6 +109,12 @@ struct soc_camera_host_ops {
109#define SOCAM_SENSOR_INVERT_HSYNC (1 << 2) 109#define SOCAM_SENSOR_INVERT_HSYNC (1 << 2)
110#define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) 110#define SOCAM_SENSOR_INVERT_VSYNC (1 << 3)
111#define SOCAM_SENSOR_INVERT_DATA (1 << 4) 111#define SOCAM_SENSOR_INVERT_DATA (1 << 4)
112#define SOCAM_MIPI_1LANE (1 << 5)
113#define SOCAM_MIPI_2LANE (1 << 6)
114#define SOCAM_MIPI_3LANE (1 << 7)
115#define SOCAM_MIPI_4LANE (1 << 8)
116#define SOCAM_MIPI (SOCAM_MIPI_1LANE | SOCAM_MIPI_2LANE | \
117 SOCAM_MIPI_3LANE | SOCAM_MIPI_4LANE)
112 118
113struct i2c_board_info; 119struct i2c_board_info;
114struct regulator_bulk_data; 120struct regulator_bulk_data;
@@ -273,6 +279,7 @@ static inline unsigned long soc_camera_bus_param_compatible(
273 unsigned long camera_flags, unsigned long bus_flags) 279 unsigned long camera_flags, unsigned long bus_flags)
274{ 280{
275 unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode; 281 unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode;
282 unsigned long mipi;
276 283
277 common_flags = camera_flags & bus_flags; 284 common_flags = camera_flags & bus_flags;
278 285
@@ -282,8 +289,9 @@ static inline unsigned long soc_camera_bus_param_compatible(
282 data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); 289 data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW);
283 mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); 290 mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE);
284 buswidth = common_flags & SOCAM_DATAWIDTH_MASK; 291 buswidth = common_flags & SOCAM_DATAWIDTH_MASK;
292 mipi = common_flags & SOCAM_MIPI;
285 293
286 return (!hsync || !vsync || !pclk || !data || !mode || !buswidth) ? 0 : 294 return ((!hsync || !vsync || !pclk || !data || !mode || !buswidth) && !mipi) ? 0 :
287 common_flags; 295 common_flags;
288} 296}
289 297