summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos4-is/media-dev.h
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-03-21 14:49:16 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-04 20:17:27 -0300
commite781bbe3fecf05ab8f3c05fd0b693bebb5e489d5 (patch)
tree5a1736f544f0f0b140c486de12795b23151f5f83 /drivers/media/platform/exynos4-is/media-dev.h
parent0580abc2b5d04fca31578c7a9cc4adc0ed3677ac (diff)
[media] exynos4-is: Add fimc-is subdevs registration
This patch adds support for registration of the FIMC-IS device represented by the FIMC-IS-ISP subdev to the top level media device driver. The FIMC-IS subsystem is available on Exynos4x12 SoCs which support only device tree based booting. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is/media-dev.h')
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.h b/drivers/media/platform/exynos4-is/media-dev.h
index 1d5cea5a6bbe..0b14cd575747 100644
--- a/drivers/media/platform/exynos4-is/media-dev.h
+++ b/drivers/media/platform/exynos4-is/media-dev.h
@@ -12,6 +12,7 @@
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/mutex.h>
+#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <media/media-device.h>
#include <media/media-entity.h>
@@ -80,6 +81,7 @@ struct fimc_sensor_info {
* @num_sensors: actual number of registered sensors
* @camclk: external sensor clock information
* @fimc: array of registered fimc devices
+ * @fimc_is: fimc-is data structure
* @use_isp: set to true when FIMC-IS subsystem is used
* @pmf: handle to the CAMCLK clock control FIMC helper device
* @media_dev: top level media device
@@ -99,6 +101,7 @@ struct fimc_md {
struct clk *wbclk[FIMC_MAX_WBCLKS];
struct fimc_lite *fimc_lite[FIMC_LITE_MAX_DEVS];
struct fimc_dev *fimc[FIMC_MAX_DEVS];
+ struct fimc_is *fimc_is;
bool use_isp;
struct device *pmf;
struct media_device media_dev;
@@ -139,4 +142,14 @@ static inline void fimc_md_graph_unlock(struct fimc_dev *fimc)
int fimc_md_set_camclk(struct v4l2_subdev *sd, bool on);
+#ifdef CONFIG_OF
+static inline bool fimc_md_is_isp_available(struct device_node *node)
+{
+ node = of_get_child_by_name(node, FIMC_IS_OF_NODE_NAME);
+ return node ? of_device_is_available(node) : false;
+}
+#else
+#define fimc_md_is_isp_available(node) (false)
+#endif /* CONFIG_OF */
+
#endif