Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250291
b: refs/heads/master
c: ee1b6f4
h: refs/heads/master
i:
  250289: 999050c
  250287: 06106a5
v: v3
  • Loading branch information
Kassey Li authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 0a1a039 commit c97e962
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64149deb6a9ec35cc8a3ac3e7b5bc19d4a79ff44
refs/heads/master: ee1b6f4bf3aa827b0daf65d7441e75212604b1c9
10 changes: 9 additions & 1 deletion trunk/include/media/soc_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand All @@ -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;
}

Expand Down

0 comments on commit c97e962

Please sign in to comment.