From: Felipe Balbi <balbi@ti.com>
To: Vivek Gautam <gautam.vivek@samsung.com>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-omap@vger.kernel.org>, <linux-samsung-soc@vger.kernel.org>,
<gregkh@linuxfoundation.org>, <balbi@ti.com>,
<sarah.a.sharp@linux.intel.com>, <kgene.kim@samsung.com>,
<kishon@ti.com>
Subject: Re: [PATCH v2 01/10] usb: phy: Add APIs for runtime power management
Date: Mon, 4 Mar 2013 17:29:20 +0200 [thread overview]
Message-ID: <20130304152858.GT3397@arwen.pp.htv.fi> (raw)
In-Reply-To: <1362230590-20960-2-git-send-email-gautam.vivek@samsung.com>
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
Hi,
On Sat, Mar 02, 2013 at 06:53:02PM +0530, Vivek Gautam wrote:
> Adding APIs to handle runtime power management on PHY
> devices. PHY consumers may need to wake-up/suspend PHYs
> when they work across autosuspend.
>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> ---
> include/linux/usb/phy.h | 26 ++++++++++++++++++++++++++
> 1 files changed, 26 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
> index 15847cb..0fe7cac 100644
> --- a/include/linux/usb/phy.h
> +++ b/include/linux/usb/phy.h
> @@ -276,4 +276,30 @@ static inline const char *usb_phy_type_string(enum usb_phy_type type)
> return "UNKNOWN PHY TYPE";
> }
> }
> +
> +#define USB_PHY_AUTOPM(function) \
> +static inline int usb_phy_autopm_##function(struct usb_phy *x) \
> +{ \
> + if (!x || !x->dev) { \
> + dev_err(x->dev, "no PHY or attached device available\n"); \
> + return -ENODEV; \
> + } \
> + \
> + pm_runtime_##function(x->dev); \
please make the definitions explicit (not using a macro) and use:
return pm_runtime_foo();
where applicable. We don't want to return 0 if pm_runtime_get_sync()
fails.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-03-04 15:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-02 13:23 [PATCH v2 00/10] usb: dwc3/xhci/phy: Enable runtime power management Vivek Gautam
2013-03-02 13:23 ` [PATCH v2 01/10] usb: phy: Add APIs for " Vivek Gautam
2013-03-04 15:29 ` Felipe Balbi [this message]
2013-03-02 13:23 ` [PATCH v2 02/10] USB: dwc3: Adjust runtime pm to allow autosuspend Vivek Gautam
2013-03-02 13:23 ` [PATCH v2 03/10] usb: dwc3: Enable runtime pm only after PHYs are initialized Vivek Gautam
2013-03-02 13:23 ` [PATCH v2 04/10] usb: dwc3: Add runtime power management callbacks Vivek Gautam
2013-03-02 13:23 ` [PATCH v2 05/10] usb: dwc3: exynos: Enable runtime power management Vivek Gautam
2013-03-02 13:23 ` [PATCH v2 06/10] usb: xhci: Enable runtime pm in xhci-plat Vivek Gautam
2013-03-02 15:53 ` Alan Stern
2013-03-02 20:39 ` Felipe Balbi
2013-03-02 22:02 ` Alan Stern
2013-03-02 23:21 ` Felipe Balbi
2013-03-02 23:24 ` Felipe Balbi
2013-03-04 15:57 ` Alan Stern
2013-03-04 8:08 ` Vivek Gautam
2013-03-04 15:29 ` Alan Stern
2013-03-02 13:23 ` [PATCH v2 07/10] usb: phy: samsung: Enable runtime power management on usb3phy Vivek Gautam
2013-03-02 13:23 ` [PATCH v2 08/10] usb: phy: samsung: Add support for external reference clock Vivek Gautam
2013-03-02 13:23 ` [PATCH v2 09/10] usb: phy: samsung: Add support for PHY ref_clk gpio Vivek Gautam
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=20130304152858.GT3397@arwen.pp.htv.fi \
--to=balbi@ti.com \
--cc=gautam.vivek@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=kgene.kim@samsung.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.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