0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef STV06XX_PB0100_H_
0018 #define STV06XX_PB0100_H_
0019
0020 #include "stv06xx_sensor.h"
0021
0022
0023 #define PB0100_CROP_TO_VGA 0x01
0024 #define PB0100_SUBSAMPLE 0x02
0025
0026
0027 #define PB_IDENT 0x00
0028 #define PB_RSTART 0x01
0029 #define PB_CSTART 0x02
0030 #define PB_RWSIZE 0x03
0031 #define PB_CWSIZE 0x04
0032 #define PB_CFILLIN 0x05
0033 #define PB_VBL 0x06
0034 #define PB_CONTROL 0x07
0035 #define PB_FINTTIME 0x08
0036 #define PB_RINTTIME 0x09
0037 #define PB_ROWSPEED 0x0a
0038 #define PB_ABORTFRAME 0x0b
0039 #define PB_R12 0x0c
0040 #define PB_RESET 0x0d
0041 #define PB_EXPGAIN 0x0e
0042 #define PB_R15 0x0f
0043 #define PB_R16 0x10
0044 #define PB_R17 0x11
0045 #define PB_R18 0x12
0046 #define PB_R19 0x13
0047 #define PB_R20 0x14
0048 #define PB_R21 0x15
0049 #define PB_R22 0x16
0050 #define PB_UPDATEINT 0x17
0051 #define PB_R24 0x18
0052 #define PB_R25 0x19
0053 #define PB_R26 0x1a
0054 #define PB_R27 0x1b
0055 #define PB_R28 0x1c
0056 #define PB_R29 0x1d
0057 #define PB_R30 0x1e
0058 #define PB_R31 0x1f
0059 #define PB_PREADCTRL 0x20
0060 #define PB_R33 0x21
0061 #define PB_R34 0x22
0062 #define PB_R35 0x23
0063 #define PB_R36 0x24
0064 #define PB_R37 0x25
0065 #define PB_R38 0x26
0066 #define PB_R39 0x27
0067 #define PB_R40 0x28
0068 #define PB_R41 0x29
0069 #define PB_R42 0x2a
0070 #define PB_G1GAIN 0x2b
0071 #define PB_BGAIN 0x2c
0072 #define PB_RGAIN 0x2d
0073 #define PB_G2GAIN 0x2e
0074 #define PB_R47 0x2f
0075 #define PB_R48 0x30
0076 #define PB_R49 0x31
0077 #define PB_R50 0x32
0078 #define PB_ADCMAXGAIN 0x33
0079 #define PB_ADCMINGAIN 0x34
0080 #define PB_ADCGLOBALGAIN 0x35
0081 #define PB_R54 0x36
0082 #define PB_R55 0x37
0083 #define PB_R56 0x38
0084 #define PB_VOFFSET 0x39
0085 #define PB_R58 0x3a
0086 #define PB_ADCGAINH 0x3b
0087 #define PB_ADCGAINL 0x3c
0088 #define PB_R61 0x3d
0089 #define PB_R62 0x3e
0090 #define PB_R63 0x3f
0091 #define PB_R64 0x40
0092 #define PB_R65 0x41
0093 #define PB_R66 0x42
0094 #define PB_R67 0x43
0095 #define PB_R240 0xf0
0096 #define PB_R241 0xf1
0097 #define PB_R242 0xf2
0098
0099 static int pb0100_probe(struct sd *sd);
0100 static int pb0100_start(struct sd *sd);
0101 static int pb0100_init(struct sd *sd);
0102 static int pb0100_init_controls(struct sd *sd);
0103 static int pb0100_stop(struct sd *sd);
0104 static int pb0100_dump(struct sd *sd);
0105
0106
0107 static int pb0100_set_gain(struct gspca_dev *gspca_dev, __s32 val);
0108 static int pb0100_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
0109 static int pb0100_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val);
0110 static int pb0100_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
0111 static int pb0100_set_autogain(struct gspca_dev *gspca_dev, __s32 val);
0112 static int pb0100_set_autogain_target(struct gspca_dev *gspca_dev, __s32 val);
0113
0114 const struct stv06xx_sensor stv06xx_sensor_pb0100 = {
0115 .name = "PB-0100",
0116 .i2c_flush = 1,
0117 .i2c_addr = 0xba,
0118 .i2c_len = 2,
0119
0120 .min_packet_size = { 635, 847 },
0121 .max_packet_size = { 847, 923 },
0122
0123 .init = pb0100_init,
0124 .init_controls = pb0100_init_controls,
0125 .probe = pb0100_probe,
0126 .start = pb0100_start,
0127 .stop = pb0100_stop,
0128 .dump = pb0100_dump,
0129 };
0130
0131 #endif