diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-11-21 15:14:49 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-21 09:07:42 -0600 |
commit | dc6e69e603e58200df806afcfb9b71ef94e58847 (patch) | |
tree | 7309381e4303518d5e5636c639fcf667aab5aa90 /drivers/usb/dwc2/core.h | |
parent | 7ad8096edfe0529eabb3ad466184c8fbd6134e1a (diff) | |
download | linux-dc6e69e603e58200df806afcfb9b71ef94e58847.tar.gz linux-dc6e69e603e58200df806afcfb9b71ef94e58847.tar.bz2 linux-dc6e69e603e58200df806afcfb9b71ef94e58847.zip |
usb: dwc2: gadget: rework suspend/resume code to correctly restore gadget state
Suspend/resume code assumed that the gadget was always started and
enabled to connect to usb bus. This means that the actual state of the
gadget (started/stopped or connected/disconnected) was not correctly
preserved on suspend/resume cycle. This patch fixes this issue.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r-- | drivers/usb/dwc2/core.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 6b197550c133..7a70a1349334 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h @@ -688,8 +688,9 @@ struct dwc2_hsotg { u8 ctrl_buff[8]; struct usb_gadget gadget; + unsigned int enabled:1; unsigned int connected:1; - unsigned int setup; + unsigned int setup:1; unsigned long last_rst; struct s3c_hsotg_ep *eps; #endif /* CONFIG_USB_DWC2_PERIPHERAL || CONFIG_USB_DWC2_DUAL_ROLE */ |