All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: jonghwa3.lee@samsung.com
Cc: linux-kernel@vger.kernel.org, Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.hengli.com.au>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Julia Lawall <Julia.Lawall@lip6.fr>,
	Jamie Iles <jamie@jamieiles.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Linux PM mailing list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] Exynos : Add support for Exynos random number generator
Date: Tue, 26 Jun 2012 12:32:14 -0700	[thread overview]
Message-ID: <4FEA0E3E.2070804@codeaurora.org> (raw)
In-Reply-To: <4FE3CCE1.6010400@samsung.com>

On 06/21/12 18:39, jonghwa3.lee@samsung.com wrote:
> On 2012년 06월 21일 12:12, Stephen Boyd wrote:
>
>> On 06/20/12 19:39, jonghwa3.lee@samsung.com wrote:
>>>>> +static int exynos_init(struct hwrng *rng)
>>>>> +{
>>>>> +	struct exynos_rng *exynos_rng = container_of(rng,
>>>>> +						struct exynos_rng, rng);
>>>>> +	int i;
>>>>> +	int ret = 0;
>>>>> +	u32 PRND_SEED[5];
>>>>> +
>>>>> +	pm_runtime_put_noidle(exynos_rng->dev);
>>>>> +	pm_runtime_get_sync(exynos_rng->dev);
>>>> This looks very odd. Why are you calling pm_runtime_put_noidle()?
>>>>
>>> When this callback function is called, the status of power state is
>>> 'suspended' and use_count is 1. To perform pm_runtime_get_sync()
>>> correctly, it requires to have 'suspended' status and use_count is 0.
>>> Thus i force to decrease use_count only with using
>>> pm_runtime_put_noidle. I know it looks odd, but i couldn't find better
>>> way. Otherwise it can use clk_enable() directly, but i think that it
>>> isn't good neither.
>> Is the device suspended initially at probe? If so can you set the state
>> of the device to suspended?
>>
>
> Yes, it suspended already at the initial of probing. But i can't get
> your point, you want to me to make device suspended?

I mean to say you should probably call pm_runtime_set_suspended() during
probe. But I'm not sure and I would defer to people more familiar with
runtime pm.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


  reply	other threads:[~2012-06-26 19:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  8:22 [PATCH] Exynos : Add support for Exynos random number generator Jonghwa Lee
2012-06-21  0:47 ` Stephen Boyd
2012-06-21  2:39   ` jonghwa3.lee
2012-06-21  3:12     ` Stephen Boyd
2012-06-22  1:39       ` jonghwa3.lee
2012-06-26 19:32         ` Stephen Boyd [this message]
2012-06-27 14:03           ` Alan Stern
  -- strict thread matches above, loose matches on Subject: below --
2012-06-20  8:18 Jonghwa Lee

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=4FEA0E3E.2070804@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=Julia.Lawall@lip6.fr \
    --cc=herbert@gondor.hengli.com.au \
    --cc=jamie@jamieiles.com \
    --cc=jonghwa3.lee@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=nicolas.ferre@atmel.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.