aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-omap-pm/dss2/0090-DSS2-VENC-venc-uses-regulator-framework.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux/linux-omap-pm/dss2/0090-DSS2-VENC-venc-uses-regulator-framework.patch')
-rw-r--r--recipes/linux/linux-omap-pm/dss2/0090-DSS2-VENC-venc-uses-regulator-framework.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-pm/dss2/0090-DSS2-VENC-venc-uses-regulator-framework.patch b/recipes/linux/linux-omap-pm/dss2/0090-DSS2-VENC-venc-uses-regulator-framework.patch
new file mode 100644
index 0000000000..91870fe489
--- /dev/null
+++ b/recipes/linux/linux-omap-pm/dss2/0090-DSS2-VENC-venc-uses-regulator-framework.patch
@@ -0,0 +1,74 @@
+From 5c06f74553d932aee9cba73ca2620a16f1bb610e Mon Sep 17 00:00:00 2001
+From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
+Date: Thu, 28 May 2009 17:01:35 +0300
+Subject: [PATCH 090/146] DSS2: VENC: venc uses regulator framework
+
+Venc needs vdda_dac regulator
+---
+ drivers/video/omap2/dss/venc.c | 15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
+index a83d170..d06dc38 100644
+--- a/drivers/video/omap2/dss/venc.c
++++ b/drivers/video/omap2/dss/venc.c
+@@ -32,6 +32,7 @@
+ #include <linux/string.h>
+ #include <linux/seq_file.h>
+ #include <linux/platform_device.h>
++#include <linux/regulator/consumer.h>
+
+ #include <mach/display.h>
+ #include <mach/cpu.h>
+@@ -291,6 +292,7 @@ static struct {
+ void __iomem *base;
+ struct mutex venc_lock;
+ u32 wss_data;
++ struct regulator *vdda_dac_reg;
+ } venc;
+
+ static inline void venc_write_reg(int idx, u32 val)
+@@ -480,6 +482,13 @@ int venc_init(struct platform_device *pdev)
+ return -ENOMEM;
+ }
+
++ venc.vdda_dac_reg = regulator_get(&pdev->dev, "vdda_dac");
++ if (IS_ERR(venc.vdda_dac_reg)) {
++ iounmap(venc.base);
++ DSSERR("can't get VDDA_DAC regulator\n");
++ return PTR_ERR(venc.vdda_dac_reg);
++ }
++
+ venc_enable_clocks(1);
+
+ rev_id = (u8)(venc_read_reg(VENC_REV_ID) & 0xff);
+@@ -496,6 +505,8 @@ void venc_exit(void)
+ {
+ omap_dss_unregister_driver(&venc_driver);
+
++ regulator_put(venc.vdda_dac_reg);
++
+ iounmap(venc.base);
+ }
+
+@@ -521,6 +532,8 @@ static void venc_power_on(struct omap_dss_device *dssdev)
+ dispc_set_digit_size(dssdev->panel.timings.x_res,
+ dssdev->panel.timings.y_res/2);
+
++ regulator_enable(venc.vdda_dac_reg);
++
+ if (dssdev->platform_enable)
+ dssdev->platform_enable(dssdev);
+
+@@ -537,6 +550,8 @@ static void venc_power_off(struct omap_dss_device *dssdev)
+ if (dssdev->platform_disable)
+ dssdev->platform_disable(dssdev);
+
++ regulator_disable(venc.vdda_dac_reg);
++
+ venc_enable_clocks(0);
+ }
+
+--
+1.6.2.4
+