Merge tag 'usb-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[sfrench/cifs-2.6.git] / include / linux / phy / phy.h
index 58be86e6fe83ba2a0357d62e00af502b88432b9e..03cd5bae92d3f189d739c453fe4c160dd2a5063e 100644 (file)
@@ -122,6 +122,11 @@ struct phy_ops {
                            union phy_configure_opts *opts);
        int     (*reset)(struct phy *phy);
        int     (*calibrate)(struct phy *phy);
+
+       /* notify phy connect status change */
+       int     (*connect)(struct phy *phy, int port);
+       int     (*disconnect)(struct phy *phy, int port);
+
        void    (*release)(struct phy *phy);
        struct module *owner;
 };
@@ -243,6 +248,8 @@ static inline enum phy_mode phy_get_mode(struct phy *phy)
 }
 int phy_reset(struct phy *phy);
 int phy_calibrate(struct phy *phy);
+int phy_notify_connect(struct phy *phy, int port);
+int phy_notify_disconnect(struct phy *phy, int port);
 static inline int phy_get_bus_width(struct phy *phy)
 {
        return phy->attrs.bus_width;
@@ -396,6 +403,20 @@ static inline int phy_calibrate(struct phy *phy)
        return -ENOSYS;
 }
 
+static inline int phy_notify_connect(struct phy *phy, int index)
+{
+       if (!phy)
+               return 0;
+       return -ENOSYS;
+}
+
+static inline int phy_notify_disconnect(struct phy *phy, int index)
+{
+       if (!phy)
+               return 0;
+       return -ENOSYS;
+}
+
 static inline int phy_configure(struct phy *phy,
                                union phy_configure_opts *opts)
 {