summaryrefslogtreecommitdiff
path: root/include/media/ar0832_focuser.h
diff options
context:
space:
mode:
authorJihoon Bang <jbang@nvidia.com>2011-06-15 12:27:09 -0700
committerShail Dave <sdave@nvidia.com>2011-06-16 18:16:29 -0700
commit3dcb6d5c3b5af6b079a4aabbb899c4332492bebc (patch)
treeb2b686942f8f53148f0739f65e0409d7a24be91c /include/media/ar0832_focuser.h
parent26540715d3beaab810a8c127e7594520081c3fa1 (diff)
media: video: tegra: enable ar0832 sensortegra-12r2
[DO NOT INTEGRATE TO MAIN] Support only one sensor for now. Change-Id: Ic4d8bf622559616a03533f2f952194048eac6aea Reviewed-on: http://git-master/r/37136 Tested-by: Jihoon Bang <jbang@nvidia.com> Reviewed-by: Shail Dave <sdave@nvidia.com>
Diffstat (limited to 'include/media/ar0832_focuser.h')
-rw-r--r--include/media/ar0832_focuser.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/include/media/ar0832_focuser.h b/include/media/ar0832_focuser.h
new file mode 100644
index 000000000000..e1258629b89a
--- /dev/null
+++ b/include/media/ar0832_focuser.h
@@ -0,0 +1,56 @@
+/*
+* ar0832_focuser.h
+*
+* Copyright (c) 2011, NVIDIA, 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 __AR0832_FOCUSER_H__
+#define __AR0832_FOCUSER_H__
+
+#include <linux/ioctl.h> /* For IOCTL macros */
+#include <linux/i2c.h>
+
+#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_FOCUSER_IOCTL_SET_MODE _IOW('o', 14, __u32)
+
+struct ar0832_focuser_config {
+ __u32 settle_time;
+ __u32 actuator_range;
+ __u32 pos_low;
+ __u32 pos_high;
+ /* To-Do */
+ /*
+ float focal_length;
+ float fnumber;
+ float max_aperture;
+ */
+};
+
+enum StereoCameraMode {
+ MAIN = 0,
+ /* Sets the stereo camera to stereo mode. */
+ STEREO = 1,
+ /* Only the sensor on the left is on. */
+ LEFT_ONLY,
+ /* Only the sensor on the right is on. */
+ RIGHT_ONLY,
+ /* Ignore -- Forces compilers to make 32-bit enums. */
+ StereoCameraMode_Force32 = 0x7FFFFFFF
+};
+
+struct ar0832_focuser_info {
+ struct i2c_client *i2c_client;
+ struct i2c_client *i2c_client_right;
+ struct regulator *regulator;
+ struct ar0832_focuser_config config;
+ __u8 focuser_init_flag;
+
+ enum StereoCameraMode camera_mode;
+};
+
+#endif /* __AR0832_FOCUSER_H__ */