31 #ifndef STV06XX_HDCS_H_
32 #define STV06XX_HDCS_H_
36 #define HDCS_REG_CONFIG(sd) (IS_1020(sd) ? HDCS20_CONFIG : HDCS00_CONFIG)
37 #define HDCS_REG_CONTROL(sd) (IS_1020(sd) ? HDCS20_CONTROL : HDCS00_CONTROL)
39 #define HDCS_1X00_DEF_WIDTH 360
40 #define HDCS_1X00_DEF_HEIGHT 296
42 #define HDCS_1020_DEF_WIDTH 352
43 #define HDCS_1020_DEF_HEIGHT 292
45 #define HDCS_1020_BOTTOM_Y_SKIP 4
47 #define HDCS_CLK_FREQ_MHZ 25
49 #define HDCS_ADC_START_SIG_DUR 3
54 #define HDCS_IDENT (0x00 << 1)
56 #define HDCS_STATUS (0x01 << 1)
58 #define HDCS_IMASK (0x02 << 1)
60 #define HDCS_PCTRL (0x03 << 1)
62 #define HDCS_PDRV (0x04 << 1)
64 #define HDCS_ICTRL (0x05 << 1)
66 #define HDCS_ITMG (0x06 << 1)
68 #define HDCS_BFRAC (0x07 << 1)
70 #define HDCS_BRATE (0x08 << 1)
72 #define HDCS_ADCCTRL (0x09 << 1)
74 #define HDCS_FWROW (0x0a << 1)
76 #define HDCS_FWCOL (0x0b << 1)
78 #define HDCS_LWROW (0x0c << 1)
80 #define HDCS_LWCOL (0x0d << 1)
82 #define HDCS_TCTRL (0x0e << 1)
84 #define HDCS_ERECPGA (0x0f << 1)
86 #define HDCS_EROCPGA (0x10 << 1)
88 #define HDCS_ORECPGA (0x11 << 1)
90 #define HDCS_OROCPGA (0x12 << 1)
92 #define HDCS_ROWEXPL (0x13 << 1)
94 #define HDCS_ROWEXPH (0x14 << 1)
98 #define HDCS00_SROWEXPL (0x15 << 1)
100 #define HDCS00_SROWEXPH (0x16 << 1)
102 #define HDCS00_CONFIG (0x17 << 1)
104 #define HDCS00_CONTROL (0x18 << 1)
108 #define HDCS20_SROWEXP (0x15 << 1)
110 #define HDCS20_ERROR (0x16 << 1)
112 #define HDCS20_ITMG2 (0x17 << 1)
114 #define HDCS20_ICTRL2 (0x18 << 1)
116 #define HDCS20_HBLANK (0x19 << 1)
118 #define HDCS20_VBLANK (0x1a << 1)
120 #define HDCS20_CONFIG (0x1b << 1)
122 #define HDCS20_CONTROL (0x1c << 1)
124 #define HDCS_RUN_ENABLE (1 << 2)
125 #define HDCS_SLEEP_MODE (1 << 1)
127 #define HDCS_DEFAULT_EXPOSURE 48
128 #define HDCS_DEFAULT_GAIN 50
130 static int hdcs_probe_1x00(
struct sd *
sd);
131 static int hdcs_probe_1020(
struct sd *
sd);
132 static int hdcs_start(
struct sd *
sd);
133 static int hdcs_init(
struct sd *
sd);
134 static int hdcs_init_controls(
struct sd *
sd);
135 static int hdcs_stop(
struct sd *
sd);
136 static int hdcs_dump(
struct sd *
sd);
142 .name =
"HP HDCS-1000/1100",
144 .i2c_addr = (0x55 << 1),
150 .max_packet_size = { 847 },
153 .init_controls = hdcs_init_controls,
154 .probe = hdcs_probe_1x00,
163 .i2c_addr = (0x55 << 1),
169 .max_packet_size = { 847 },
172 .init_controls = hdcs_init_controls,
173 .probe = hdcs_probe_1020,
179 static const u16 stv_bridge_init[][2] = {
193 static const u8 stv_sensor_init[][2] = {