]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/sunxi/usb_phy.c
sunxi: usb-phy: Never power off the usb ports
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / sunxi / usb_phy.c
index 4d63a7449d7ced3becdd4348054047cdb5e6a9cf..b7ca5d423a9fb014de2caf6e45b4dc1839d34b0d 100644 (file)
@@ -232,6 +232,13 @@ void sunxi_usb_phy_power_off(int index)
                gpio_set_value(phy->gpio_vbus, 0);
 }
 
+int sunxi_usb_phy_power_is_on(int index)
+{
+       struct sunxi_usb_phy *phy = &sunxi_usb_phy[index];
+
+       return phy->power_on_count > 0;
+}
+
 int sunxi_usb_phy_vbus_detect(int index)
 {
        struct sunxi_usb_phy *phy = &sunxi_usb_phy[index];