* [PATCH] phy: don't return error from the stubs
@ 2014-04-02 12:25 Heikki Krogerus
2014-04-02 14:15 ` Felipe Balbi
0 siblings, 1 reply; 2+ messages in thread
From: Heikki Krogerus @ 2014-04-02 12:25 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: Felipe Balbi, chiau.ee.chew, linux-usb, linux-kernel
Returning 0 from the stubs for the functions that are used
for PHY controlling. The interface should not appear to be
failing with every operation when the framework is not
enabled.
This fixes an issue in dwc3 driver, where the driver fails
the moment first phy_*() call is made when the framework is
not enabled.
Reported-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
include/linux/phy/phy.h | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index e2f5ca9..00d6949 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -174,22 +174,22 @@ void devm_of_phy_provider_unregister(struct device *dev,
#else
static inline int phy_pm_runtime_get(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline int phy_pm_runtime_get_sync(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline int phy_pm_runtime_put(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline int phy_pm_runtime_put_sync(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline void phy_pm_runtime_allow(struct phy *phy)
@@ -204,27 +204,27 @@ static inline void phy_pm_runtime_forbid(struct phy *phy)
static inline int phy_init(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline int phy_exit(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline int phy_power_on(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline int phy_power_off(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline int phy_get_bus_width(struct phy *phy)
{
- return -ENOSYS;
+ return 0;
}
static inline void phy_set_bus_width(struct phy *phy, int bus_width)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] phy: don't return error from the stubs
2014-04-02 12:25 [PATCH] phy: don't return error from the stubs Heikki Krogerus
@ 2014-04-02 14:15 ` Felipe Balbi
0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2014-04-02 14:15 UTC (permalink / raw)
To: Heikki Krogerus
Cc: Kishon Vijay Abraham I, Felipe Balbi, chiau.ee.chew, linux-usb,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
On Wed, Apr 02, 2014 at 03:25:43PM +0300, Heikki Krogerus wrote:
> Returning 0 from the stubs for the functions that are used
> for PHY controlling. The interface should not appear to be
> failing with every operation when the framework is not
> enabled.
>
> This fixes an issue in dwc3 driver, where the driver fails
> the moment first phy_*() call is made when the framework is
> not enabled.
>
> Reported-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Yeah, I'll ack this one because for platforms who really don't need to
SW control a PHY, we need at least *one* way of not depending on it.
Acked-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-02 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-02 12:25 [PATCH] phy: don't return error from the stubs Heikki Krogerus
2014-04-02 14:15 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®