USB: serial: keyspan_pda: fix Entrega company name spelling

Entrega is misspelled as Entregra or Entrgra, so fix that.

Signed-off-by: Mark Knibbs <markk@clara.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>
USB: kobil_sct: replace unnecessary atomic allocation

Use GFP_KERNEL instead of GFP_ATOMIC for allocation in open(), which may
sleep.

Signed-off-by: Johan Hovold <johan@kernel.org>
USB: mos7720: replace unnecessary atomic allocations

Use GFP_KERNEL instead of GFP_ATOMIC for allocations in set_termios and
port-setting helper which both may and do sleep.

Signed-off-by: Johan Hovold <johan@kernel.org>
USB: mos7840: replace unnecessary atomic allocations

Use GFP_KERNEL instead of GFP_ATOMIC for allocations in set_termios and
port-setting helper which both may and do sleep.

Signed-off-by: Johan Hovold <johan@kernel.org>
usb: dwc3: core: write LINUX_VERSION_CODE to our GUID register

DWC3's GUID register is supposed to be used to write
any sort of version we might want. It helps when getting
bug reports for platforms you don't have HW to know
which kernel version of the driver was running on the
platform.

Because we don't really track driver version, but we _do_
track the kernel version, let's write LINUX_VERSION_CODE to
that register and use it for debugging.

Reviewed-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: dwc3: trace: remove unnecessary newline character

tracing infrastructure already adds those for us.

Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: dwc3: core: only setting the dma_mask when needed

If the probe drivers have already set the dma_mask, not
replacing the value.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: dwc3: add ACPI support

Adding ACPI ID used on newer Intel SoCs.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: gadget: composite: introduce setup and os_desc pending flags

These flags we be set to true whenever their
matching request is queued. They will be cleared
to false when that request completes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: gadget: composite: set our req->context to cdev

by doing that we will be able to match our
requests against req and os_desc_req and also
clear our pending flags from complete callback.

Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: gadget: composite: conditionally dequeue os_desc and setup requests

In case we unload a gadget driver while any of
os_desc_req or req are still pending, we need
to make sure to dequeue them.

By using our setup_pending and os_desc_pending
flags we achieve that in a way that doesn't
cause any regressions because we won't dequeue
a request which was already completed.

The original idea came from Li Jun's commit
f2267089ea17fa97b796b1b4247e3f8957655df3
(usb: gadget: composite: dequeue cdev->req
before free it in composite_dev_cleanup) which,
unfortunately, caused two regressions (kfree()
being called before usb_ep_dequeue() and calling
usb_ep_dequeue() when the request was already
completed). That commit also didn't take care
of os_desc_req which can fall into the same
situation so we must care for that one too.

Note that in order to make code slightly easier
to read, we introduce composite_ep_queue() which
hides details about how to fiddle with our pending
flags.

Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: dwc3: ep0: trace ep0 TRBs too

Add TRB tracepoints for ep0 TRBs as that
might help finding bugs with ep0 handling.

Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: renesas_usbhs: rename phy to usb_phy in usbhs_priv

To support a generic phy driver in this driver later, this patch
renames "struct usb_phy *phy" to "struct usb_phy *usb_phy".

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: renesas_usbhs: clean up rcar2.c to support a generic PHY

To support both usb PHY and generic PHY, this patch cleans up rcar2.c.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: renesas_usbhs: add support for generic PHY

This patch adds support for the generic PHY. The generic PHY will be
used in multiplatform environment.

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: gadget: pxa27x_udc: prepare device-tree support

For this preparation, a preliminary cleanup is done :
  - convert the probing of pxa27x_udc to gpio_desc.
    The conversion is partial because :
     - the platform data still provides a gpio number, not a gpio desc

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: gadget: pxa27x_udc: transfer mach_info into pxa_udc

Convert the mach info, and store the udc_command in the pxa_udc control
structure.

It is to be noticed that the udc_is_connected() in mach info is not
transfered. This was not used, as mioa701 machine doesn't need it,
balloon3 doesn't really use it, and most importantly the current driver
never uses it.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: gadget: pxa27x_udc: add devicetree support

Add support for device-tree device discovery. If devicetree is not
provided, fallback to legacy platform data "discovery".

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: devicetree@vger.kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: dwc3: dwc3-omap: get rid of ->prepare()/->complete()

Enabling the core interrupts in complete is too late for
XHCI, and stops it from proper operation. The root of the
problem is due to a disagreement between dwc3-omap and XHCI
about when IRQs should be enabled.

As it turns out, ->resume's documentation states that:

"... generally the driver is expected to start working
again, responding to hardware events and software requests
(the device itself may be left in a low-power state, waiting
for a runtime resume to occur) ..."

From that we infer that IRQs must be unmasked by the end of
->resume().

Due to that, we will remove ->prepare() and ->complete() and
disable/enable interrupts in ->suspend()/->resume().

Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: dwc3: get rid of ->prepare()/->complete()

Using ->prepare()/->complete() to mask/unmask
IRQs is wrong at least for dwc3. We need to
make sure that by the end of ->resume(), IRQs
are working and ready to fire because a child
device may need working IRQs for its own ->resume()
method.

Signed-off-by: Felipe Balbi <balbi@ti.com>