[PATCH] usb: dwc2: detect power supplies to reduce spam

2018-03-03 Thread Ioan-Adrian Ratiu
By statically hardcoding at compile time the number of supplies ("#define DWC2_NUM_SUPPLIES ARRAY_SIZE(dwc2_hsotg_supply_names)"), the driver assumed that every controller uses supplies and issued a warning if none were detected via the device tree [1], even though the vast majority of devices

[PATCH AUTOSEL for 4.9 146/219] usb: dwc2: Make sure we disconnect the gadget state

2018-03-03 Thread Sasha Levin
From: John Stultz [ Upstream commit dad3f793f20fbb5c0c342f0f5a0bdf69a4d76089 ] I had seen some odd behavior with HiKey's usb-gadget interface that I finally seemed to have chased down. Basically every other time I plugged in the OTG port, the gadget interface would

[PATCH AUTOSEL for 4.4 073/115] usb: dwc2: Make sure we disconnect the gadget state

2018-03-03 Thread Sasha Levin
From: John Stultz [ Upstream commit dad3f793f20fbb5c0c342f0f5a0bdf69a4d76089 ] I had seen some odd behavior with HiKey's usb-gadget interface that I finally seemed to have chased down. Basically every other time I plugged in the OTG port, the gadget interface would

Re: [PATCH usb-next v2 0/3] DWC3 support for Amlogic Meson AXG and GXL SoCs

2018-03-03 Thread Martin Blumenstingl
Hello Felipe, Hello Greg, On Tue, Feb 20, 2018 at 11:39 PM, Martin Blumenstingl wrote: > Hello Felipe, > > On Sun, Feb 11, 2018 at 10:15 PM, Martin Blumenstingl > wrote: >> Amlogic Meson AXG and GXL SoCs can use the

[usb-next PATCH v11 3/8] usb: core: add a wrapper for the USB PHYs on the HCD

2018-03-03 Thread Martin Blumenstingl
Many SoC platforms have separate devices for the USB PHY which are registered through the generic PHY framework. These PHYs have to be enabled to make the USB controller actually work. They also have to be disabled again on shutdown/suspend. Currently (at least) the following HCI platform drivers

[usb-next PATCH v11 5/8] usb: host: xhci-mtk: remove custom USB PHY handling

2018-03-03 Thread Martin Blumenstingl
The new PHY wrapper is now wired up in the core HCD code. This means that PHYs are now controlled (initialized, enabled, disabled, exited) without requiring any host-driver specific code. Remove the custom USB PHY handling from the xhci-mtk driver as the core HCD code now handles this.

[usb-next PATCH v11 1/8] dt-bindings: usb: add the documentation for USB HCDs

2018-03-03 Thread Martin Blumenstingl
A USB HCD may have several PHYs which need to be configured before the the HCD starts working. This adds the documentation for such a USB HCD as well as a reference to the new "usb-hcd.txt" from all bindings that implement a USB HCD which support one USB PHY per port. Signed-off-by: Martin

[usb-next PATCH v11 4/8] usb: core: hcd: integrate the PHY wrapper into the HCD core

2018-03-03 Thread Martin Blumenstingl
This integrates the PHY wrapper into the core hcd infrastructure. Multiple PHYs which are part of the HCD's device tree node are now managed (= powered on/off when needed), by the new usb_phy_roothub code. Suspend and resume is also supported, however not for runtime/auto-suspend (which is

[usb-next PATCH v11 6/8] usb: host: ehci-platform: remove custom USB PHY handling

2018-03-03 Thread Martin Blumenstingl
The new PHY wrapper is now wired up in the core HCD code. This means that PHYs are now controlled (initialized, enabled, disabled, exited) without requiring any host-driver specific code. Remove the custom USB PHY handling from the ehci-platform driver as the core HCD code now handles this.

[usb-next PATCH v11 8/8] usb: core: hcd: remove support for initializing a single PHY

2018-03-03 Thread Martin Blumenstingl
With the new PHY wrapper in place we can now handle multiple PHYs. Remove the code which handles only one generic PHY as this is now covered (with support for multiple PHYs as well as suspend/resume support) by the new PHY wrapper. Signed-off-by: Martin Blumenstingl

[usb-next PATCH v11 7/8] usb: host: ohci-platform: remove custom USB PHY handling

2018-03-03 Thread Martin Blumenstingl
The new PHY wrapper is now wired up in the core HCD code. This means that PHYs are now controlled (initialized, enabled, disabled, exited) without requiring any host-driver specific code. Remove the custom USB PHY handling from the ohci-platform driver as the core HCD code now handles this.

[usb-next PATCH v11 2/8] usb: add a flag to skip PHY initialization to struct usb_hcd

2018-03-03 Thread Martin Blumenstingl
The USB HCD core driver parses the device-tree node for "phys" and "usb-phys" properties. It also manages the power state of these PHYs automatically. However, drivers may opt-out of this behavior by setting "phy" or "usb_phy" in struct usb_hcd to a non-null value. An example where this is

[usb-next PATCH v11 0/8] initialize (multiple) PHYs for a HCD

2018-03-03 Thread Martin Blumenstingl
The goal of this series is to initialize multiple PHYs on a USB host controller, which is needed on Amlogic Meson GXL and GXM SoCs. - Amlogic Meson GXL and GXM SoCs come with a dwc3 IP block which has two or three USB2 ports enabled on the internal root-hub. The SoCs also provide separate USB2

Re: WARN_ON(irqs_disabled()) in dma_free_attrs?

2018-03-03 Thread Fredrik Noring
Christoph, Alan, > If it is allocating / freeing this memory all the time in the hot path > it should really use a dma pool (see include/ilinux/dmapool.h). > The dma coherent APIs aren't really built for being called in the > hot path. hcd_buffer_free uses a combination of dma pools and dma