blob: 5d58180123e049dfeecce4f69854b8a24c6db6dd (
plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/*
* imx091.h
*
* Copyright (c) 2012-2013, NVIDIA Corporation. All Rights Reserved.
*
* This file is licensed under the terms of the GNU General Public License
* version 2. This program is licensed "as is" without any warranty of any
* kind, whether express or implied.
*/
#ifndef __IMX091_H__
#define __IMX091_H__
#include <media/nvc.h>
#include <media/nvc_image.h>
/* See notes in the nvc.h file on the GPIO usage */
enum imx091_gpio {
IMX091_GPIO_RESET = 0,
IMX091_GPIO_PWDN,
IMX091_GPIO_GP1,
};
/* The enumeration must be in the order the regulators are to be enabled */
/* See Power Requirements note in the driver */
enum imx091_vreg {
IMX091_VREG_DVDD = 0,
IMX091_VREG_AVDD,
IMX091_VREG_IOVDD,
};
struct imx091_flash_config {
u8 xvs_trigger_enabled;
u8 sdo_trigger_enabled;
u8 adjustable_flash_timing;
u16 pulse_width_uS;
};
struct imx091_platform_data {
unsigned cfg;
unsigned num;
unsigned sync;
const char *dev_name;
unsigned gpio_count; /* see nvc.h GPIO notes */
struct nvc_gpio_pdata *gpio; /* see nvc.h GPIO notes */
struct imx091_flash_config flash_cap;
struct nvc_imager_cap *cap;
unsigned lens_focal_length; /* / _INT2FLOAT_DIVISOR */
unsigned lens_max_aperture; /* / _INT2FLOAT_DIVISOR */
unsigned lens_fnumber; /* / _INT2FLOAT_DIVISOR */
unsigned lens_view_angle_h; /* / _INT2FLOAT_DIVISOR */
unsigned lens_view_angle_v; /* / _INT2FLOAT_DIVISOR */
bool vcm_vdd;
bool i2c_vdd;
const char *mclk_name; /* NULL for default default_mclk */
int (*probe_clock)(unsigned long);
int (*power_on)(struct nvc_regulator *);
int (*power_off)(struct nvc_regulator *);
int (*detect)(void *buf, size_t size);
};
#endif /* __IMX091_H__ */
|