summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorJihoon Bang <jbang@nvidia.com>2012-12-27 10:31:01 -0800
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 12:57:29 -0700
commitb674b4f0f0af4b450c2d64a8926a2696a28507e4 (patch)
treed2184704bfd7a57b5d25eb596e9ac98021b4eec6 /include/video
parent0aed9f3787b98d17ef120625f718ce64df73a177 (diff)
media: video: tegra: camera: move tegra_camera
Move tegra_camera from platform_driver to part of nvhost vi driver. Split tegra_camera.c file into multiple files incluidng camera.c, camera_power.c, camera_emc.c and camera_clk.c according to functionality. tegra_camera is registered/unregistered in nvhost vi driver. Bug 1189789 Reviewed-on: http://git-master/r/174508 (cherry picked from commit e503a08b809844b53b7737e504e9f376f4a8a1eb) Change-Id: Ia8e189e809e18e16b780d3ff064bc96db84ade85 Signed-off-by: Jihoon Bang <jbang@nvidia.com> Reviewed-on: http://git-master/r/194805 Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com> Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/tegra_camera.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/video/tegra_camera.h b/include/video/tegra_camera.h
new file mode 100644
index 000000000000..9dea1485781d
--- /dev/null
+++ b/include/video/tegra_camera.h
@@ -0,0 +1,58 @@
+/*
+ * include/linux/tegra_camera.h
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+#ifndef TEGRA_CAMERA_H
+#define TEGRA_CAMERA_H
+
+/* this is to enable VI pattern generator (Null Sensor) */
+#define TEGRA_CAMERA_ENABLE_PD2VI_CLK 0x1
+
+enum {
+ TEGRA_CAMERA_MODULE_ISP = 0,
+ TEGRA_CAMERA_MODULE_VI,
+ TEGRA_CAMERA_MODULE_CSI,
+ TEGRA_CAMERA_MODULE_EMC,
+ TEGRA_CAMERA_MODULE_MAX
+};
+
+enum {
+ TEGRA_CAMERA_VI_CLK,
+ TEGRA_CAMERA_VI_SENSOR_CLK,
+ TEGRA_CAMERA_EMC_CLK
+};
+
+struct tegra_camera_clk_info {
+ uint id;
+ uint clk_id;
+ unsigned long rate;
+ uint flag; /* to inform if any special bits need to enabled/disabled */
+};
+
+enum StereoCameraMode {
+ Main = 0x0, /* Sets the default camera to Main */
+ StereoCameraMode_Left = 0x01, /* the left camera is on. */
+ StereoCameraMode_Right = 0x02, /* the right camera is on. */
+ StereoCameraMode_Stereo = 0x03, /* both cameras are on. */
+ StereoCameraMode_Force32 = 0x7FFFFFFF
+};
+
+
+#define TEGRA_CAMERA_IOCTL_ENABLE _IOWR('i', 1, uint)
+#define TEGRA_CAMERA_IOCTL_DISABLE _IOWR('i', 2, uint)
+#define TEGRA_CAMERA_IOCTL_CLK_SET_RATE \
+ _IOWR('i', 3, struct tegra_camera_clk_info)
+#define TEGRA_CAMERA_IOCTL_RESET _IOWR('i', 4, uint)
+
+#endif