• Home
  • Raw
  • Download

Lines Matching refs:sd

79 	struct sd *sd = (struct sd *)gspca_dev;  in pb0100_s_ctrl()  local
80 struct pb0100_ctrls *ctrls = sd->sensor_priv; in pb0100_s_ctrl()
106 static int pb0100_init_controls(struct sd *sd) in pb0100_init_controls() argument
108 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in pb0100_init_controls()
150 sd->sensor_priv = ctrls; in pb0100_init_controls()
155 static int pb0100_probe(struct sd *sd) in pb0100_probe() argument
160 err = stv06xx_read_sensor(sd, PB_IDENT, &sensor); in pb0100_probe()
169 sd->gspca_dev.cam.cam_mode = pb0100_mode; in pb0100_probe()
170 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode); in pb0100_probe()
175 static int pb0100_start(struct sd *sd) in pb0100_start() argument
180 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in pb0100_start()
181 struct cam *cam = &sd->gspca_dev.cam; in pb0100_start()
182 u32 mode = cam->cam_mode[sd->gspca_dev.curr_mode].priv; in pb0100_start()
184 intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); in pb0100_start()
185 alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); in pb0100_start()
195 max_packet_size = sd->sensor->max_packet_size[sd->gspca_dev.curr_mode]; in pb0100_start()
197 stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(4)|BIT(3)|BIT(1)); in pb0100_start()
199 stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(5)|BIT(3)|BIT(1)); in pb0100_start()
203 stv06xx_write_sensor(sd, PB_RSTART, 30); in pb0100_start()
204 stv06xx_write_sensor(sd, PB_CSTART, 20); in pb0100_start()
205 stv06xx_write_sensor(sd, PB_RWSIZE, 240 - 1); in pb0100_start()
206 stv06xx_write_sensor(sd, PB_CWSIZE, 320 - 1); in pb0100_start()
208 stv06xx_write_sensor(sd, PB_RSTART, 8); in pb0100_start()
209 stv06xx_write_sensor(sd, PB_CSTART, 4); in pb0100_start()
210 stv06xx_write_sensor(sd, PB_RWSIZE, 288 - 1); in pb0100_start()
211 stv06xx_write_sensor(sd, PB_CWSIZE, 352 - 1); in pb0100_start()
215 stv06xx_write_bridge(sd, STV_Y_CTRL, 0x02); /* Wrong, FIXME */ in pb0100_start()
216 stv06xx_write_bridge(sd, STV_X_CTRL, 0x06); in pb0100_start()
218 stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x10); in pb0100_start()
220 stv06xx_write_bridge(sd, STV_Y_CTRL, 0x01); in pb0100_start()
221 stv06xx_write_bridge(sd, STV_X_CTRL, 0x0a); in pb0100_start()
223 stv06xx_write_bridge(sd, STV_SCAN_RATE, 0x20); in pb0100_start()
226 err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)|BIT(1)); in pb0100_start()
232 static int pb0100_stop(struct sd *sd) in pb0100_stop() argument
234 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in pb0100_stop()
237 err = stv06xx_write_sensor(sd, PB_ABORTFRAME, 1); in pb0100_stop()
243 err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)); in pb0100_stop()
254 static int pb0100_init(struct sd *sd) in pb0100_init() argument
256 stv06xx_write_bridge(sd, STV_REG00, 1); in pb0100_init()
257 stv06xx_write_bridge(sd, STV_SCAN_RATE, 0); in pb0100_init()
260 stv06xx_write_sensor(sd, PB_RESET, 1); in pb0100_init()
261 stv06xx_write_sensor(sd, PB_RESET, 0); in pb0100_init()
264 stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)); in pb0100_init()
267 stv06xx_write_sensor(sd, PB_PREADCTRL, BIT(12)|BIT(10)|BIT(6)); in pb0100_init()
268 stv06xx_write_sensor(sd, PB_ADCGLOBALGAIN, 12); in pb0100_init()
273 stv06xx_write_sensor(sd, PB_R28, 12); in pb0100_init()
275 stv06xx_write_sensor(sd, PB_ADCMAXGAIN, 180); in pb0100_init()
277 stv06xx_write_sensor(sd, PB_ADCMINGAIN, 12); in pb0100_init()
280 stv06xx_write_sensor(sd, PB_R54, 3); in pb0100_init()
283 stv06xx_write_sensor(sd, PB_R55, 0); in pb0100_init()
284 stv06xx_write_sensor(sd, PB_UPDATEINT, 1); in pb0100_init()
286 stv06xx_write_sensor(sd, PB_R15, 800); in pb0100_init()
288 stv06xx_write_sensor(sd, PB_R17, 10); in pb0100_init()
290 stv06xx_write_sensor(sd, PB_EXPGAIN, 0); in pb0100_init()
293 stv06xx_write_sensor(sd, PB_VOFFSET, 0); in pb0100_init()
295 stv06xx_write_sensor(sd, PB_ADCGAINH, 11); in pb0100_init()
297 stv06xx_write_sensor(sd, PB_ADCGAINL, 0); in pb0100_init()
300 stv06xx_write_bridge(sd, STV_REG00, 0x11); in pb0100_init()
301 stv06xx_write_bridge(sd, STV_REG03, 0x45); in pb0100_init()
302 stv06xx_write_bridge(sd, STV_REG04, 0x07); in pb0100_init()
305 stv06xx_write_sensor(sd, PB_ROWSPEED, BIT(4)|BIT(3)|BIT(1)); in pb0100_init()
306 stv06xx_write_sensor(sd, PB_CFILLIN, 14); in pb0100_init()
307 stv06xx_write_sensor(sd, PB_VBL, 0); in pb0100_init()
308 stv06xx_write_sensor(sd, PB_FINTTIME, 0); in pb0100_init()
309 stv06xx_write_sensor(sd, PB_RINTTIME, 123); in pb0100_init()
311 stv06xx_write_bridge(sd, STV_REG01, 0xc2); in pb0100_init()
312 stv06xx_write_bridge(sd, STV_REG02, 0xb0); in pb0100_init()
316 static int pb0100_dump(struct sd *sd) in pb0100_dump() argument
324 struct sd *sd = (struct sd *) gspca_dev; in pb0100_set_gain() local
325 struct pb0100_ctrls *ctrls = sd->sensor_priv; in pb0100_set_gain()
327 err = stv06xx_write_sensor(sd, PB_G1GAIN, val); in pb0100_set_gain()
329 err = stv06xx_write_sensor(sd, PB_G2GAIN, val); in pb0100_set_gain()
344 struct sd *sd = (struct sd *) gspca_dev; in pb0100_set_red_balance() local
345 struct pb0100_ctrls *ctrls = sd->sensor_priv; in pb0100_set_red_balance()
353 err = stv06xx_write_sensor(sd, PB_RGAIN, val); in pb0100_set_red_balance()
363 struct sd *sd = (struct sd *) gspca_dev; in pb0100_set_blue_balance() local
364 struct pb0100_ctrls *ctrls = sd->sensor_priv; in pb0100_set_blue_balance()
372 err = stv06xx_write_sensor(sd, PB_BGAIN, val); in pb0100_set_blue_balance()
381 struct sd *sd = (struct sd *) gspca_dev; in pb0100_set_exposure() local
384 err = stv06xx_write_sensor(sd, PB_RINTTIME, val); in pb0100_set_exposure()
394 struct sd *sd = (struct sd *) gspca_dev; in pb0100_set_autogain() local
395 struct pb0100_ctrls *ctrls = sd->sensor_priv; in pb0100_set_autogain()
405 err = stv06xx_write_sensor(sd, PB_EXPGAIN, val); in pb0100_set_autogain()
415 struct sd *sd = (struct sd *) gspca_dev; in pb0100_set_autogain_target() local
424 err = stv06xx_write_sensor(sd, PB_R21, brightpixels); in pb0100_set_autogain_target()
426 err = stv06xx_write_sensor(sd, PB_R22, darkpixels); in pb0100_set_autogain_target()