All of lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <a0393947@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 4/8] OMAPDSS: HDMI: use vdda_hdmi_dac
Date: Fri, 24 Aug 2012 06:32:23 +0000	[thread overview]
Message-ID: <50371D27.1010707@ti.com> (raw)
In-Reply-To: <1345729514-2441-5-git-send-email-tomi.valkeinen@ti.com>

On Thursday 23 August 2012 07:15 PM, Tomi Valkeinen wrote:
> 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 <tomi.valkeinen@ti.com>
> ---
>   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


WARNING: multiple messages have this Message-ID (diff)
From: Archit Taneja <a0393947@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 4/8] OMAPDSS: HDMI: use vdda_hdmi_dac
Date: Fri, 24 Aug 2012 11:50:23 +0530	[thread overview]
Message-ID: <50371D27.1010707@ti.com> (raw)
In-Reply-To: <1345729514-2441-5-git-send-email-tomi.valkeinen@ti.com>

On Thursday 23 August 2012 07:15 PM, Tomi Valkeinen wrote:
> 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 <tomi.valkeinen@ti.com>
> ---
>   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


  reply	other threads:[~2012-08-24  6:32 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 13:45 [PATCH 0/8] OMAPDSS: Misc improvements Tomi Valkeinen
2012-08-23 13:45 ` Tomi Valkeinen
2012-08-23 13:45 ` [PATCH 1/8] OMAPDSS: HDMI: Move GPIO handling to HDMI driver Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-08-24  6:00   ` Archit Taneja
2012-08-24  6:12     ` Archit Taneja
2012-08-24  6:28     ` Tomi Valkeinen
2012-08-24  6:28       ` Tomi Valkeinen
2012-09-07 16:21   ` Tony Lindgren
2012-09-07 16:21     ` Tony Lindgren
2012-08-23 13:45 ` [PATCH 2/8] OMAPDSS: HDMI: Add delay to wait for 5V power Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-08-23 13:45 ` [PATCH 3/8] OMAP4: TWL: add vdda_hdmi_dac regulator supply Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-09-06 20:12   ` Tony Lindgren
2012-09-06 20:12     ` Tony Lindgren
2012-08-23 13:45 ` [PATCH 4/8] OMAPDSS: HDMI: use vdda_hdmi_dac Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-08-24  6:20   ` Archit Taneja [this message]
2012-08-24  6:32     ` Archit Taneja
2012-08-24  6:41     ` Tomi Valkeinen
2012-08-24  6:41       ` Tomi Valkeinen
2012-08-23 13:45 ` [PATCH 5/8] OMAPDSS: Add DSI fclk maximum to dss_features Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-08-23 13:45 ` [PATCH 6/8] OMAPDSS: DSI: calculate dsi clock Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-08-24  6:16   ` Archit Taneja
2012-08-24  6:28     ` Archit Taneja
2012-08-24  8:55     ` Tomi Valkeinen
2012-08-24  8:55       ` Tomi Valkeinen
2012-08-24  9:17       ` Archit Taneja
2012-08-24  9:29         ` Archit Taneja
2012-08-23 13:45 ` [PATCH 7/8] OMAP: 4430SDP: remove DSI clock config from board file Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-09-06 20:11   ` Tony Lindgren
2012-09-06 20:11     ` Tony Lindgren
2012-08-23 13:45 ` [PATCH 8/8] OMAPDSS: fix use of dssdev->caps Tomi Valkeinen
2012-08-23 13:45   ` Tomi Valkeinen
2012-08-24  5:51   ` Archit Taneja
2012-08-24  5:52     ` Archit Taneja
2012-09-04  7:22 ` [PATCH 0/8] OMAPDSS: Misc improvements Tomi Valkeinen
2012-09-04  7:22   ` Tomi Valkeinen
2012-09-06 20:13   ` Tony Lindgren
2012-09-06 20:13     ` Tony Lindgren
2012-09-07 10:16     ` Tomi Valkeinen
2012-09-07 10:16       ` Tomi Valkeinen
2012-09-07 16:22       ` Tony Lindgren
2012-09-07 16:22         ` Tony Lindgren
2012-09-07 16:59         ` Tomi Valkeinen
2012-09-07 16:59           ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50371D27.1010707@ti.com \
    --to=a0393947@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.