Linux Audio

Check our new training course

Loading...
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * Driver for the s5k83a sensor
 4 *
 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>
 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
13 */
14
15#ifndef M5602_S5K83A_H_
16#define M5602_S5K83A_H_
17
18#include "m5602_sensor.h"
19
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
33#define S5K83A_GPIO_LED_MASK		0x10
34#define S5K83A_GPIO_ROTATION_MASK	0x40
35
36/*****************************************************************************/
37
38/* Kernel module parameters */
39extern int force_sensor;
40extern bool dump_sensor;
41
42int s5k83a_probe(struct sd *sd);
43int s5k83a_init(struct sd *sd);
44int s5k83a_init_controls(struct sd *sd);
45int s5k83a_start(struct sd *sd);
46int s5k83a_stop(struct sd *sd);
47void s5k83a_disconnect(struct sd *sd);
48
49static const struct m5602_sensor s5k83a = {
50	.name = "S5K83A",
51	.probe = s5k83a_probe,
52	.init = s5k83a_init,
53	.init_controls = s5k83a_init_controls,
54	.start = s5k83a_start,
55	.stop = s5k83a_stop,
56	.disconnect = s5k83a_disconnect,
57	.i2c_slave_id = 0x5a,
58	.i2c_regW = 2,
59};
60#endif