this function will receive enum usb_device_state
and return a human-readable string from it or,
case an unknown value is passed as argument,
the string "UNKNOWN".
Signed-off-by: Felipe Balbi <balbi@ti.com>
by moving to threaded IRQs, we allow our IRQ
priorities to be configurable when running with
realtime patch. Also, since we're running in
thread context, we can call functions which
might sleep, such as sysfs_notify() without
problems.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Fix the following compile warning:
drivers/usb/musb/musb_gadget.c: In function ‘rxstate’:
drivers/usb/musb/musb_gadget.c:714:22: warning: comparison of distinct pointer types lacks a cast [enabled by default]
Signed-off-by: Felipe Balbi <balbi@ti.com>
if CONFIG_OF is disabled, np will be unused
and that will give us a compile warning. This
patch just avoids it.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Fix the following compile warnings:
drivers/usb/musb/ux500_dma.c: In function ‘ux500_configure_channel’:
drivers/usb/musb/ux500_dma.c:96:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/usb/musb/ux500_dma.c: In function ‘ux500_dma_is_compatible’:
drivers/usb/musb/ux500_dma.c:195:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
Signed-off-by: Felipe Balbi <balbi@ti.com>
<linux/sizes.h> is the header defining SZ_4
and SZ_16M, we shouldn't depend on indirect
inclusion so let's explicitly include it.
Signed-off-by: Felipe Balbi <balbi@ti.com>
those two glues are still including <mach/>
headers and no active developement has been
going on those glues for quite some time.
Apparently, for da8xx glue, only initial commit
3ee076de (usb: musb: introduce DA8xx/OMAP-L1x
glue layer) has been tested. All other patches
seem to have been compile-tested only.
For davinci glue layer, last real commit dates
back from 2010, with commit f405387 (USB: MUSB:
fix kernel WARNING/oops when unloading module
in OTG mode).
Signed-off-by: Felipe Balbi <balbi@ti.com>
MUSB still needs lots of work on the DMA part
if we want to enable multiple DMA engines on
a multiplatform kernel. Meanwhile, we're forcing
PIO-only so that we, at least, have a working
driver.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Those comments haven't been updated for a long
time, so much that they don't make sense anymore.
Best to remove them.
Signed-off-by: Felipe Balbi <balbi@ti.com>
this will make sure that request_memory_region() will
be called and that we don't need to manually call
iounmap() on ->remove().
Signed-off-by: Felipe Balbi <balbi@ti.com>
Adds suspend and resume callbacks to exynos dwc3 driver as part of
power management support.
This change does gating of dwc3 clock during suspend/resume cycles.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Vikas C Sajjan <vikas.sajjan@linaro.org>
CC: Doug Anderson <dianders@chromium.org>
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
[ balbi@ti.com : refreshed to current linus/master ]
Signed-off-by: Felipe Balbi <balbi@ti.com>
this patch implements basic suspend/resume
functionality for the OMAP glue layer.
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
we're not using those fields of the structure,
might as well remove them.
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Add support for basic power management on
the dwc3 driver. While there is still lots
to improve for full PM support, this minimal
patch will already make sure that we survive
suspend-to-ram and suspend-to-disk without
major issues.
Cc: Vikas C Sajjan <vikas.sajjan@linaro.org>
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This will be used during resume to verify
if we should reconnect our pullups or not.
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
we don't need to enable IRQs until we have
a gadget driver loaded and ready to work,
so let's delay IRQ enable to ->udc_start()
and IRQ disable to ->udc_stop().
While at that, also move the related use of
request_irq() and free_irq().
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Make the call to dwc3_event_buffers_setup()
and dwc3_event_buffers_cleanup() explicit,
so it's easier to implement PM.
Tested-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
We don't need the ->register_my_device flag
anymore because all UDC drivers have been
properly converted.
Let's remove every history of it.
Signed-off-by: Felipe Balbi <balbi@ti.com>
By simply setting a flag, we can drop some
boilerplate code.
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
By simply setting a flag, we can drop some
boilerplate code.
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Fix the following compile warning:
mv_u3d_core.c:1766:12: warning: 'mv_u3d_remove' \
defined but not used [-Wunused-function]
Signed-off-by: Felipe Balbi <balbi@ti.com>