linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Tony Lindgren <tony@atomide.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-omap@vger.kernel.org, Pavel Machek <pavel@ucw.cz>,
	Sebastian Reichel <sre@kernel.org>
Subject: Re: [PATCH 1/2] phy: core: Add phy_pm_runtime_enabled
Date: Sat, 17 Nov 2018 16:38:45 +0100	[thread overview]
Message-ID: <20181117153845.GU19900@localhost> (raw)
In-Reply-To: <20181117133755.9129-2-tony@atomide.com>

On Sat, Nov 17, 2018 at 05:37:54AM -0800, Tony Lindgren wrote:
> The phy driver may need to check phy_pm_runtime_enabled() in suspend as
> PM runtime for phy may be already disabled when phy power_off() is called.
> 
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Sebastian Reichel <sre@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  drivers/phy/phy-core.c  | 9 +++++++++
>  include/linux/phy/phy.h | 6 ++++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c

> diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> --- a/include/linux/phy/phy.h
> +++ b/include/linux/phy/phy.h
> @@ -158,6 +158,7 @@ int phy_pm_runtime_get(struct phy *phy);
>  int phy_pm_runtime_get_sync(struct phy *phy);
>  int phy_pm_runtime_put(struct phy *phy);
>  int phy_pm_runtime_put_sync(struct phy *phy);
> +bool phy_pm_runtime_enabled(struct phy *phy);
>  void phy_pm_runtime_allow(struct phy *phy);
>  void phy_pm_runtime_forbid(struct phy *phy);
>  int phy_init(struct phy *phy);
> @@ -240,6 +241,11 @@ static inline int phy_pm_runtime_put_sync(struct phy *phy)
>  	return -ENOSYS;
>  }
>  
> +static inline bool phy_pm_runtime_enabled(struct phy *phy)
> +{
> +	return false

Missing semicolon.

> +}
> +
>  static inline void phy_pm_runtime_allow(struct phy *phy)
>  {
>  	return;

Johan

  reply	other threads:[~2018-11-17 15:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17 13:37 [PATCH 0/2] Improve phy-mapphone pm Tony Lindgren
2018-11-17 13:37 ` [PATCH 1/2] phy: core: Add phy_pm_runtime_enabled Tony Lindgren
2018-11-17 15:38   ` Johan Hovold [this message]
2018-11-17 15:43     ` Tony Lindgren
2019-06-02 10:14       ` Pavel Machek
2019-06-02 10:25         ` Pavel Machek
2018-11-19 14:46   ` kbuild test robot
2018-11-17 13:37 ` [PATCH 2/2] phy: mapphone-mdm6600: Improve phy related runtime PM calls Tony Lindgren
2018-11-23  7:59   ` Kishon Vijay Abraham I
2018-11-23 16:58     ` Tony Lindgren

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=20181117153845.GU19900@localhost \
    --to=johan@kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).