linux/drivers/media/usb/gspca/m5602/m5602_po1030.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Driver for the po1030 sensor.
 *
 * Copyright (c) 2008 Erik Andrén
 * Copyright (c) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.
 * Copyright (c) 2005 m5603x Linux Driver Project <[email protected]>
 *
 * Portions of code to USB interface and ALi driver software,
 * Copyright (c) 2006 Willem Duinker
 * v4l2 interface modeled after the V4L2 driver
 * for SN9C10x PC Camera Controllers
 *
 * Register defines taken from Pascal Stangs Procyon Armlib
 */

#ifndef M5602_PO1030_H_
#define M5602_PO1030_H_

#include "m5602_sensor.h"

/*****************************************************************************/

#define PO1030_DEVID_H
#define PO1030_DEVID_L
#define PO1030_FRAMEWIDTH_H
#define PO1030_FRAMEWIDTH_L
#define PO1030_FRAMEHEIGHT_H
#define PO1030_FRAMEHEIGHT_L
#define PO1030_WINDOWX_H
#define PO1030_WINDOWX_L
#define PO1030_WINDOWY_H
#define PO1030_WINDOWY_L
#define PO1030_WINDOWWIDTH_H
#define PO1030_WINDOWWIDTH_L
#define PO1030_WINDOWHEIGHT_H
#define PO1030_WINDOWHEIGHT_L

#define PO1030_GLOBALIBIAS
#define PO1030_PIXELIBIAS

#define PO1030_GLOBALGAIN
#define PO1030_RED_GAIN
#define PO1030_GREEN_1_GAIN
#define PO1030_BLUE_GAIN
#define PO1030_GREEN_2_GAIN

#define PO1030_INTEGLINES_H
#define PO1030_INTEGLINES_M
#define PO1030_INTEGLINES_L

#define PO1030_CONTROL1
#define PO1030_CONTROL2
#define PO1030_CONTROL3
#define PO1030_CONTROL4

#define PO1030_PERIOD50_H
#define PO1030_PERIOD50_L
#define PO1030_PERIOD60_H
#define PO1030_PERIOD60_L
#define PO1030_REGCLK167
#define PO1030_FLICKER_DELTA50
#define PO1030_FLICKERDELTA60

#define PO1030_ADCOFFSET

/* Gamma Correction Coeffs */
#define PO1030_GC0
#define PO1030_GC1
#define PO1030_GC2
#define PO1030_GC3
#define PO1030_GC4
#define PO1030_GC5
#define PO1030_GC6
#define PO1030_GC7

/* Color Transform Matrix */
#define PO1030_CT0
#define PO1030_CT1
#define PO1030_CT2
#define PO1030_CT3
#define PO1030_CT4
#define PO1030_CT5
#define PO1030_CT6
#define PO1030_CT7
#define PO1030_CT8

#define PO1030_AUTOCTRL1
#define PO1030_AUTOCTRL2

#define PO1030_YTARGET
#define PO1030_GLOBALGAINMIN
#define PO1030_GLOBALGAINMAX

#define PO1030_AWB_RED_TUNING
#define PO1030_AWB_BLUE_TUNING

/* Output format control */
#define PO1030_OUTFORMCTRL1
#define PO1030_OUTFORMCTRL2
#define PO1030_OUTFORMCTRL3
#define PO1030_OUTFORMCTRL4
#define PO1030_OUTFORMCTRL5

#define PO1030_EDGE_ENH_OFF
#define PO1030_EGA

#define PO1030_Cb_U_GAIN
#define PO1030_Cr_V_GAIN

#define PO1030_YCONTRAST
#define PO1030_YSATURATION

#define PO1030_HFLIP
#define PO1030_VFLIP

#define PO1030_HREF_ENABLE

#define PO1030_RAW_RGB_BAYER

#define PO1030_FRAME_EQUAL
#define PO1030_AUTO_SUBSAMPLING

#define PO1030_WEIGHT_WIN_2X

#define PO1030_SHUTTER_MODE
#define PO1030_AUTO_SUBSAMPLING
#define PO1030_FRAME_EQUAL

#define PO1030_SENSOR_RESET

#define PO1030_SUBSAMPLING

/*****************************************************************************/

#define PO1030_GLOBAL_GAIN_DEFAULT
#define PO1030_EXPOSURE_DEFAULT
#define PO1030_BLUE_GAIN_DEFAULT
#define PO1030_RED_GAIN_DEFAULT
#define PO1030_GREEN_GAIN_DEFAULT

/*****************************************************************************/

/* Kernel module parameters */
extern int force_sensor;
extern bool dump_sensor;

int po1030_probe(struct sd *sd);
int po1030_init(struct sd *sd);
int po1030_init_controls(struct sd *sd);
int po1030_start(struct sd *sd);
void po1030_disconnect(struct sd *sd);

static const struct m5602_sensor po1030 =;
#endif