diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-01-28 03:32:42 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-29 11:35:48 -0500 |
commit | 3f6dd4feda71760c41336963c17b594872346654 (patch) | |
tree | 02b3d5c815ba718581bfcb12da546c9044407bb8 | |
parent | dadac9861f466635c3ac0851f2a39be68fa10a71 (diff) |
usb: udc-core: add is_selfpowered sys entry
The user can read it through sys entry.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/udc/udc-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); | |||
564 | static USB_UDC_ATTR(b_hnp_enable); | 564 | static USB_UDC_ATTR(b_hnp_enable); |
565 | static USB_UDC_ATTR(a_hnp_support); | 565 | static USB_UDC_ATTR(a_hnp_support); |
566 | static USB_UDC_ATTR(a_alt_hnp_support); | 566 | static USB_UDC_ATTR(a_alt_hnp_support); |
567 | static USB_UDC_ATTR(is_selfpowered); | ||
567 | 568 | ||
568 | static struct attribute *usb_udc_attrs[] = { | 569 | static struct attribute *usb_udc_attrs[] = { |
569 | &dev_attr_srp.attr, | 570 | &dev_attr_srp.attr, |
@@ -577,6 +578,7 @@ static struct attribute *usb_udc_attrs[] = { | |||
577 | &dev_attr_b_hnp_enable.attr, | 578 | &dev_attr_b_hnp_enable.attr, |
578 | &dev_attr_a_hnp_support.attr, | 579 | &dev_attr_a_hnp_support.attr, |
579 | &dev_attr_a_alt_hnp_support.attr, | 580 | &dev_attr_a_alt_hnp_support.attr, |
581 | &dev_attr_is_selfpowered.attr, | ||
580 | NULL, | 582 | NULL, |
581 | }; | 583 | }; |
582 | 584 | ||