On 02/08/2013 07:32 PM, Felipe Balbi wrote: >>> This will be used during resume to verify >>> if we should reconnect our pullups or not. >>> Signed-off-by: Felipe Balbi <balbi@xxxxxx> >>> --- >>> drivers/usb/dwc3/core.h | 1 + >>> drivers/usb/dwc3/gadget.c | 2 ++ >>> 2 files changed, 3 insertions(+) >>> diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h >>> index 11a77f0..e8d74a7 100644 >>> --- a/drivers/usb/dwc3/core.h >>> +++ b/drivers/usb/dwc3/core.h >>> @@ -697,6 +697,7 @@ struct dwc3 { >>> unsigned delayed_status:1; >>> unsigned needs_fifo_resize:1; >>> unsigned resize_fifos:1; >>> + unsigned pullups_connected:1; >>> >>> enum dwc3_ep0_next ep0_next_event; >>> enum dwc3_ep0_state ep0state; >>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >>> index 0b5ebb9..c65c18d 100644 >>> --- a/drivers/usb/dwc3/gadget.c >>> +++ b/drivers/usb/dwc3/gadget.c >>> @@ -1425,8 +1425,10 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on) >>> if (dwc->revision >= DWC3_REVISION_194A) >>> reg &= ~DWC3_DCTL_KEEP_CONNECT; >>> reg |= DWC3_DCTL_RUN_STOP; >>> + dwc->pullups_connected = true; >>> } else { >>> reg &= ~DWC3_DCTL_RUN_STOP; >>> + dwc->pullups_connected = false; >> Maybe worth declaring the field as 'bool' if you assign 'bool' values? > I prefer my 1-bit flags ;-) Hm, I thought 'bool' can be made 1-bit too... > thanks WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html