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]
Date:	Tue, 2 Apr 2013 11:33:27 +0300
From:	Felipe Balbi <balbi@...com>
To:	Vivek Gautam <gautam.vivek@...sung.com>
CC:	<linux-usb@...r.kernel.org>, <linux-samsung-soc@...r.kernel.org>,
	<linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<gregkh@...uxfoundation.org>, <balbi@...com>,
	<stern@...land.harvard.edu>, <sarah.a.sharp@...ux.intel.com>,
	<rob.herring@...xeda.com>, <kgene.kim@...sung.com>,
	<kishon@...com>, <dianders@...omium.org>, <t.figa@...sung.com>,
	<p.paneri@...sung.com>
Subject: Re: [PATCH v3 05/11] usb: dwc3: exynos: Enable runtime power
 management

On Mon, Apr 01, 2013 at 07:24:04PM +0530, Vivek Gautam wrote:
> Enabling runtime power management on dwc3-exynos
> letting dwc3 controller to be autosuspended on exynos
> platform when not in use.
> 
> Signed-off-by: Vivek Gautam <gautam.vivek@...sung.com>
> ---
>  drivers/usb/dwc3/dwc3-exynos.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
> index 1ea7bd8..1ae81a0 100644
> --- a/drivers/usb/dwc3/dwc3-exynos.c
> +++ b/drivers/usb/dwc3/dwc3-exynos.c
> @@ -19,6 +19,7 @@
>  #include <linux/platform_data/dwc3-exynos.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/clk.h>
> +#include <linux/pm_runtime.h>
>  #include <linux/usb/otg.h>
>  #include <linux/usb/nop-usb-xceiv.h>
>  #include <linux/of.h>
> @@ -138,6 +139,11 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
>  	exynos->dev	= dev;
>  	exynos->clk	= clk;
>  
> +	pm_runtime_set_active(dev);
> +	pm_runtime_enable(dev);
> +	pm_runtime_get_sync(dev);
> +	pm_runtime_forbid(dev);

don't you want to use autosuspend() to avoid consecutive suspend/resume
calls when controller is under use ?

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ