summaryrefslogtreecommitdiffstats
path: root/include/media/i2c/s5k6aa.h
blob: fd78e85e8b78e9d6797714ed286a1134c8cb6586 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * S5K6AAFX camera sensor driver header
 *
 * Copyright (C) 2011 Samsung Electronics Co., Ltd.
 */

#ifndef S5K6AA_H
#define S5K6AA_H

#include <media/v4l2-mediabus.h>

/**
 * struct s5k6aa_gpio - data structure describing a GPIO
 * @gpio:  GPIO number
 * @level: indicates active state of the @gpio
 */
struct s5k6aa_gpio {
	int gpio;
	int level;
};

/**
 * struct s5k6aa_platform_data - s5k6aa driver platform data
 * @set_power:   an additional callback to the board code, called
 *               after enabling the regulators and before switching
 *               the sensor off
 * @mclk_frequency: sensor's master clock frequency in Hz
 * @gpio_reset:  GPIO driving RESET pin
 * @gpio_stby:   GPIO driving STBY pin
 * @nlanes:      maximum number of MIPI-CSI lanes used
 * @horiz_flip:  default horizontal image flip value, non zero to enable
 * @vert_flip:   default vertical image flip value, non zero to enable
 */

struct s5k6aa_platform_data {
	int (*set_power)(int enable);
	unsigned long mclk_frequency;
	struct s5k6aa_gpio gpio_reset;
	struct s5k6aa_gpio gpio_stby;
	enum v4l2_mbus_type bus_type;
	u8 nlanes;
	u8 horiz_flip;
	u8 vert_flip;
};

#endif /* S5K6AA_H */