// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2001 Jean-Fredric Clere, Nikolas Zimmermann, Georg Acher * Mark Cave-Ayland, Carlo E Prelz, Dick Streefland * Copyright (c) 2002, 2003 Tuukka Toivonen * Copyright (c) 2008 Erik Andrén * * P/N 861037: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express * P/N 861055: Sensor ST VV6410 ASIC STV0610 - LEGO cam * P/N 861075-0040: Sensor HDCS1000 ASIC * P/N 961179-0700: Sensor ST VV6410 ASIC STV0602 - Dexxa WebCam USB * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web */ /* * The spec file for the PB-0100 suggests the following for best quality * images after the sensor has been reset : * * PB_ADCGAINL = R60 = 0x03 (3 dec) : sets low reference of ADC to produce good black level * PB_PREADCTRL = R32 = 0x1400 (5120 dec) : Enables global gain changes through R53 * PB_ADCMINGAIN = R52 = 0x10 (16 dec) : Sets the minimum gain for auto-exposure * PB_ADCGLOBALGAIN = R53 = 0x10 (16 dec) : Sets the global gain * PB_EXPGAIN = R14 = 0x11 (17 dec) : Sets the auto-exposure value * PB_UPDATEINT = R23 = 0x02 (2 dec) : Sets the speed on auto-exposure routine * PB_CFILLIN = R5 = 0x0E (14 dec) : Sets the frame rate */ #define pr_fmt(fmt) … #include "stv06xx_pb0100.h" struct pb0100_ctrls { … }; static struct v4l2_pix_format pb0100_mode[] = …; static int pb0100_s_ctrl(struct v4l2_ctrl *ctrl) { … } static const struct v4l2_ctrl_ops pb0100_ctrl_ops = …; static int pb0100_init_controls(struct sd *sd) { … } static int pb0100_probe(struct sd *sd) { … } static int pb0100_start(struct sd *sd) { … } static int pb0100_stop(struct sd *sd) { … } /* FIXME: Sort the init commands out and put them into tables, this is only for getting the camera to work */ /* FIXME: No error handling for now, add this once the init has been converted to proper tables */ static int pb0100_init(struct sd *sd) { … } static int pb0100_dump(struct sd *sd) { … } static int pb0100_set_gain(struct gspca_dev *gspca_dev, __s32 val) { … } static int pb0100_set_red_balance(struct gspca_dev *gspca_dev, __s32 val) { … } static int pb0100_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val) { … } static int pb0100_set_exposure(struct gspca_dev *gspca_dev, __s32 val) { … } static int pb0100_set_autogain(struct gspca_dev *gspca_dev, __s32 val) { … } static int pb0100_set_autogain_target(struct gspca_dev *gspca_dev, __s32 val) { … }