diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-01-28 16:32:24 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2015-02-04 14:29:53 +0800 |
commit | f80128905a2f3364306d4db6a0a3d3e87996d13a (patch) | |
tree | aceeecc893b173a4fba657b6d11e4a301edefa03 | |
parent | 5b4dc77aa84096ba37ae4e0c3e664fcc7168d01e (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>
-rw-r--r-- | include/linux/usb/gadget.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 25a5007f92e3..348018691e9b 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -502,6 +502,7 @@ struct usb_gadget_ops { * @dev: Driver model state for this abstract device. * @out_epnum: last used out ep number * @in_epnum: last used in ep number + * @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 @@ -541,6 +542,7 @@ struct usb_gadget { struct device dev; unsigned out_epnum; unsigned in_epnum; + unsigned is_selfpowered:1; }; #define work_to_gadget(w) (container_of((w), struct usb_gadget, work)) |