From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Semwal, Sumit" <sumit.semwal@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Guruswamy, Senthilvadivu" <svadivu@ti.com>
Subject: Re: [Patch v2 1/2] OMAP2PLUS:DSS2: add opt_clock_available in pdata
Date: Mon, 28 Feb 2011 18:03:48 +0200 [thread overview]
Message-ID: <1298909028.9809.139.camel@deskari> (raw)
In-Reply-To: <1298905363-28871-2-git-send-email-sumit.semwal@ti.com>
On Mon, 2011-02-28 at 09:02 -0600, Semwal, Sumit wrote:
> Provide a function in pdata to allow dss submodules to check if a given
> clock is available on a platform as an optional clock.
>
> Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
> (based on implementation from Senthil)
>
> Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
> ---
> arch/arm/mach-omap2/display.c | 20 ++++++++++++++++++++
> arch/arm/plat-omap/include/plat/display.h | 2 ++
> 2 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
> index 5ab6a74..9f4f862 100644
> --- a/arch/arm/mach-omap2/display.c
> +++ b/arch/arm/mach-omap2/display.c
> @@ -42,6 +42,25 @@ static struct omap_device_pm_latency omap_dss_latency[] = {
> },
> };
>
> +static bool opt_clock_available(const char *clk_role)
> +{
> + int i;
> + struct omap_hwmod *oh;
> +
> + /* opt_clks are always associated with dss hwmod */
> + oh = omap_hwmod_lookup("dss_core");
> + if (!oh) {
> + pr_err("Could not look up dss_core.\n");
> + return -ENODEV;
The function returns a bool. Perhaps the lookup would be better done in
omap_display_init(), and stored in a static variable.
Or if it's clear that this should never happen, BUG_ON(!oh);
Tomi
next prev parent reply other threads:[~2011-02-28 16:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 15:02 [Patch v2 0/2] OMAP2PLUS:DSS2: use opt-clocks information from hwmod Sumit Semwal
2011-02-28 15:02 ` [Patch v2 1/2] OMAP2PLUS:DSS2: add opt_clock_available in pdata Sumit Semwal
2011-02-28 16:03 ` Tomi Valkeinen [this message]
2011-03-01 5:42 ` Semwal, Sumit
2011-03-01 6:19 ` Tomi Valkeinen
2011-03-01 6:27 ` Semwal, Sumit
2011-03-01 6:37 ` Tomi Valkeinen
2011-03-01 6:41 ` Semwal, Sumit
2011-02-28 15:02 ` [Patch v2 2/2] OMAP2PLUS:DSS2: Use opt_clock_available from pdata Sumit Semwal
2011-02-28 15:09 ` [Patch v2 0/2] OMAP2PLUS:DSS2: use opt-clocks information from hwmod Semwal, Sumit
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=1298909028.9809.139.camel@deskari \
--to=tomi.valkeinen@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=sumit.semwal@ti.com \
--cc=svadivu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox