treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / usb / gspca / m5602 / m5602_sensor.h
blob46b7297fb115bc75b12287adf4a43fa2e7b971ab
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * USB Driver for ALi m5602 based webcams
5 * Copyright (C) 2008 Erik Andrén
6 * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.
7 * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br>
9 * Portions of code to USB interface and ALi driver software,
10 * Copyright (c) 2006 Willem Duinker
11 * v4l2 interface modeled after the V4L2 driver
12 * for SN9C10x PC Camera Controllers
15 #ifndef M5602_SENSOR_H_
16 #define M5602_SENSOR_H_
18 #include "m5602_bridge.h"
20 #define M5602_V4L2_CID_GREEN_BALANCE (V4L2_CID_PRIVATE_BASE + 0)
21 #define M5602_V4L2_CID_NOISE_SUPPRESION (V4L2_CID_PRIVATE_BASE + 1)
23 /* Enumerates all supported sensors */
24 enum sensors {
25 OV9650_SENSOR = 1,
26 S5K83A_SENSOR = 2,
27 S5K4AA_SENSOR = 3,
28 MT9M111_SENSOR = 4,
29 PO1030_SENSOR = 5,
30 OV7660_SENSOR = 6,
33 /* Enumerates all possible instruction types */
34 enum instruction {
35 BRIDGE,
36 SENSOR,
37 SENSOR_LONG
40 struct m5602_sensor {
41 /* Defines the name of a sensor */
42 char name[32];
44 /* What i2c address the sensor is connected to */
45 u8 i2c_slave_id;
47 /* Width of each i2c register (in bytes) */
48 u8 i2c_regW;
50 /* Probes if the sensor is connected */
51 int (*probe)(struct sd *sd);
53 /* Performs a initialization sequence */
54 int (*init)(struct sd *sd);
56 /* Controls initialization, maybe NULL */
57 int (*init_controls)(struct sd *sd);
59 /* Executed when the camera starts to send data */
60 int (*start)(struct sd *sd);
62 /* Executed when the camera ends to send data */
63 int (*stop)(struct sd *sd);
65 /* Executed when the device is disconnected */
66 void (*disconnect)(struct sd *sd);
69 #endif