treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372
[linux-2.6-block.git] / drivers / media / usb / gspca / m5602 / m5602_s5k83a.h
CommitLineData
a10e763b 1/* SPDX-License-Identifier: GPL-2.0-only */
c109f816
EA
2/*
3 * Driver for the s5k83a sensor
4 *
0c505e68 5 * Copyright (C) 2008 Erik Andrén
c109f816
EA
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>
8 *
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
c109f816
EA
13 */
14
15#ifndef M5602_S5K83A_H_
16#define M5602_S5K83A_H_
17
18#include "m5602_sensor.h"
19
ac3d5bfe
LK
20#define S5K83A_FLIP 0x01
21#define S5K83A_HFLIP_TUNE 0x03
22#define S5K83A_VFLIP_TUNE 0x05
23#define S5K83A_BRIGHTNESS 0x0a
24#define S5K83A_EXPOSURE 0x18
25#define S5K83A_GAIN 0x1b
26#define S5K83A_PAGE_MAP 0xec
27
28#define S5K83A_DEFAULT_GAIN 0x71
29#define S5K83A_DEFAULT_BRIGHTNESS 0x7e
30#define S5K83A_DEFAULT_EXPOSURE 0x00
31#define S5K83A_MAXIMUM_EXPOSURE 0x3c
32#define S5K83A_FLIP_MASK 0x10
4a7581f0 33#define S5K83A_GPIO_LED_MASK 0x10
780e3121 34#define S5K83A_GPIO_ROTATION_MASK 0x40
c109f816
EA
35
36/*****************************************************************************/
37
38/* Kernel module parameters */
39extern int force_sensor;
90ab5ee9 40extern bool dump_sensor;
c109f816
EA
41
42int s5k83a_probe(struct sd *sd);
43int s5k83a_init(struct sd *sd);
c84e412f 44int s5k83a_init_controls(struct sd *sd);
4a7581f0
LK
45int s5k83a_start(struct sd *sd);
46int s5k83a_stop(struct sd *sd);
ac3d5bfe 47void s5k83a_disconnect(struct sd *sd);
c109f816 48
dac136e6 49static const struct m5602_sensor s5k83a = {
e4cc4fcc
EA
50 .name = "S5K83A",
51 .probe = s5k83a_probe,
52 .init = s5k83a_init,
c84e412f 53 .init_controls = s5k83a_init_controls,
e4cc4fcc
EA
54 .start = s5k83a_start,
55 .stop = s5k83a_stop,
ac3d5bfe 56 .disconnect = s5k83a_disconnect,
e4cc4fcc
EA
57 .i2c_slave_id = 0x5a,
58 .i2c_regW = 2,
c109f816 59};
c109f816 60#endif