lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK9wHMSp+h9dMjZivV=Y42D1JjvZCC9vCqa4HDBV7osYek70AQ@mail.gmail.com>
Date:	Mon, 25 Jun 2012 17:24:18 +0800
From:	chao xie <xiechao.linux@...il.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	rjw@...k.pl, pavel@....cz, linux-arm-kernel@...ts.infradead.org
Subject: Re: pm runtime and system suspend resume

2012/6/22 chao xie <xiechao.linux@...il.com>:
> 2012/6/21 Alan Stern <stern@...land.harvard.edu>:
>> On Thu, 21 Jun 2012, chao xie wrote:
>>
>>> I check the code, __device_suspend will invoke dev->pm_domain->ops
>>> first if dev->pm_domain is not NULL.
>>> Taking "suspend" as esample, i can do the following things in the
>>> dev->pm_domain->ops->suspend
>>> 1. invoke dev->driver->pm->suspend for suspending the device
>>> 2. do what we do in dev->pm_domain->ops->runtime_suspend for
>>> suspending the surrounded logic, for example, shutdown the phy or
>>> clocks.
>>> So is above implementation fine?
>>
>> Yes, that sounds like it will work.  Watch out for the case where your
>> device is already runtime-suspended when a system suspend occurs.
>>
>> Have you read section 6 in Documentation/power/runtime_pm.txt?  It is
>> related to your question.
>>
> I will read the document. Thanks very much.
>
>> Alan Stern
>>

There is no more question about runtime_idle and runtime_suspend
as i understand that runtime_idle indicates that the device is idle,
clock may be off, no function there, runtime_suspend means that the
device my be power off, and making it rework may need some
initialization work.
So in the scenario, for USB, there are some clocks relates to it and
there is a phy attached to it.
When phy is powered off, it need to be initialized again, and it will
take some time.
So in the driver, when there is no action, we will call
pm_runtime_put, and it will shut off the clocks, for
pm_runtime_put_sync_suspend, it will shut off the phy to save more
power.
Then how do we call pm_runtime_put_sync_suspend if it already calls
pm_runtime_put? Do we need do call pm_runtime_get before call
pm_runtime_put_sync_suspend because the usage_count is not 0?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ