summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-07usb: gadget: rndis: style correctionAndrzej Pietrasiewicz
Don't use a space between function name and parameter list opening bracket. All other functions in this file comply wich checkpatch rules. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: gadget: rndis: use rndis_params instead of configNrAndrzej Pietrasiewicz
RNDIS function has a limitation on the number of allowed instances. So far it has been RNDIS_MAX_CONFIGS, which happens to be one. In order to eliminate this kind of arbitrary limitation we should not preallocate a predefined (RNDIS_MAX_CONFIGS) array of struct rndis_params instances but instead allow allocating them on demand. This patch prepares the elimination of the said limit by converting all the functions which accept rndis config number to accept a pointer to the actual struct rndis_params. Consequently, rndis_register() returns a pointer to a corresponding struct rndis_params instance. The pointer is then always used by f_rndis.c instead of config number when it talks to rndis.c API. A nice side-effect of the changes is that many lines of code in rndis.c become shorter and fit in 80 columns. If a function prototype changes in rndis.h a style cleanup is made at the same time, otherwise checkpatch complains that the patch has style problems. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: gadget: s3c2410_udc: Remove static char buffer, use vsprintf extension %pVJoe Perches
Using unnecessary static char buffers isn't good. Use the %pV extension instead. Miscellanea: o the dprintk return value is unused, make it void o add __printf format and argument verification Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: phy: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: <linux-usb@vger.kernel.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: dwc3: dwc3-st: Update the incorrect DT dwc3 example.Peter Griffin
There is a subtle typo phys-names should be phy-names. Using the current example means you don't have working usb (as you fail to obtain the phys). Also update the example to use the generic phy type constants which are now used for miphy28. Additionally also remove the unnecessary new line in the example. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: phy-ab8500-usb: Constify platform_device_idKrzysztof Kozlowski
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part5Tony Lindgren
Remove ifdefs for musb_host_rx to get closer to building in all the DMA drivers. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part4Tony Lindgren
Remove ifdefs for musb_host_rx to get closer to building in all the DMA drivers. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part3Tony Lindgren
Remove ifdefs for musb_host_rx to get closer to building in all the DMA drivers. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part2Tony Lindgren
Remove ifdefs for musb_host_rx to get closer to building in all the DMA drivers. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part1Tony Lindgren
Remove ifdefs for musb_host_rx to get closer to building in all the DMA drivers. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Remove ifdefs for TX DMA for musb_host.cTony Lindgren
We can remove the ifdefs by setting up helper functions for mentor DMA and cppi/tusb DMA. Note that I've kept the existing formatting as otherwise this patch becomes pretty much unreadable. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Remove DMA ifdef for musb_gadget.c short_packetTony Lindgren
Let's get rid of the horrible ifdef in middle of the expression. We can do it by adding a variable for short_packet and testing it separately for DMA related code. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Get rid of the DMA ifdefs for musb_core.cTony Lindgren
For musb_core.c we can now just drop the DMA related ifdef and use the already existing runtime test for !is_cppi_enabled(musb) instead. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Set up function pointers for DMATony Lindgren
Set up function pointers for DMA so get closer to being able to build in all the DMA engines. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Fix up DMA related macrosTony Lindgren
Pass struct musb to tusb_dma_omap() and is_cppi_enabled(), and add macros for the other DMA controllers. Populate the platform specific quirks with the DMA type and use it during runtime. Note that platform glue layers with no custom DMA code are tagged with MUSB_DMA_INVENTRA which may have a chance of working. Looks like the defconfigs for these use PIO_ONLY, so this should not break existing configs. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: host: ensure qtb exists before dereferencing itGregory Herrero
dwc2_hc_nak_intr could be called with a NULL qtd. Ensure qtd exists before dereferencing it to avoid kernel panic. This happens when using usb to ethernet adapter. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: add hibernation core parameterGregory Herrero
dwc2 may not be able to exit from hibernation if the hardware does not provide a way to detect resume signalling in this state. Thus, add the possibility to disable hibernation feature. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: remove dwc2_platform.koMian Yousaf Kaukab
As dwc2 pci module is now exporting dwc2 platform device, include platform.o in dwc2-y and remove USB_DWC2_PLATFORM configuration option. Driver will be built as two modules, dwc2.ko and dwc2_pci.ko. dwc2.ko is the new platform driver. Remove all EXPORT_SYMBOL_GPL as they are not needed any more. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: host: implement test modeJingwu Lin
Add support for SetPortFeature(PORT_TEST) for root port. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Jingwu Lin <jingwu.lin@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: host: don't use dma_alloc_coherent with irqs disabledGregory Herrero
Align buffer must be allocated using kmalloc since irqs are disabled. Coherency is handled through dma_map_single which can be used with irqs disabled. Reviewed-by: Julius Werner <jwerner@chromium.org> Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: host: spinlock urb_enqueueGregory Herrero
During urb_enqueue, if the urb can't be queued to the endpoint, the urb is freed without any spinlock protection. This leads to memory corruption when concurrent urb_dequeue try to free same urb->hcpriv. Thus, ensure the whole urb_enqueue in spinlocked. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: host: resume root hub on port connectGregory Herrero
Once hub is runtime suspended, dwc2 must resume it on port connect event. Else, roothub will stay in suspended state and will not resume transfers. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: host: add bus_suspend/bus_resume callbackGregory Herrero
Update controller state to indicate suspend entry. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: host: register handle to the phyMian Yousaf Kaukab
If phy driver is present register hcd handle to it. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: gadget: remove s3c_hsotg_ep_disable_forceMian Yousaf Kaukab
Force argument is not used anymore. Clean up leftovers from https://lkml.org/lkml/2014/12/9/283 Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: gadget: enable otg flag in dual role configurationGregory Herrero
Inform that device is otg-capable in case of otg configuration. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: gadget: powerup controller if neededGregory Herrero
During vbus session, usb controller needs to exit hibernation if it was previously in suspend state. Since controller will be resetted and configured, there is no need to restore registers. Moreover, set lx_state to L0 on B session. vbus_session callback may not be used by all platforms. Thus, controller software state needs to be set to L0 if the controller detects a valid B session. Otherwise, lx_state will remain L2 and prevent any request submission. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: gadget: prevent new request submission during suspendGregory Herrero
If usb controller is in partial power down, any write to registers may cause unpredictable behavior. Thus, prevent any new request submission once controller is in partial power down. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: gadget: ignore pm suspend/resume in L2Gregory Herrero
Nothing to be done in pm suspend/resume when controller is in L2. Don't disconnect or reset. State is already saved when putting controller in hibernation and will be restored on USB bus resume. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: gadget: use reset detect interruptGregory Herrero
ResetDet interrupt is used to detect a reset of the bus while the controller is suspended. This may happens for example when using Command Verifier. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: set parameter values in probe functionMian Yousaf Kaukab
So the parameters can be used in both host and gadget modes. Also consolidate param functions in the core.h Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: add external_id_pin_ctl core parameterGregory Herrero
This is required due to an Intel specific hardware issue. Where id- pin setup causes glitches on the interrupt line when CONIDSTSCHG interrupt is enabled. Specify external_id_pin_ctl when an external driver (for example phy) can handle id change, so that CONIDSTSCHG interrupt can be disabled from the controller. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: controller must update lx_state before releasing lockGregory Herrero
During suspend, there could a race condition between ep_queue and suspend interrupt if lx_state is updated after releasing spinlock in call_gadget(hsotg, suspend). Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: implement hibernation during bus suspend/resumeGregory Herrero
Allow controller to enter in hibernation during usb bus suspend and inform both phy and gadget about the suspended state. While in hibernation, the controller can't detect the resume condition. An external mechanism must call usb_phy_set_suspend on resume. Exit hibernation when controller gets the resume interrupt and inform only gadget driver about it. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: add controller hibernation supportGregory Herrero
When suspending usb bus, phy driver may disable controller power. In this case, registers need to be saved on suspend and restored on resume. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Gregory Herrero <gregory.herrero@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: debugfs: add support for complete register dumpMian Yousaf Kaukab
Dump all registers to take a complete snapshot of dwc2 state. Code is inspired by dwc3/debugfs.c Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-29usb: dwc2: move debugfs code to a separate fileMian Yousaf Kaukab
Prepare to add more debug code. Moreover, don't save dentry * for each file in struct dwc2_hsotg as clean up is done with debugfs_remove_recursive(). s3c_hsotg_delete_debug() is removed altogether for the same reason. Acked-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-28usb: phy: Remove the phy-rcar-gen2-usb driverGeert Uytterhoeven
The phy-rcar-gen2-usb driver, which supports legacy platform data only, is no longer used since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove legacy board support"). This driver was superseded by the DT-only phy-rcar-gen2 driver, which was introduced in commit 1233f59f745b237d ("phy: Renesas R-Car Gen2 PHY driver"). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-28usb: phy: msm: Manual PHY and LINK controller VBUS change notificationIvan T. Ivanov
VBUS is not routed to USB PHY on recent Qualcomm platforms. USB controller must see VBUS in order to pull-up DP when setting RS bit. Henc configure USB PHY and LINK registers sense VBUS and enable manual pullup on D+ line. Cc: Vamsi Krishna <vskrishn@codeaurora.org> Cc: Mayank Rana <mrana@codeaurora.org> Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-28usb: phy: msm: Use extcon framework for VBUS and ID detectionIvan T. Ivanov
On recent Qualcomm platforms VBUS and ID lines are not routed to USB PHY LINK controller. Use extcon framework to receive connect and disconnect ID and VBUS notification. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-28usb: renesas_usbhs: Revise the binding document about the dma-namesYoshihiro Shimoda
Since the DT should describe the hardware (not the driver limitation), This patch revises the binding document about the dma-names to change simple numbering as "ch%d" instead of "tx<n>" and "rx<n>". Also this patch fixes the actual code of renesas_usbhs driver to handle the new dma-names. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27usb: Documentation: gadget-testing: fix parameter for capture channel maskPeter Chen
Fix the UAC2 parameter capture channel mask Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27usb: musb: only set test mode onceBin Liu
The MUSB test mode register can only be set once, otherwise the result is undefined. This prevents the debugfs testmode entry to set the register more than once which causes test failure. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27usb: musb: fix inefficient copy of unaligned buffersJohan Hovold
Make sure only to copy any actual data rather than the whole buffer, when releasing the temporary buffer used for unaligned non-isochronous transfers. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27usb: renesas_usbhs: tidyup usbhs_for_each_dfifo macroKuninori Morimoto
Current usbhs_for_each_dfifo macro will read out-of-array's memory after last loop operation. It was not good C language operation, and the binary which was compiled by (at least) gcc 4.8.1 is broken. This patch is based on 925403f425a4a9c503f2fc295652647b1eb10d82 (usb: renesas_usbhs: tidyup original usbhsx_for_each_xxx macro) Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27usb: gadget: uvc: remove unused including <linux/version.h>Wei Yongjun
Remove including <linux/version.h> that don't need it. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-04-27Linux 4.1-rc1Linus Torvalds
2015-04-27x86_64, asm: Work around AMD SYSRET SS descriptor attribute issueAndy Lutomirski
AMD CPUs don't reinitialize the SS descriptor on SYSRET, so SYSRET with SS == 0 results in an invalid usermode state in which SS is apparently equal to __USER_DS but causes #SS if used. Work around the issue by setting SS to __KERNEL_DS __switch_to, thus ensuring that SYSRET never happens with SS set to NULL. This was exposed by a recent vDSO cleanup. Fixes: e7d6eefaaa44 x86/vdso32/syscall.S: Do not load __USER32_DS to %ss Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Peter Anvin <hpa@zytor.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Denys Vlasenko <vda.linux@googlemail.com> Cc: Brian Gerst <brgerst@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-27Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull intel drm fixes from Dave Airlie. * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg drm/i915: Workaround to avoid lite restore with HEAD==TAIL drm/i915: cope with large i2c transfers