V4L/DVB (10813): v4l2: New function v4l2_video_std_frame_period
[safe/jmp/linux-2.6] / include / media / soc_camera.h
index 425b6a9..c63a340 100644 (file)
@@ -164,12 +164,12 @@ struct soc_camera_ops {
        unsigned long (*query_bus_param)(struct soc_camera_device *);
        int (*set_bus_param)(struct soc_camera_device *, unsigned long);
        int (*get_chip_id)(struct soc_camera_device *,
-                          struct v4l2_chip_ident *);
+                          struct v4l2_dbg_chip_ident *);
        int (*set_std)(struct soc_camera_device *, v4l2_std_id *);
        int (*enum_input)(struct soc_camera_device *, struct v4l2_input *);
 #ifdef CONFIG_VIDEO_ADV_DEBUG
-       int (*get_register)(struct soc_camera_device *, struct v4l2_register *);
-       int (*set_register)(struct soc_camera_device *, struct v4l2_register *);
+       int (*get_register)(struct soc_camera_device *, struct v4l2_dbg_register *);
+       int (*set_register)(struct soc_camera_device *, struct v4l2_dbg_register *);
 #endif
        int (*get_control)(struct soc_camera_device *, struct v4l2_control *);
        int (*set_control)(struct soc_camera_device *, struct v4l2_control *);
@@ -239,15 +239,19 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
 static inline unsigned long soc_camera_bus_param_compatible(
                        unsigned long camera_flags, unsigned long bus_flags)
 {
-       unsigned long common_flags, hsync, vsync, pclk;
+       unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode;
 
        common_flags = camera_flags & bus_flags;
 
        hsync = common_flags & (SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_LOW);
        vsync = common_flags & (SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_LOW);
        pclk = common_flags & (SOCAM_PCLK_SAMPLE_RISING | SOCAM_PCLK_SAMPLE_FALLING);
+       data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW);
+       mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE);
+       buswidth = common_flags & SOCAM_DATAWIDTH_MASK;
 
-       return (!hsync || !vsync || !pclk) ? 0 : common_flags;
+       return (!hsync || !vsync || !pclk || !data || !mode || !buswidth) ? 0 :
+               common_flags;
 }
 
 extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,