aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/stk1135.h
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2013-08-20 09:03:59 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-21 04:21:55 -0400
commit4ab0620bdc6fe3ca2365c014552dee64402670a4 (patch)
treee8f7c8cce83e32a07ae3a54b4e0cfc760daf7241 /drivers/media/usb/gspca/stk1135.h
parentd48de1c73b41d27e3cc6e500eb9588449edb2f14 (diff)
[media] introduce gspca-stk1135: Syntek STK1135 driver
Hello, this is a new gspca driver for Syntek STK1135 webcams. The code is completely new, but register values are based on Syntekdriver (stk11xx) by Nicolas VIVIEN (http://syntekdriver.sourceforge.net). Only one webcam type is supported now - vendor 0x174f, device 0x6a31. It's Asus F5RL laptop flippable webcam with MT9M112. The camera works better than in Windows - initializes much faster and provides more resolutions (the sensor can do almost any resolution - just add it to the stk1135_modes[] - could this feature be somehow used by applications to avoid SW scaling?). Autoflip works too - when the camera is flipped around, the image is flipped automatically. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/gspca/stk1135.h')
-rw-r--r--drivers/media/usb/gspca/stk1135.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/drivers/media/usb/gspca/stk1135.h b/drivers/media/usb/gspca/stk1135.h
new file mode 100644
index 000000000000..e1dd92ab49bb
--- /dev/null
+++ b/drivers/media/usb/gspca/stk1135.h
@@ -0,0 +1,57 @@
1/*
2 * STK1135 registers
3 *
4 * Copyright (c) 2013 Ondrej Zary
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#define STK1135_REG_GCTRL 0x000 /* GPIO control */
22#define STK1135_REG_ICTRL 0x004 /* Interrupt control */
23#define STK1135_REG_IDATA 0x008 /* Interrupt data */
24#define STK1135_REG_RMCTL 0x00c /* Remote wakeup control */
25#define STK1135_REG_POSVA 0x010 /* Power-on strapping data */
26
27#define STK1135_REG_SENSO 0x018 /* Sensor select options */
28#define STK1135_REG_PLLFD 0x01c /* PLL frequency divider */
29
30#define STK1135_REG_SCTRL 0x100 /* Sensor control register */
31#define STK1135_REG_DCTRL 0x104 /* Decimation control register */
32#define STK1135_REG_CISPO 0x110 /* Capture image starting position */
33#define STK1135_REG_CIEPO 0x114 /* Capture image ending position */
34#define STK1135_REG_TCTRL 0x120 /* Test data control */
35
36#define STK1135_REG_SICTL 0x200 /* Serial interface control register */
37#define STK1135_REG_SBUSW 0x204 /* Serial bus write */
38#define STK1135_REG_SBUSR 0x208 /* Serial bus read */
39#define STK1135_REG_SCSI 0x20c /* Software control serial interface */
40#define STK1135_REG_GSBWP 0x210 /* General serial bus write port */
41#define STK1135_REG_GSBRP 0x214 /* General serial bus read port */
42#define STK1135_REG_ASIC 0x2fc /* Alternate serial interface control */
43
44#define STK1135_REG_TMGEN 0x300 /* Timing generator */
45#define STK1135_REG_TCP1 0x350 /* Timing control parameter 1 */
46
47struct stk1135_pkt_header {
48 u8 flags;
49 u8 seq;
50 __le16 gpio;
51} __packed;
52
53#define STK1135_HDR_FRAME_START (1 << 7)
54#define STK1135_HDR_ODD (1 << 6)
55#define STK1135_HDR_I2C_VBLANK (1 << 5)
56
57#define STK1135_HDR_SEQ_MASK 0x3f