From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Hovold Subject: Re: [PATCH 1/2] phy: core: Add phy_pm_runtime_enabled Date: Sat, 17 Nov 2018 16:38:45 +0100 Message-ID: <20181117153845.GU19900@localhost> References: <20181117133755.9129-1-tony@atomide.com> <20181117133755.9129-2-tony@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20181117133755.9129-2-tony@atomide.com> Sender: linux-kernel-owner@vger.kernel.org To: Tony Lindgren Cc: Kishon Vijay Abraham I , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, Pavel Machek , Sebastian Reichel List-Id: linux-omap@vger.kernel.org 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 > Cc: Sebastian Reichel > Signed-off-by: Tony Lindgren > --- > 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