From: Peter Chen Date: Wed, 28 Jan 2015 08:32:42 +0000 (+0800) Subject: usb: udc-core: add is_selfpowered sys entry X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3f6dd4feda71760c41336963c17b594872346654;p=openwrt%2Fstaging%2Fblogic.git usb: udc-core: add is_selfpowered sys entry The user can read it through sys entry. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c index e31d574d8860..5a81cb086b99 100644 --- a/drivers/usb/gadget/udc/udc-core.c +++ b/drivers/usb/gadget/udc/udc-core.c @@ -564,6 +564,7 @@ static USB_UDC_ATTR(is_a_peripheral); static USB_UDC_ATTR(b_hnp_enable); static USB_UDC_ATTR(a_hnp_support); static USB_UDC_ATTR(a_alt_hnp_support); +static USB_UDC_ATTR(is_selfpowered); static struct attribute *usb_udc_attrs[] = { &dev_attr_srp.attr, @@ -577,6 +578,7 @@ static struct attribute *usb_udc_attrs[] = { &dev_attr_b_hnp_enable.attr, &dev_attr_a_hnp_support.attr, &dev_attr_a_alt_hnp_support.attr, + &dev_attr_is_selfpowered.attr, NULL, };