diff options
author | Jihoon Bang <jbang@nvidia.com> | 2011-06-24 10:05:32 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:47:40 -0800 |
commit | 1e66c11f6b40ab5ab6977d932fc502d9a791a638 (patch) | |
tree | a7452547dc5f5a8fbdd04739eb22af616e2105f4 /include/media | |
parent | 0099d1992d5d3684073de0d877633579dec121b5 (diff) |
media: video: tegra: support multiple cameras
Separate board specific sequence from ar0832 driver and add it to board
files. Add function that changes device slave address in real time to support
multiple devices in the same I2C bus.
Bug 844021
Original-Change-Id: I48641909eb531b4ba827096bc30fa4eccf83469e
Reviewed-on: http://git-master/r/40385
Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Tested-by: Jihoon Bang <jbang@nvidia.com>
Rebase-Id: R4b761bd3b09ed2b0101b03e8be737c25e5c3ee5f
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/ar0832_main.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/include/media/ar0832_main.h b/include/media/ar0832_main.h index 436fb9f7de92..6cf45585fd1d 100644 --- a/include/media/ar0832_main.h +++ b/include/media/ar0832_main.h @@ -13,18 +13,18 @@ #include <linux/ioctl.h> /* For IOCTL macros */ -#define AR0832_IOCTL_SET_MODE _IOW('o', 1, struct ar0832_mode) -#define AR0832_IOCTL_SET_FRAME_LENGTH _IOW('o', 2, __u32) -#define AR0832_IOCTL_SET_COARSE_TIME _IOW('o', 3, __u32) -#define AR0832_IOCTL_SET_GAIN _IOW('o', 4, __u16) -#define AR0832_IOCTL_GET_STATUS _IOR('o', 5, __u8) -#define AR0832_IOCTL_GET_OTP _IOR('o', 6, struct ar0832_otp_data) -#define AR0832_IOCTL_TEST_PATTERN _IOW('o', 7, enum ar0832_test_pattern) -#define AR0832_IOCTL_SET_POWER_ON _IOW('o', 10, __u32) -#define AR0832_IOCTL_SET_SENSOR_REGION _IOW('o', 11, struct ar0832_stereo_region) - -#define AR0832_FOCUSER_IOCTL_GET_CONFIG _IOR('o', 12, struct ar0832_focuser_config) -#define AR0832_FOCUSER_IOCTL_SET_POSITION _IOW('o', 13, __u32) +#define AR0832_IOCTL_SET_MODE _IOW('o', 0x01, struct ar0832_mode) +#define AR0832_IOCTL_SET_FRAME_LENGTH _IOW('o', 0x02, __u32) +#define AR0832_IOCTL_SET_COARSE_TIME _IOW('o', 0x03, __u32) +#define AR0832_IOCTL_SET_GAIN _IOW('o', 0x04, __u16) +#define AR0832_IOCTL_GET_STATUS _IOR('o', 0x05, __u8) +#define AR0832_IOCTL_GET_OTP _IOR('o', 0x06, struct ar0832_otp_data) +#define AR0832_IOCTL_TEST_PATTERN _IOW('o', 0x07, enum ar0832_test_pattern) +#define AR0832_IOCTL_SET_POWER_ON _IOW('o', 0x08, struct ar0832_mode) +#define AR0832_IOCTL_SET_SENSOR_REGION _IOW('o', 0x09, struct ar0832_stereo_region) + +#define AR0832_FOCUSER_IOCTL_GET_CONFIG _IOR('o', 0x10, struct ar0832_focuser_config) +#define AR0832_FOCUSER_IOCTL_SET_POSITION _IOW('o', 0x11, __u32) enum ar0832_test_pattern { TEST_PATTERN_NONE, @@ -61,6 +61,7 @@ struct ar0832_mode { __u32 frame_length; __u32 coarse_time; __u16 gain; + int stereo; }; struct ar0832_point{ @@ -84,19 +85,16 @@ struct ar0832_focuser_config { __u32 actuator_range; __u32 pos_low; __u32 pos_high; - /* To-Do */ - /* - float focal_length; - float fnumber; - float max_aperture; - */ + __u32 focal_length; + __u32 fnumber; + __u32 max_aperture; }; #ifdef __KERNEL__ struct ar0832_platform_data { - int (*power_on)(void); - int (*power_off)(void); - + int (*power_on)(int is_stereo); + int (*power_off)(int is_stereo); + char *id; }; #endif /* __KERNEL__ */ |