[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <50EF0324.9060004@mvista.com>
Date: Thu, 10 Jan 2013 21:06:28 +0300
From: Sergei Shtylyov <sshtylyov@...sta.com>
To: Roger Quadros <rogerq@...com>
CC: balbi@...com, gregkh@...uxfoundation.org, sameo@...ux.intel.com,
tony@...mide.com, kishon@...com, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 04/14] usb: phy: nop: Handle power supply regulator for
the PHY
Hello.
On 01/10/2013 07:51 PM, Roger Quadros wrote:
> We use "vcc" as the supply name for the PHY's power supply.
> The power supply will be enabled during .init() and disabled
> during .shutdown()
> Signed-off-by: Roger Quadros <rogerq@...com>
> ---
> drivers/usb/otg/nop-usb-xceiv.c | 18 ++++++++++++++++++
> 1 files changed, 18 insertions(+), 0 deletions(-)
> diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c
> index 163f972..1c6db10 100644
> --- a/drivers/usb/otg/nop-usb-xceiv.c
> +++ b/drivers/usb/otg/nop-usb-xceiv.c
[...]
> @@ -70,6 +72,11 @@ static int nop_init(struct usb_phy *phy)
> {
> struct nop_usb_xceiv *nop = dev_get_drvdata(phy->dev);
>
> + if (nop->vcc) {
> + if (regulator_enable(nop->vcc))
> + dev_err(phy->dev, "Failed to enable power\n");
> + }
Could be collapsed into single *if*.
> +
> if (nop->clk)
> clk_enable(nop->clk);
>
> @@ -82,6 +89,11 @@ static void nop_shutdown(struct usb_phy *phy)
>
> if (nop->clk)
> clk_disable(nop->clk);
> +
> + if (nop->vcc) {
> + if (regulator_disable(nop->vcc))
> + dev_err(phy->dev, "Failed to disable power\n");
> + }
Same here.
WBR, Sergei
--
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