phy: don't return error from the stubs
PATCH 1/1 phy: don't return error from the stubs
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.
--- include/linux/phy/phy.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
include/linux/phy/phy.h +9 -9
@@ -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)
Signature · 1 line
1.9.1
Quoted 11 lines · Heikki Krogerus
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 <[email protected]>Signed-off-by Heikki Krogerus <[email protected]>
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.
Signature · 1 line
balbi