From ee1b6f4bf3aa827b0daf65d7441e75212604b1c9 Mon Sep 17 00:00:00 2001 From: Kassey Li Date: Thu, 7 Apr 2011 14:01:29 -0300 Subject: [media] V4L: soc-camera: add MIPI bus flags Signed-off-by: Kassey Lee Signed-off-by: Qing Xu Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- include/media/soc_camera.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/media/soc_camera.h') diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 844cd09..238bd33 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h @@ -109,6 +109,12 @@ struct soc_camera_host_ops { #define SOCAM_SENSOR_INVERT_HSYNC (1 << 2) #define SOCAM_SENSOR_INVERT_VSYNC (1 << 3) #define SOCAM_SENSOR_INVERT_DATA (1 << 4) +#define SOCAM_MIPI_1LANE (1 << 5) +#define SOCAM_MIPI_2LANE (1 << 6) +#define SOCAM_MIPI_3LANE (1 << 7) +#define SOCAM_MIPI_4LANE (1 << 8) +#define SOCAM_MIPI (SOCAM_MIPI_1LANE | SOCAM_MIPI_2LANE | \ + SOCAM_MIPI_3LANE | SOCAM_MIPI_4LANE) struct i2c_board_info; struct regulator_bulk_data; @@ -273,6 +279,7 @@ static inline unsigned long soc_camera_bus_param_compatible( unsigned long camera_flags, unsigned long bus_flags) { unsigned long common_flags, hsync, vsync, pclk, data, buswidth, mode; + unsigned long mipi; common_flags = camera_flags & bus_flags; @@ -282,8 +289,9 @@ static inline unsigned long soc_camera_bus_param_compatible( data = common_flags & (SOCAM_DATA_ACTIVE_HIGH | SOCAM_DATA_ACTIVE_LOW); mode = common_flags & (SOCAM_MASTER | SOCAM_SLAVE); buswidth = common_flags & SOCAM_DATAWIDTH_MASK; + mipi = common_flags & SOCAM_MIPI; - return (!hsync || !vsync || !pclk || !data || !mode || !buswidth) ? 0 : + return ((!hsync || !vsync || !pclk || !data || !mode || !buswidth) && !mipi) ? 0 : common_flags; } -- cgit v1.1