aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/soc_camera.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 7440d9250665..c63a3409ffb7 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -239,15 +239,19 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
239static inline unsigned long soc_camera_bus_param_compatible( 239static inline unsigned long soc_camera_bus_param_compatible(
240 unsigned long camera_flags, unsigned long bus_flags) 240 unsigned long camera_flags, unsigned long bus_flags)
241{ 241{
242 unsigned long common_flags, hsync, vsync, pclk; 242 unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode;
243 243
244 common_flags = camera_flags & bus_flags; 244 common_flags = camera_flags & bus_flags;
245 245
246 hsync = common_flags & (SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW); 246 hsync = common_flags & (SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW);
247 vsync = common_flags & (SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW); 247 vsync = common_flags & (SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW);
248 pclk = common_flags & (SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING); 248 pclk = common_flags & (SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING);
249 data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW);
250 mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE);
251 buswidth = common_flags & SOCAM_DATAWIDTH_MASK;
249 252
250 return (!hsync || !vsync || !pclk) ? 0 : common_flags; 253 return (!hsync || !vsync || !pclk || !data || !mode || !buswidth) ? 0 :
254 common_flags;
251} 255}
252 256
253extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl, 257extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,