Lines Matching refs:err
94 int err = -EINVAL; in pb0100_s_ctrl() local
98 err = pb0100_set_autogain(gspca_dev, ctrl->val); in pb0100_s_ctrl()
99 if (err) in pb0100_s_ctrl()
103 err = pb0100_set_gain(gspca_dev, ctrls->gain->val); in pb0100_s_ctrl()
104 if (err) in pb0100_s_ctrl()
106 err = pb0100_set_exposure(gspca_dev, ctrls->exposure->val); in pb0100_s_ctrl()
109 err = pb0100_set_autogain_target(gspca_dev, ctrl->val); in pb0100_s_ctrl()
112 return err; in pb0100_s_ctrl()
171 int err; in pb0100_probe() local
173 err = stv06xx_read_sensor(sd, PB_IDENT, &sensor); in pb0100_probe()
175 if (err < 0) in pb0100_probe()
190 int err, packet_size, max_packet_size; in pb0100_start() local
235 err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)|BIT(1)); in pb0100_start()
236 PDEBUG(D_STREAM, "Started stream, status: %d", err); in pb0100_start()
238 return (err < 0) ? err : 0; in pb0100_start()
244 int err; in pb0100_stop() local
246 err = stv06xx_write_sensor(sd, PB_ABORTFRAME, 1); in pb0100_stop()
248 if (err < 0) in pb0100_stop()
252 err = stv06xx_write_sensor(sd, PB_CONTROL, BIT(5)|BIT(3)); in pb0100_stop()
256 return (err < 0) ? err : 0; in pb0100_stop()
332 int err; in pb0100_set_gain() local
336 err = stv06xx_write_sensor(sd, PB_G1GAIN, val); in pb0100_set_gain()
337 if (!err) in pb0100_set_gain()
338 err = stv06xx_write_sensor(sd, PB_G2GAIN, val); in pb0100_set_gain()
339 PDEBUG(D_CONF, "Set green gain to %d, status: %d", val, err); in pb0100_set_gain()
341 if (!err) in pb0100_set_gain()
342 err = pb0100_set_red_balance(gspca_dev, ctrls->red->val); in pb0100_set_gain()
343 if (!err) in pb0100_set_gain()
344 err = pb0100_set_blue_balance(gspca_dev, ctrls->blue->val); in pb0100_set_gain()
346 return err; in pb0100_set_gain()
351 int err; in pb0100_set_red_balance() local
361 err = stv06xx_write_sensor(sd, PB_RGAIN, val); in pb0100_set_red_balance()
362 PDEBUG(D_CONF, "Set red gain to %d, status: %d", val, err); in pb0100_set_red_balance()
364 return err; in pb0100_set_red_balance()
369 int err; in pb0100_set_blue_balance() local
379 err = stv06xx_write_sensor(sd, PB_BGAIN, val); in pb0100_set_blue_balance()
380 PDEBUG(D_CONF, "Set blue gain to %d, status: %d", val, err); in pb0100_set_blue_balance()
382 return err; in pb0100_set_blue_balance()
388 int err; in pb0100_set_exposure() local
390 err = stv06xx_write_sensor(sd, PB_RINTTIME, val); in pb0100_set_exposure()
391 PDEBUG(D_CONF, "Set exposure to %d, status: %d", val, err); in pb0100_set_exposure()
393 return err; in pb0100_set_exposure()
398 int err; in pb0100_set_autogain() local
410 err = stv06xx_write_sensor(sd, PB_EXPGAIN, val); in pb0100_set_autogain()
412 val, ctrls->natural->val, err); in pb0100_set_autogain()
414 return err; in pb0100_set_autogain()
419 int err, totalpixels, brightpixels, darkpixels; in pb0100_set_autogain_target() local
429 err = stv06xx_write_sensor(sd, PB_R21, brightpixels); in pb0100_set_autogain_target()
430 if (!err) in pb0100_set_autogain_target()
431 err = stv06xx_write_sensor(sd, PB_R22, darkpixels); in pb0100_set_autogain_target()
433 PDEBUG(D_CONF, "Set autogain target to %d, status: %d", val, err); in pb0100_set_autogain_target()
435 return err; in pb0100_set_autogain_target()