diff options
Diffstat (limited to 'include/media/soc_camera.h')
-rw-r--r-- | include/media/soc_camera.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index f80b5372baf3..238bd334fd83 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -80,6 +80,11 @@ struct soc_camera_host_ops { | |||
80 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); | 80 | int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *); |
81 | int (*get_crop)(struct soc_camera_device *, struct v4l2_crop *); | 81 | int (*get_crop)(struct soc_camera_device *, struct v4l2_crop *); |
82 | int (*set_crop)(struct soc_camera_device *, struct v4l2_crop *); | 82 | int (*set_crop)(struct soc_camera_device *, struct v4l2_crop *); |
83 | /* | ||
84 | * The difference to .set_crop() is, that .set_livecrop is not allowed | ||
85 | * to change the output sizes | ||
86 | */ | ||
87 | int (*set_livecrop)(struct soc_camera_device *, struct v4l2_crop *); | ||
83 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); | 88 | int (*set_fmt)(struct soc_camera_device *, struct v4l2_format *); |
84 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); | 89 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |
85 | void (*init_videobuf)(struct videobuf_queue *, | 90 | void (*init_videobuf)(struct videobuf_queue *, |
@@ -104,6 +109,12 @@ struct soc_camera_host_ops { | |||
104 | #define SOCAM_SENSOR_INVERT_HSYNC (1 << 2) | 109 | #define SOCAM_SENSOR_INVERT_HSYNC (1 << 2) |
105 | #define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) | 110 | #define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) |
106 | #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) | ||
107 | 118 | ||
108 | struct i2c_board_info; | 119 | struct i2c_board_info; |
109 | struct regulator_bulk_data; | 120 | struct regulator_bulk_data; |
@@ -268,6 +279,7 @@ static inline unsigned long soc_camera_bus_param_compatible( | |||
268 | unsigned long camera_flags, unsigned long bus_flags) | 279 | unsigned long camera_flags, unsigned long bus_flags) |
269 | { | 280 | { |
270 | 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; | ||
271 | 283 | ||
272 | common_flags = camera_flags & bus_flags; | 284 | common_flags = camera_flags & bus_flags; |
273 | 285 | ||
@@ -277,8 +289,9 @@ static inline unsigned long soc_camera_bus_param_compatible( | |||
277 | data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); | 289 | data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); |
278 | mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); | 290 | mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); |
279 | buswidth = common_flags & SOCAM_DATAWIDTH_MASK; | 291 | buswidth = common_flags & SOCAM_DATAWIDTH_MASK; |
292 | mipi = common_flags & SOCAM_MIPI; | ||
280 | 293 | ||
281 | return (!hsync || !vsync || !pclk || !data || !mode || !buswidth) ? 0 : | 294 | return ((!hsync || !vsync || !pclk || !data || !mode || !buswidth) && !mipi) ? 0 : |
282 | common_flags; | 295 | common_flags; |
283 | } | 296 | } |
284 | 297 | ||