1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * S5K6AAFX camera sensor driver header
4  *
5  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
6  */
7 
8 #ifndef S5K6AA_H
9 #define S5K6AA_H
10 
11 #include <media/v4l2-mediabus.h>
12 
13 /**
14  * struct s5k6aa_gpio - data structure describing a GPIO
15  * @gpio:  GPIO number
16  * @level: indicates active state of the @gpio
17  */
18 struct s5k6aa_gpio {
19 	int gpio;
20 	int level;
21 };
22 
23 /**
24  * struct s5k6aa_platform_data - s5k6aa driver platform data
25  * @set_power:   an additional callback to the board code, called
26  *               after enabling the regulators and before switching
27  *               the sensor off
28  * @mclk_frequency: sensor's master clock frequency in Hz
29  * @gpio_reset:  GPIO driving RESET pin
30  * @gpio_stby:   GPIO driving STBY pin
31  * @bus_type:    bus type
32  * @nlanes:      maximum number of MIPI-CSI lanes used
33  * @horiz_flip:  default horizontal image flip value, non zero to enable
34  * @vert_flip:   default vertical image flip value, non zero to enable
35  */
36 
37 struct s5k6aa_platform_data {
38 	int (*set_power)(int enable);
39 	unsigned long mclk_frequency;
40 	struct s5k6aa_gpio gpio_reset;
41 	struct s5k6aa_gpio gpio_stby;
42 	enum v4l2_mbus_type bus_type;
43 	u8 nlanes;
44 	u8 horiz_flip;
45 	u8 vert_flip;
46 };
47 
48 #endif /* S5K6AA_H */
49