diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2008-12-18 09:07:11 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:40:15 -0500 |
commit | 3cac2cab4f5b7eb7d9f7afc42cb251c45b96be36 (patch) | |
tree | 36627d4a588c0522510c728a31f4042aef704146 /drivers/media/video/ov772x.c | |
parent | aeabc882a3ad9a320783815e0446b12526fd2102 (diff) |
V4L/DVB (10069): Add ov7725 support to ov772x driver
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov772x.c')
-rw-r--r-- | drivers/media/video/ov772x.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 305befab8943..99dd943aacf3 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #define COM8 0x13 /* Common control 8 */ | 51 | #define COM8 0x13 /* Common control 8 */ |
52 | #define COM9 0x14 /* Common control 9 */ | 52 | #define COM9 0x14 /* Common control 9 */ |
53 | #define COM10 0x15 /* Common control 10 */ | 53 | #define COM10 0x15 /* Common control 10 */ |
54 | #define REG16 0x16 /* Register 16 */ | ||
54 | #define HSTART 0x17 /* Horizontal sensor size */ | 55 | #define HSTART 0x17 /* Horizontal sensor size */ |
55 | #define HSIZE 0x18 /* Horizontal frame (HREF column) end high 8-bit */ | 56 | #define HSIZE 0x18 /* Horizontal frame (HREF column) end high 8-bit */ |
56 | #define VSTART 0x19 /* Vertical frame (row) start high 8-bit */ | 57 | #define VSTART 0x19 /* Vertical frame (row) start high 8-bit */ |
@@ -65,6 +66,7 @@ | |||
65 | #define AEW 0x24 /* AGC/AEC - Stable operating region (upper limit) */ | 66 | #define AEW 0x24 /* AGC/AEC - Stable operating region (upper limit) */ |
66 | #define AEB 0x25 /* AGC/AEC - Stable operating region (lower limit) */ | 67 | #define AEB 0x25 /* AGC/AEC - Stable operating region (lower limit) */ |
67 | #define VPT 0x26 /* AGC/AEC Fast mode operating region */ | 68 | #define VPT 0x26 /* AGC/AEC Fast mode operating region */ |
69 | #define REG28 0x28 /* Register 28 */ | ||
68 | #define HOUTSIZE 0x29 /* Horizontal data output size MSBs */ | 70 | #define HOUTSIZE 0x29 /* Horizontal data output size MSBs */ |
69 | #define EXHCH 0x2A /* Dummy pixel insert MSB */ | 71 | #define EXHCH 0x2A /* Dummy pixel insert MSB */ |
70 | #define EXHCL 0x2B /* Dummy pixel insert LSB */ | 72 | #define EXHCL 0x2B /* Dummy pixel insert LSB */ |
@@ -94,6 +96,7 @@ | |||
94 | #define TGT_R 0x43 /* BLC red channel target value */ | 96 | #define TGT_R 0x43 /* BLC red channel target value */ |
95 | #define TGT_GB 0x44 /* BLC Gb channel target value */ | 97 | #define TGT_GB 0x44 /* BLC Gb channel target value */ |
96 | #define TGT_GR 0x45 /* BLC Gr channel target value */ | 98 | #define TGT_GR 0x45 /* BLC Gr channel target value */ |
99 | /* for ov7720 */ | ||
97 | #define LCC0 0x46 /* Lens correction control 0 */ | 100 | #define LCC0 0x46 /* Lens correction control 0 */ |
98 | #define LCC1 0x47 /* Lens correction option 1 - X coordinate */ | 101 | #define LCC1 0x47 /* Lens correction option 1 - X coordinate */ |
99 | #define LCC2 0x48 /* Lens correction option 2 - Y coordinate */ | 102 | #define LCC2 0x48 /* Lens correction option 2 - Y coordinate */ |
@@ -101,6 +104,15 @@ | |||
101 | #define LCC4 0x4A /* Lens correction option 4 - radius of the circular */ | 104 | #define LCC4 0x4A /* Lens correction option 4 - radius of the circular */ |
102 | #define LCC5 0x4B /* Lens correction option 5 */ | 105 | #define LCC5 0x4B /* Lens correction option 5 */ |
103 | #define LCC6 0x4C /* Lens correction option 6 */ | 106 | #define LCC6 0x4C /* Lens correction option 6 */ |
107 | /* for ov7725 */ | ||
108 | #define LC_CTR 0x46 /* Lens correction control */ | ||
109 | #define LC_XC 0x47 /* X coordinate of lens correction center relative */ | ||
110 | #define LC_YC 0x48 /* Y coordinate of lens correction center relative */ | ||
111 | #define LC_COEF 0x49 /* Lens correction coefficient */ | ||
112 | #define LC_RADI 0x4A /* Lens correction radius */ | ||
113 | #define LC_COEFB 0x4B /* Lens B channel compensation coefficient */ | ||
114 | #define LC_COEFR 0x4C /* Lens R channel compensation coefficient */ | ||
115 | |||
104 | #define FIXGAIN 0x4D /* Analog fix gain amplifer */ | 116 | #define FIXGAIN 0x4D /* Analog fix gain amplifer */ |
105 | #define AREF0 0x4E /* Sensor reference control */ | 117 | #define AREF0 0x4E /* Sensor reference control */ |
106 | #define AREF1 0x4F /* Sensor reference current control */ | 118 | #define AREF1 0x4F /* Sensor reference current control */ |
@@ -182,8 +194,13 @@ | |||
182 | #define SDE 0xA6 /* Special digital effect control */ | 194 | #define SDE 0xA6 /* Special digital effect control */ |
183 | #define USAT 0xA7 /* U component saturation control */ | 195 | #define USAT 0xA7 /* U component saturation control */ |
184 | #define VSAT 0xA8 /* V component saturation control */ | 196 | #define VSAT 0xA8 /* V component saturation control */ |
197 | /* for ov7720 */ | ||
185 | #define HUE0 0xA9 /* Hue control 0 */ | 198 | #define HUE0 0xA9 /* Hue control 0 */ |
186 | #define HUE1 0xAA /* Hue control 1 */ | 199 | #define HUE1 0xAA /* Hue control 1 */ |
200 | /* for ov7725 */ | ||
201 | #define HUECOS 0xA9 /* Cosine value */ | ||
202 | #define HUESIN 0xAA /* Sine value */ | ||
203 | |||
187 | #define SIGN 0xAB /* Sign bit for Hue and contrast */ | 204 | #define SIGN 0xAB /* Sign bit for Hue and contrast */ |
188 | #define DSPAUTO 0xAC /* DSP auto function ON/OFF control */ | 205 | #define DSPAUTO 0xAC /* DSP auto function ON/OFF control */ |
189 | 206 | ||
@@ -349,6 +366,7 @@ | |||
349 | * ID | 366 | * ID |
350 | */ | 367 | */ |
351 | #define OV7720 0x7720 | 368 | #define OV7720 0x7720 |
369 | #define OV7725 0x7721 | ||
352 | #define VERSION(pid, ver) ((pid<<8)|(ver&0xFF)) | 370 | #define VERSION(pid, ver) ((pid<<8)|(ver&0xFF)) |
353 | 371 | ||
354 | /* | 372 | /* |
@@ -838,6 +856,10 @@ static int ov772x_video_probe(struct soc_camera_device *icd) | |||
838 | devname = "ov7720"; | 856 | devname = "ov7720"; |
839 | priv->model = V4L2_IDENT_OV7720; | 857 | priv->model = V4L2_IDENT_OV7720; |
840 | break; | 858 | break; |
859 | case OV7725: | ||
860 | devname = "ov7725"; | ||
861 | priv->model = V4L2_IDENT_OV7725; | ||
862 | break; | ||
841 | default: | 863 | default: |
842 | dev_err(&icd->dev, | 864 | dev_err(&icd->dev, |
843 | "Product ID error %x:%x\n", pid, ver); | 865 | "Product ID error %x:%x\n", pid, ver); |