X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fhub.h;h=baf5b48b79f7ce1b13a80bda0f11b82e2c7c910d;hb=4b31a34e0e0f8835fec2cca1f0d52275ac22b1ed;hp=df629a310e44f4250638abe414e6a7f7601b8206;hpb=da89486f03ec5996d87b62d1a26c19e9c5cddf12;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/drivers/usb/core/hub.h b/drivers/usb/core/hub.h index df629a3..baf5b48 100644 --- a/drivers/usb/core/hub.h +++ b/drivers/usb/core/hub.h @@ -111,6 +111,16 @@ extern int hub_port_debounce(struct usb_hub *hub, int port1, extern int usb_clear_port_feature(struct usb_device *hdev, int port1, int feature); +static inline bool hub_is_port_power_switchable(struct usb_hub *hub) +{ + __le16 hcs; + + if (!hub) + return false; + hcs = hub->descriptor->wHubCharacteristics; + return (le16_to_cpu(hcs) & HUB_CHAR_LPSM) < HUB_CHAR_NO_LPSM; +} + static inline int hub_port_debounce_be_connected(struct usb_hub *hub, int port1) {