2 * ov4689.h - ov4689 sensor driver
4 * Copyright (c) 2015 NVIDIA Corporation. All rights reserved.
7 * Jerry Chang <jerchang@nvidia.com>
9 * This file is licensed under the terms of the GNU General Public License
10 * version 2. This program is licensed "as is" without any warranty of any
11 * kind, whether express or implied.
17 #include <linux/ioctl.h>
19 #define OV4689_IOCTL_SET_MODE _IOW('o', 1, struct ov4689_mode)
20 #define OV4689_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32)
21 #define OV4689_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32)
22 #define OV4689_IOCTL_SET_GAIN _IOW('o', 4, __u16)
23 #define OV4689_IOCTL_GET_STATUS _IOR('o', 5, __u8)
24 #define OV4689_IOCTL_SET_GROUP_HOLD _IOW('o', 6, struct ov4689_grouphold)
25 #define OV4689_IOCTL_GET_SENSORDATA _IOR('o', 7, struct ov4689_sensordata)
26 #define OV4689_IOCTL_SET_FLASH _IOW('o', 8, struct ov4689_flash_control)
27 #define OV4689_IOCTL_SET_POWER _IOW('o', 20, __u32)
29 struct ov4689_sensordata {
43 struct ov4689_grouphold {
45 __u8 frame_length_enable;
47 __u8 coarse_time_enable;
52 struct ov4689_flash_control {
61 struct ov4689_power_rail {
62 struct regulator *dvdd;
63 struct regulator *avdd;
64 struct regulator *iovdd;
65 struct regulator *vif;
68 struct ov4689_platform_data {
69 struct ov4689_flash_control flash_cap;
70 int (*power_on)(struct ov4689_power_rail *pw);
71 int (*power_off)(struct ov4689_power_rail *pw);
72 const char *mclk_name;
73 unsigned int reset_gpio;
75 #endif /* __KERNEL__ */
77 #endif /* __OV4689_H__ */