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
63
64
65
66
67
68
69
70
|
/**
* Copyright (c) 2012 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property
* and proprietary rights in and to this software and related documentation
* and any modifications thereto. Any use, reproduction, disclosure or
* distribution of this software and related documentation without an express
* license agreement from NVIDIA Corporation is strictly prohibited.
*/
#ifndef __IMX132_H__
#define __IMX132_H__
#include <linux/ioctl.h> /* For IOCTL macros */
#define IMX132_IOCTL_SET_MODE _IOW('o', 1, struct imx132_mode)
#define IMX132_IOCTL_GET_STATUS _IOR('o', 2, __u8)
#define IMX132_IOCTL_SET_FRAME_LENGTH _IOW('o', 3, __u32)
#define IMX132_IOCTL_SET_COARSE_TIME _IOW('o', 4, __u32)
#define IMX132_IOCTL_SET_GAIN _IOW('o', 5, __u16)
#define IMX132_IOCTL_GET_SENSORDATA _IOR('o', 6, struct imx132_sensordata)
#define IMX132_IOCTL_SET_GROUP_HOLD _IOW('o', 7, struct imx132_ae)
/* IMX132 registers */
#define IMX132_GROUP_PARAM_HOLD (0x0104)
#define IMX132_COARSE_INTEGRATION_TIME_15_8 (0x0202)
#define IMX132_COARSE_INTEGRATION_TIME_7_0 (0x0203)
#define IMX132_ANA_GAIN_GLOBAL (0x0205)
#define IMX132_FRAME_LEN_LINES_15_8 (0x0340)
#define IMX132_FRAME_LEN_LINES_7_0 (0x0341)
#define NUM_OF_FRAME_LEN_REG 2
#define NUM_OF_COARSE_TIME_REG 2
#define NUM_OF_SENSOR_ID_SPECIFIC_REG 8
struct imx132_mode {
int xres;
int yres;
__u32 frame_length;
__u32 coarse_time;
__u16 gain;
};
struct imx132_ae {
__u32 frame_length;
__u8 frame_length_enable;
__u32 coarse_time;
__u8 coarse_time_enable;
__s32 gain;
__u8 gain_enable;
};
struct imx132_sensordata {
__u32 fuse_id_size;
__u8 fuse_id[16];
};
#ifdef __KERNEL__
struct imx132_power_rail {
struct regulator *dvdd;
struct regulator *avdd;
struct regulator *iovdd;
};
struct imx132_platform_data {
int (*power_on)(struct imx132_power_rail *pw);
int (*power_off)(struct imx132_power_rail *pw);
};
#endif /* __KERNEL__ */
#endif /* __IMX132_H__ */
|