aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-09-26 04:54:17 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-14 14:58:45 -0400
commit73254c30db7116c4bae1adffab0dd2ac68486933 (patch)
tree67e22228d0898d25c0799977dfe479c1c5822350 /drivers/media/i2c
parenta54b80b17ab1fa33e58c5461f63fe3d8755d7e83 (diff)
[media] mt9m032: Define MT9M032_READ_MODE1 bits
Replace hardcoded values with #define's. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/mt9m032.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/media/i2c/mt9m032.c b/drivers/media/i2c/mt9m032.c
index 2f40a35b3ddb..8edb3d8f7b90 100644
--- a/drivers/media/i2c/mt9m032.c
+++ b/drivers/media/i2c/mt9m032.c
@@ -90,6 +90,24 @@
90#define MT9M032_PLL_CONFIG1_PREDIV_MASK 0x3f 90#define MT9M032_PLL_CONFIG1_PREDIV_MASK 0x3f
91#define MT9M032_PLL_CONFIG1_MUL_SHIFT 8 91#define MT9M032_PLL_CONFIG1_MUL_SHIFT 8
92#define MT9M032_READ_MODE1 0x1e 92#define MT9M032_READ_MODE1 0x1e
93#define MT9M032_READ_MODE1_OUTPUT_BAD_FRAMES (1 << 13)
94#define MT9M032_READ_MODE1_MAINTAIN_FRAME_RATE (1 << 12)
95#define MT9M032_READ_MODE1_XOR_LINE_VALID (1 << 11)
96#define MT9M032_READ_MODE1_CONT_LINE_VALID (1 << 10)
97#define MT9M032_READ_MODE1_INVERT_TRIGGER (1 << 9)
98#define MT9M032_READ_MODE1_SNAPSHOT (1 << 8)
99#define MT9M032_READ_MODE1_GLOBAL_RESET (1 << 7)
100#define MT9M032_READ_MODE1_BULB_EXPOSURE (1 << 6)
101#define MT9M032_READ_MODE1_INVERT_STROBE (1 << 5)
102#define MT9M032_READ_MODE1_STROBE_ENABLE (1 << 4)
103#define MT9M032_READ_MODE1_STROBE_START_TRIG1 (0 << 2)
104#define MT9M032_READ_MODE1_STROBE_START_EXP (1 << 2)
105#define MT9M032_READ_MODE1_STROBE_START_SHUTTER (2 << 2)
106#define MT9M032_READ_MODE1_STROBE_START_TRIG2 (3 << 2)
107#define MT9M032_READ_MODE1_STROBE_END_TRIG1 (0 << 0)
108#define MT9M032_READ_MODE1_STROBE_END_EXP (1 << 0)
109#define MT9M032_READ_MODE1_STROBE_END_SHUTTER (2 << 0)
110#define MT9M032_READ_MODE1_STROBE_END_TRIG2 (3 << 0)
93#define MT9M032_READ_MODE2 0x20 111#define MT9M032_READ_MODE2 0x20
94#define MT9M032_READ_MODE2_VFLIP_SHIFT 15 112#define MT9M032_READ_MODE2_VFLIP_SHIFT 15
95#define MT9M032_READ_MODE2_HFLIP_SHIFT 14 113#define MT9M032_READ_MODE2_HFLIP_SHIFT 14
@@ -282,7 +300,9 @@ static int mt9m032_setup_pll(struct mt9m032 *sensor)
282 MT9P031_PLL_CONTROL_PWRON | 300 MT9P031_PLL_CONTROL_PWRON |
283 MT9P031_PLL_CONTROL_USEPLL); 301 MT9P031_PLL_CONTROL_USEPLL);
284 if (!ret) /* more reserved, Continuous, Master Mode */ 302 if (!ret) /* more reserved, Continuous, Master Mode */
285 ret = mt9m032_write(client, MT9M032_READ_MODE1, 0x8006); 303 ret = mt9m032_write(client, MT9M032_READ_MODE1, 0x8000 |
304 MT9M032_READ_MODE1_STROBE_START_EXP |
305 MT9M032_READ_MODE1_STROBE_END_SHUTTER);
286 if (!ret) { 306 if (!ret) {
287 reg_val = (pll.p1 == 6 ? MT9M032_FORMATTER1_PLL_P1_6 : 0) 307 reg_val = (pll.p1 == 6 ? MT9M032_FORMATTER1_PLL_P1_6 : 0)
288 | MT9M032_FORMATTER1_PARALLEL | 0x001e; /* 14-bit */ 308 | MT9M032_FORMATTER1_PARALLEL | 0x001e; /* 14-bit */