From: Roger Quadros <roger.quadros@nokia.com> To: Tomi.Valkeinen@nokia.com Cc: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCHv2 3/3] OMAP: DSS2: Use vdds_sdi regulator supply in SDI Date: Wed, 17 Mar 2010 12:35:21 +0000 [thread overview] Message-ID: <1268829321-29769-4-git-send-email-roger.quadros@nokia.com> (raw) In-Reply-To: <1268829321-29769-3-git-send-email-roger.quadros@nokia.com> From: Roger Quadros <roger.quadros@nokia.com> This patch enables the use of vdds_sdi regulator in SDI subsystem. We can disable the vdds_sdi voltage when not in use to save power. Signed-off-by: Roger Quadros <roger.quadros@nokia.com> --- drivers/video/omap2/dss/sdi.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 3de3c1e..ee07a3c 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -23,13 +23,16 @@ #include <linux/clk.h> #include <linux/delay.h> #include <linux/err.h> +#include <linux/regulator/consumer.h> #include <plat/display.h> +#include <plat/cpu.h> #include "dss.h" static struct { bool skip_init; bool update_enabled; + struct regulator *vdds_sdi_reg; } sdi; static void sdi_basic_init(void) @@ -57,6 +60,10 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) goto err0; } + r = regulator_enable(sdi.vdds_sdi_reg); + if (r) + goto err1; + /* In case of skip_init sdi_init has already enabled the clocks */ if (!sdi.skip_init) dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1); @@ -120,6 +127,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) return 0; err2: dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1); + regulator_disable(sdi.vdds_sdi_reg); err1: omap_dss_stop_device(dssdev); err0: @@ -135,6 +143,8 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1); + regulator_disable(sdi.vdds_sdi_reg); + omap_dss_stop_device(dssdev); } EXPORT_SYMBOL(omapdss_sdi_display_disable); @@ -151,6 +161,11 @@ int sdi_init(bool skip_init) /* we store this for first display enable, then clear it */ sdi.skip_init = skip_init; + sdi.vdds_sdi_reg = dss_get_vdds_sdi(); + if (IS_ERR(sdi.vdds_sdi_reg)) { + DSSERR("can't get VDDS_SDI regulator\n"); + return PTR_ERR(sdi.vdds_sdi_reg); + } /* * Enable clocks already here, otherwise there would be a toggle * of them until sdi_display_enable is called. -- 1.6.3.3
WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <roger.quadros@nokia.com> To: Tomi.Valkeinen@nokia.com Cc: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCHv2 3/3] OMAP: DSS2: Use vdds_sdi regulator supply in SDI Date: Wed, 17 Mar 2010 14:35:21 +0200 [thread overview] Message-ID: <1268829321-29769-4-git-send-email-roger.quadros@nokia.com> (raw) In-Reply-To: <1268829321-29769-3-git-send-email-roger.quadros@nokia.com> From: Roger Quadros <roger.quadros@nokia.com> This patch enables the use of vdds_sdi regulator in SDI subsystem. We can disable the vdds_sdi voltage when not in use to save power. Signed-off-by: Roger Quadros <roger.quadros@nokia.com> --- drivers/video/omap2/dss/sdi.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 3de3c1e..ee07a3c 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -23,13 +23,16 @@ #include <linux/clk.h> #include <linux/delay.h> #include <linux/err.h> +#include <linux/regulator/consumer.h> #include <plat/display.h> +#include <plat/cpu.h> #include "dss.h" static struct { bool skip_init; bool update_enabled; + struct regulator *vdds_sdi_reg; } sdi; static void sdi_basic_init(void) @@ -57,6 +60,10 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) goto err0; } + r = regulator_enable(sdi.vdds_sdi_reg); + if (r) + goto err1; + /* In case of skip_init sdi_init has already enabled the clocks */ if (!sdi.skip_init) dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1); @@ -120,6 +127,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) return 0; err2: dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1); + regulator_disable(sdi.vdds_sdi_reg); err1: omap_dss_stop_device(dssdev); err0: @@ -135,6 +143,8 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1); + regulator_disable(sdi.vdds_sdi_reg); + omap_dss_stop_device(dssdev); } EXPORT_SYMBOL(omapdss_sdi_display_disable); @@ -151,6 +161,11 @@ int sdi_init(bool skip_init) /* we store this for first display enable, then clear it */ sdi.skip_init = skip_init; + sdi.vdds_sdi_reg = dss_get_vdds_sdi(); + if (IS_ERR(sdi.vdds_sdi_reg)) { + DSSERR("can't get VDDS_SDI regulator\n"); + return PTR_ERR(sdi.vdds_sdi_reg); + } /* * Enable clocks already here, otherwise there would be a toggle * of them until sdi_display_enable is called. -- 1.6.3.3
next prev parent reply other threads:[~2010-03-17 12:35 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-03-17 12:35 [PATCHv2 0/3] OMAP: DSS2: Allow us to use SDI Roger Quadros 2010-03-17 12:35 ` Roger Quadros 2010-03-17 12:35 ` [PATCHv2 1/3] OMAP: DSS2: Add Kconfig option for DPI display type Roger Quadros 2010-03-17 12:35 ` Roger Quadros 2010-03-17 12:35 ` [PATCHv2 2/3] OMAP: DSS2: Remove redundant enable/disable calls from SDI Roger Quadros 2010-03-17 12:35 ` Roger Quadros 2010-03-17 12:35 ` Roger Quadros [this message] 2010-03-17 12:35 ` [PATCHv2 3/3] OMAP: DSS2: Use vdds_sdi regulator supply in SDI Roger Quadros 2010-03-17 14:10 ` [PATCHv2 0/3] OMAP: DSS2: Allow us to use SDI Tomi Valkeinen 2010-03-17 14:10 ` Tomi Valkeinen 2010-03-18 7:39 ` Roger Quadros 2010-03-18 7:39 ` Roger Quadros 2010-03-23 8:45 ` Roger Quadros 2010-03-23 8:45 ` Roger Quadros 2010-04-06 16:03 ` Roger Quadros 2010-04-06 16:03 ` Roger Quadros 2010-04-07 5:35 ` Tomi Valkeinen 2010-04-07 5:35 ` 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=1268829321-29769-4-git-send-email-roger.quadros@nokia.com \ --to=roger.quadros@nokia.com \ --cc=Tomi.Valkeinen@nokia.com \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ /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: linkBe 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.