diff options
Diffstat (limited to 'drivers/media/video/gspca/gl860')
| -rw-r--r-- | drivers/media/video/gspca/gl860/Kconfig | 8 | ||||
| -rw-r--r-- | drivers/media/video/gspca/gl860/Makefile | 10 | ||||
| -rw-r--r-- | drivers/media/video/gspca/gl860/gl860-mi1320.c | 536 | ||||
| -rw-r--r-- | drivers/media/video/gspca/gl860/gl860-mi2020.c | 733 | ||||
| -rw-r--r-- | drivers/media/video/gspca/gl860/gl860-ov2640.c | 489 | ||||
| -rw-r--r-- | drivers/media/video/gspca/gl860/gl860-ov9655.c | 336 | ||||
| -rw-r--r-- | drivers/media/video/gspca/gl860/gl860.c | 735 | ||||
| -rw-r--r-- | drivers/media/video/gspca/gl860/gl860.h | 105 |
8 files changed, 2952 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gl860/Kconfig b/drivers/media/video/gspca/gl860/Kconfig new file mode 100644 index 00000000000..22772f53ec7 --- /dev/null +++ b/drivers/media/video/gspca/gl860/Kconfig | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | config USB_GL860 | ||
| 2 | tristate "GL860 USB Camera Driver" | ||
| 3 | depends on VIDEO_V4L2 && USB_GSPCA | ||
| 4 | help | ||
| 5 | Say Y here if you want support for cameras based on the GL860 chip. | ||
| 6 | |||
| 7 | To compile this driver as a module, choose M here: the | ||
| 8 | module will be called gspca_gl860. | ||
diff --git a/drivers/media/video/gspca/gl860/Makefile b/drivers/media/video/gspca/gl860/Makefile new file mode 100644 index 00000000000..13c9403cc87 --- /dev/null +++ b/drivers/media/video/gspca/gl860/Makefile | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | obj-$(CONFIG_USB_GL860) += gspca_gl860.o | ||
| 2 | |||
| 3 | gspca_gl860-objs := gl860.o \ | ||
| 4 | gl860-mi1320.o \ | ||
| 5 | gl860-ov2640.o \ | ||
| 6 | gl860-ov9655.o \ | ||
| 7 | gl860-mi2020.o | ||
| 8 | |||
| 9 | EXTRA_CFLAGS += -Idrivers/media/video/gspca | ||
| 10 | |||
diff --git a/drivers/media/video/gspca/gl860/gl860-mi1320.c b/drivers/media/video/gspca/gl860/gl860-mi1320.c new file mode 100644 index 00000000000..b57160e0486 --- /dev/null +++ b/drivers/media/video/gspca/gl860/gl860-mi1320.c | |||
| @@ -0,0 +1,536 @@ | |||
| 1 | /* Subdriver for the GL860 chip with the MI1320 sensor | ||
| 2 | * Author Olivier LORIN from own logs | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | /* Sensor : MI1320 */ | ||
| 19 | |||
| 20 | #include "gl860.h" | ||
| 21 | |||
| 22 | static struct validx tbl_common[] = { | ||
| 23 | {0xba00, 0x00f0}, {0xba00, 0x00f1}, {0xba51, 0x0066}, {0xba02, 0x00f1}, | ||
| 24 | {0xba05, 0x0067}, {0xba05, 0x00f1}, {0xbaa0, 0x0065}, {0xba00, 0x00f1}, | ||
| 25 | {0xffff, 0xffff}, | ||
| 26 | {0xba00, 0x00f0}, {0xba02, 0x00f1}, {0xbafa, 0x0028}, {0xba02, 0x00f1}, | ||
| 27 | {0xba00, 0x00f0}, {0xba01, 0x00f1}, {0xbaf0, 0x0006}, {0xba0e, 0x00f1}, | ||
| 28 | {0xba70, 0x0006}, {0xba0e, 0x00f1}, | ||
| 29 | {0xffff, 0xffff}, | ||
| 30 | {0xba74, 0x0006}, {0xba0e, 0x00f1}, | ||
| 31 | {0xffff, 0xffff}, | ||
| 32 | {0x0061, 0x0000}, {0x0068, 0x000d}, | ||
| 33 | }; | ||
| 34 | |||
| 35 | static struct validx tbl_init_at_startup[] = { | ||
| 36 | {0x0000, 0x0000}, {0x0010, 0x0010}, | ||
| 37 | {35, 0xffff}, | ||
| 38 | {0x0008, 0x00c0}, {0x0001, 0x00c1}, {0x0001, 0x00c2}, {0x0020, 0x0006}, | ||
| 39 | {0x006a, 0x000d}, | ||
| 40 | }; | ||
| 41 | |||
| 42 | static struct validx tbl_sensor_settings_common[] = { | ||
| 43 | {0x0010, 0x0010}, {0x0003, 0x00c1}, {0x0042, 0x00c2}, {0x0040, 0x0000}, | ||
| 44 | {0x006a, 0x0007}, {0x006a, 0x000d}, {0x0063, 0x0006}, | ||
| 45 | }; | ||
| 46 | static struct validx tbl_sensor_settings_1280[] = { | ||
| 47 | {0xba00, 0x00f0}, {0xba00, 0x00f1}, {0xba5a, 0x0066}, {0xba02, 0x00f1}, | ||
| 48 | {0xba05, 0x0067}, {0xba05, 0x00f1}, {0xba20, 0x0065}, {0xba00, 0x00f1}, | ||
| 49 | }; | ||
| 50 | static struct validx tbl_sensor_settings_800[] = { | ||
| 51 | {0xba00, 0x00f0}, {0xba00, 0x00f1}, {0xba5a, 0x0066}, {0xba02, 0x00f1}, | ||
| 52 | {0xba05, 0x0067}, {0xba05, 0x00f1}, {0xba20, 0x0065}, {0xba00, 0x00f1}, | ||
| 53 | }; | ||
| 54 | static struct validx tbl_sensor_settings_640[] = { | ||
| 55 | {0xba00, 0x00f0}, {0xba00, 0x00f1}, {0xbaa0, 0x0065}, {0xba00, 0x00f1}, | ||
| 56 | {0xba51, 0x0066}, {0xba02, 0x00f1}, {0xba05, 0x0067}, {0xba05, 0x00f1}, | ||
| 57 | {0xba20, 0x0065}, {0xba00, 0x00f1}, | ||
| 58 | }; | ||
| 59 | static struct validx tbl_post_unset_alt[] = { | ||
| 60 | {0xba00, 0x00f0}, {0xba00, 0x00f1}, {0xbaa0, 0x0065}, {0xba00, 0x00f1}, | ||
| 61 | {0x0061, 0x0000}, {0x0068, 0x000d}, | ||
| 62 | }; | ||
| 63 | |||
| 64 | static u8 *tbl_1280[] = { | ||
| 65 | "\x0d\x80\xf1\x08\x03\x04\xf1\x00" "\x04\x05\xf1\x02\x05\x00\xf1\xf1" | ||
| 66 | "\x06\x00\xf1\x0d\x20\x01\xf1\x00" "\x21\x84\xf1\x00\x0d\x00\xf1\x08" | ||
| 67 | "\xf0\x00\xf1\x01\x34\x00\xf1\x00" "\x9b\x43\xf1\x00\xa6\x05\xf1\x00" | ||
| 68 | "\xa9\x04\xf1\x00\xa1\x05\xf1\x00" "\xa4\x04\xf1\x00\xae\x0a\xf1\x08" | ||
| 69 | , | ||
| 70 | "\xf0\x00\xf1\x02\x3a\x05\xf1\xf1" "\x3c\x05\xf1\xf1\x59\x01\xf1\x47" | ||
| 71 | "\x5a\x01\xf1\x88\x5c\x0a\xf1\x06" "\x5d\x0e\xf1\x0a\x64\x5e\xf1\x1c" | ||
| 72 | "\xd2\x00\xf1\xcf\xcb\x00\xf1\x01" | ||
| 73 | , | ||
| 74 | "\xd3\x02\xd4\x28\xd5\x01\xd0\x02" "\xd1\x18\xd2\xc1" | ||
| 75 | }; | ||
| 76 | |||
| 77 | static u8 *tbl_800[] = { | ||
| 78 | "\x0d\x80\xf1\x08\x03\x03\xf1\xc0" "\x04\x05\xf1\x02\x05\x00\xf1\xf1" | ||
| 79 | "\x06\x00\xf1\x0d\x20\x01\xf1\x00" "\x21\x84\xf1\x00\x0d\x00\xf1\x08" | ||
| 80 | "\xf0\x00\xf1\x01\x34\x00\xf1\x00" "\x9b\x43\xf1\x00\xa6\x05\xf1\x00" | ||
| 81 | "\xa9\x03\xf1\xc0\xa1\x03\xf1\x20" "\xa4\x02\xf1\x5a\xae\x0a\xf1\x08" | ||
| 82 | , | ||
| 83 | "\xf0\x00\xf1\x02\x3a\x05\xf1\xf1" "\x3c\x05\xf1\xf1\x59\x01\xf1\x47" | ||
| 84 | "\x5a\x01\xf1\x88\x5c\x0a\xf1\x06" "\x5d\x0e\xf1\x0a\x64\x5e\xf1\x1c" | ||
| 85 | "\xd2\x00\xf1\xcf\xcb\x00\xf1\x01" | ||
| 86 | , | ||
| 87 | "\xd3\x02\xd4\x18\xd5\x21\xd0\x02" "\xd1\x10\xd2\x59" | ||
| 88 | }; | ||
| 89 | |||
| 90 | static u8 *tbl_640[] = { | ||
| 91 | "\x0d\x80\xf1\x08\x03\x04\xf1\x04" "\x04\x05\xf1\x02\x07\x01\xf1\x7c" | ||
| 92 | "\x08\x00\xf1\x0e\x21\x80\xf1\x00" "\x0d\x00\xf1\x08\xf0\x00\xf1\x01" | ||
| 93 | "\x34\x10\xf1\x10\x3a\x43\xf1\x00" "\xa6\x05\xf1\x02\xa9\x04\xf1\x04" | ||
| 94 | "\xa7\x02\xf1\x81\xaa\x01\xf1\xe2" "\xae\x0c\xf1\x09" | ||
| 95 | , | ||
| 96 | "\xf0\x00\xf1\x02\x39\x03\xf1\xfc" "\x3b\x04\xf1\x04\x57\x01\xf1\xb6" | ||
| 97 | "\x58\x02\xf1\x0d\x5c\x1f\xf1\x19" "\x5d\x24\xf1\x1e\x64\x5e\xf1\x1c" | ||
| 98 | "\xd2\x00\xf1\x00\xcb\x00\xf1\x01" | ||
| 99 | , | ||
| 100 | "\xd3\x02\xd4\x10\xd5\x81\xd0\x02" "\xd1\x08\xd2\xe1" | ||
| 101 | }; | ||
| 102 | |||
| 103 | static s32 tbl_sat[] = {0x25, 0x1d, 0x15, 0x0d, 0x05, 0x4d, 0x55, 0x5d, 0x2d}; | ||
| 104 | static s32 tbl_bright[] = {0, 8, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70}; | ||
| 105 | static s32 tbl_backlight[] = {0x0e, 0x06, 0x02}; | ||
| 106 | |||
| 107 | static s32 tbl_cntr1[] = { | ||
| 108 | 0x90, 0x98, 0xa0, 0xa8, 0xb0, 0xb8, 0xc0, 0xc8, 0xd0, 0xe0, 0xf0}; | ||
| 109 | static s32 tbl_cntr2[] = { | ||
| 110 | 0x70, 0x68, 0x60, 0x58, 0x50, 0x48, 0x40, 0x38, 0x30, 0x20, 0x10}; | ||
| 111 | |||
| 112 | static u8 dat_wbalNL[] = | ||
| 113 | "\xf0\x00\xf1\x01\x05\x00\xf1\x06" "\x3b\x04\xf1\x2a\x47\x10\xf1\x10" | ||
| 114 | "\x9d\x3c\xf1\xae\xaf\x10\xf1\x00" "\xf0\x00\xf1\x02\x2f\x91\xf1\x20" | ||
| 115 | "\x9c\x91\xf1\x20\x37\x03\xf1\x00" "\x9d\xc5\xf1\x0f\xf0\x00\xf1\x00"; | ||
| 116 | |||
| 117 | static u8 dat_wbalLL[] = | ||
| 118 | "\xf0\x00\xf1\x01\x05\x00\xf1\x0c" "\x3b\x04\xf1\x2a\x47\x40\xf1\x40" | ||
| 119 | "\x9d\x20\xf1\xae\xaf\x10\xf1\x00" "\xf0\x00\xf1\x02\x2f\xd1\xf1\x00" | ||
| 120 | "\x9c\xd1\xf1\x00\x37\x03\xf1\x00" "\x9d\xc5\xf1\x3f\xf0\x00\xf1\x00"; | ||
| 121 | |||
| 122 | static u8 dat_wbalBL[] = | ||
| 123 | "\xf0\x00\xf1\x01\x05\x00\xf1\x06" "\x47\x10\xf1\x30\x9d\x3c\xf1\xae" | ||
| 124 | "\xaf\x10\xf1\x00\xf0\x00\xf1\x02" "\x2f\x91\xf1\x20\x9c\x91\xf1\x20" | ||
| 125 | "\x37\x03\xf1\x00\x9d\xc5\xf1\x2f" "\xf0\x00\xf1\x00"; | ||
| 126 | |||
| 127 | static u8 dat_hvflip1[] = {0xf0, 0x00, 0xf1, 0x00}; | ||
| 128 | |||
| 129 | static u8 dat_common00[] = | ||
| 130 | "\x00\x01\x07\x6a\x06\x63\x0d\x6a" "\xc0\x00\x10\x10\xc1\x03\xc2\x42" | ||
| 131 | "\xd8\x04\x58\x00\x04\x02"; | ||
| 132 | static u8 dat_common01[] = | ||
| 133 | "\x0d\x00\xf1\x0b\x0d\x00\xf1\x08" "\x35\x00\xf1\x22\x68\x00\xf1\x5d" | ||
| 134 | "\xf0\x00\xf1\x01\x06\x70\xf1\x0e" "\xf0\x00\xf1\x02\xdd\x18\xf1\xe0"; | ||
| 135 | static u8 dat_common02[] = | ||
| 136 | "\x05\x01\xf1\x84\x06\x00\xf1\x44" "\x07\x00\xf1\xbe\x08\x00\xf1\x1e" | ||
| 137 | "\x20\x01\xf1\x03\x21\x84\xf1\x00" "\x22\x0d\xf1\x0f\x24\x80\xf1\x00" | ||
| 138 | "\x34\x18\xf1\x2d\x35\x00\xf1\x22" "\x43\x83\xf1\x83\x59\x00\xf1\xff"; | ||
| 139 | static u8 dat_common03[] = | ||
| 140 | "\xf0\x00\xf1\x02\x39\x06\xf1\x8c" "\x3a\x06\xf1\x8c\x3b\x03\xf1\xda" | ||
| 141 | "\x3c\x05\xf1\x30\x57\x01\xf1\x0c" "\x58\x01\xf1\x42\x59\x01\xf1\x0c" | ||
| 142 | "\x5a\x01\xf1\x42\x5c\x13\xf1\x0e" "\x5d\x17\xf1\x12\x64\x1e\xf1\x1c"; | ||
| 143 | static u8 dat_common04[] = | ||
| 144 | "\xf0\x00\xf1\x02\x24\x5f\xf1\x20" "\x28\xea\xf1\x02\x5f\x41\xf1\x43"; | ||
| 145 | static u8 dat_common05[] = | ||
| 146 | "\x02\x00\xf1\xee\x03\x29\xf1\x1a" "\x04\x02\xf1\xa4\x09\x00\xf1\x68" | ||
| 147 | "\x0a\x00\xf1\x2a\x0b\x00\xf1\x04" "\x0c\x00\xf1\x93\x0d\x00\xf1\x82" | ||
| 148 | "\x0e\x00\xf1\x40\x0f\x00\xf1\x5f" "\x10\x00\xf1\x4e\x11\x00\xf1\x5b"; | ||
| 149 | static u8 dat_common06[] = | ||
| 150 | "\x15\x00\xf1\xc9\x16\x00\xf1\x5e" "\x17\x00\xf1\x9d\x18\x00\xf1\x06" | ||
| 151 | "\x19\x00\xf1\x89\x1a\x00\xf1\x12" "\x1b\x00\xf1\xa1\x1c\x00\xf1\xe4" | ||
| 152 | "\x1d\x00\xf1\x7a\x1e\x00\xf1\x64" "\xf6\x00\xf1\x5f"; | ||
| 153 | static u8 dat_common07[] = | ||
| 154 | "\xf0\x00\xf1\x01\x53\x09\xf1\x03" "\x54\x3d\xf1\x1c\x55\x99\xf1\x72" | ||
| 155 | "\x56\xc1\xf1\xb1\x57\xd8\xf1\xce" "\x58\xe0\xf1\x00\xdc\x0a\xf1\x03" | ||
| 156 | "\xdd\x45\xf1\x20\xde\xae\xf1\x82" "\xdf\xdc\xf1\xc9\xe0\xf6\xf1\xea" | ||
| 157 | "\xe1\xff\xf1\x00"; | ||
| 158 | static u8 dat_common08[] = | ||
| 159 | "\xf0\x00\xf1\x01\x80\x00\xf1\x06" "\x81\xf6\xf1\x08\x82\xfb\xf1\xf7" | ||
| 160 | "\x83\x00\xf1\xfe\xb6\x07\xf1\x03" "\xb7\x18\xf1\x0c\x84\xfb\xf1\x06" | ||
| 161 | "\x85\xfb\xf1\xf9\x86\x00\xf1\xff" "\xb8\x07\xf1\x04\xb9\x16\xf1\x0a"; | ||
| 162 | static u8 dat_common09[] = | ||
| 163 | "\x87\xfa\xf1\x05\x88\xfc\xf1\xf9" "\x89\x00\xf1\xff\xba\x06\xf1\x03" | ||
| 164 | "\xbb\x17\xf1\x09\x8a\xe8\xf1\x14" "\x8b\xf7\xf1\xf0\x8c\xfd\xf1\xfa" | ||
| 165 | "\x8d\x00\xf1\x00\xbc\x05\xf1\x01" " | ||
