1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef STV06XX_PB0100_H_
18 #define STV06XX_PB0100_H_
19
20 #include "stv06xx_sensor.h"
21
22
23 #define PB0100_CROP_TO_VGA 0x01
24 #define PB0100_SUBSAMPLE 0x02
25
26
27 #define PB_IDENT 0x00
28 #define PB_RSTART 0x01
29 #define PB_CSTART 0x02
30 #define PB_RWSIZE 0x03
31 #define PB_CWSIZE 0x04
32 #define PB_CFILLIN 0x05
33 #define PB_VBL 0x06
34 #define PB_CONTROL 0x07
35 #define PB_FINTTIME 0x08
36 #define PB_RINTTIME 0x09
37 #define PB_ROWSPEED 0x0a
38 #define PB_ABORTFRAME 0x0b
39 #define PB_R12 0x0c
40 #define PB_RESET 0x0d
41 #define PB_EXPGAIN 0x0e
42 #define PB_R15 0x0f
43 #define PB_R16 0x10
44 #define PB_R17 0x11
45 #define PB_R18 0x12
46 #define PB_R19 0x13
47 #define PB_R20 0x14
48 #define PB_R21 0x15
49 #define PB_R22 0x16
50 #define PB_UPDATEINT 0x17
51 #define PB_R24 0x18
52 #define PB_R25 0x19
53 #define PB_R26 0x1a
54 #define PB_R27 0x1b
55 #define PB_R28 0x1c
56 #define PB_R29 0x1d
57 #define PB_R30 0x1e
58 #define PB_R31 0x1f
59 #define PB_PREADCTRL 0x20
60 #define PB_R33 0x21
61 #define PB_R34 0x22
62 #define PB_R35 0x23
63 #define PB_R36 0x24
64 #define PB_R37 0x25
65 #define PB_R38 0x26
66 #define PB_R39 0x27
67 #define PB_R40 0x28
68 #define PB_R41 0x29
69 #define PB_R42 0x2a
70 #define PB_G1GAIN 0x2b
71 #define PB_BGAIN 0x2c
72 #define PB_RGAIN 0x2d
73 #define PB_G2GAIN 0x2e
74 #define PB_R47 0x2f
75 #define PB_R48 0x30
76 #define PB_R49 0x31
77 #define PB_R50 0x32
78 #define PB_ADCMAXGAIN 0x33
79 #define PB_ADCMINGAIN 0x34
80 #define PB_ADCGLOBALGAIN 0x35
81 #define PB_R54 0x36
82 #define PB_R55 0x37
83 #define PB_R56 0x38
84 #define PB_VOFFSET 0x39
85 #define PB_R58 0x3a
86 #define PB_ADCGAINH 0x3b
87 #define PB_ADCGAINL 0x3c
88 #define PB_R61 0x3d
89 #define PB_R62 0x3e
90 #define PB_R63 0x3f
91 #define PB_R64 0x40
92 #define PB_R65 0x41
93 #define PB_R66 0x42
94 #define PB_R67 0x43
95 #define PB_R240 0xf0
96 #define PB_R241 0xf1
97 #define PB_R242 0xf2
98
99 static int pb0100_probe(struct sd *sd);
100 static int pb0100_start(struct sd *sd);
101 static int pb0100_init(struct sd *sd);
102 static int pb0100_init_controls(struct sd *sd);
103 static int pb0100_stop(struct sd *sd);
104 static int pb0100_dump(struct sd *sd);
105
106
107 static int pb0100_set_gain(struct gspca_dev *gspca_dev, __s32 val);
108 static int pb0100_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
109 static int pb0100_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val);
110 static int pb0100_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
111 static int pb0100_set_autogain(struct gspca_dev *gspca_dev, __s32 val);
112 static int pb0100_set_autogain_target(struct gspca_dev *gspca_dev, __s32 val);
113
114 const struct stv06xx_sensor stv06xx_sensor_pb0100 = {
115 .name = "PB-0100",
116 .i2c_flush = 1,
117 .i2c_addr = 0xba,
118 .i2c_len = 2,
119
120 .min_packet_size = { 635, 847 },
121 .max_packet_size = { 847, 923 },
122
123 .init = pb0100_init,
124 .init_controls = pb0100_init_controls,
125 .probe = pb0100_probe,
126 .start = pb0100_start,
127 .stop = pb0100_stop,
128 .dump = pb0100_dump,
129 };
130
131 #endif