summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-01-28 16:32:24 +0800
committerPeter Chen <peter.chen@freescale.com>2015-02-03 13:39:04 +0800
commit19f8a9a7edf853e5a07df3b6577b18ce85ad01c7 (patch)
tree0663d2e56ea6356cbea5d54342f742fb557de278 /include
parent1968eb5a30cc72d22dc9500255570d57043a8ab1 (diff)
usb: gadget: introduce is_selfpowered for usb_gadget
Whether the gadget is selfpowerwed or not can be determined by composite core, so we can use a common entry to indicate if the self-powered is supported by gadget, and the related private variable at individual udc driver can be deleted. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/gadget.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 3b17e99e7bbc..e33170fd446a 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -523,6 +523,7 @@ struct usb_gadget_ops {
* enabled HNP support.
* @quirk_ep_out_aligned_size: epout requires buffer size to be aligned to
* MaxPacketSize.
+ * @is_selfpowered: if the gadget is self-powered.
*
* Gadgets have a mostly-portable "gadget driver" implementing device
* functions, handling all usb configurations and interfaces. Gadget
@@ -564,6 +565,7 @@ struct usb_gadget {
unsigned a_alt_hnp_support:1;
unsigned host_request_flag:1;
unsigned quirk_ep_out_aligned_size:1;
+ unsigned is_selfpowered:1;
};
#define work_to_gadget(w) (container_of((w), struct usb_gadget, work))