Re: [PATCH 4/8] OMAPDSS: HDMI: use vdda_hdmi_dac
From: Archit Taneja <hidden>
Date: 2012-08-24 06:32:23
Also in:
linux-omap
On Thursday 23 August 2012 07:15 PM, Tomi Valkeinen wrote:
quoted hunk ↗ jump to hunk
The HDMI driver requires vdda_hdmi_dac power for operation, but does not enable it. This has worked because the regulator has been always enabled. But this may not always be the case, as I encountered when implementing HDMI device tree support. This patch changes the HDMI driver to use the vdda_hdmi_dac. Signed-off-by: Tomi Valkeinen <redacted> --- drivers/video/omap2/dss/hdmi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 96a6e29..ccfc677 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c@@ -33,6 +33,7 @@ #include <linux/pm_runtime.h> #include <linux/clk.h> #include <linux/gpio.h> +#include <linux/regulator/consumer.h> #include <video/omapdss.h> #include "ti_hdmi.h"@@ -62,6 +63,7 @@ static struct { struct hdmi_ip_data ip_data; struct clk *sys_clk; + struct regulator *vdda_hdmi_dac_reg; int ct_cp_hpd_gpio; int ls_oe_gpio;@@ -331,6 +333,19 @@ static int __init hdmi_init_display(struct omap_dss_device *dssdev) dss_init_hdmi_ip_ops(&hdmi.ip_data); + if (hdmi.vdda_hdmi_dac_reg = NULL) { + struct regulator *reg; + + reg = devm_regulator_get(&hdmi.pdev->dev, "vdda_hdmi_dac");
There is no corresponding devm_regulator_put() call here, I guess that's what devm_* calls are supposed to help us with. But the only place I saw the usage of dev_regulator_get() is here: sound/soc/ux500/ux500_msp_dai.c And here, they are doing devm_regulator_put() calls to, so I was wondering what the deal is. Archit