Re: [PATCH RFC] ehci-omap: simple suspend implementation

2018-02-25 Thread Andreas Kemnade
Hi, On Mon, 19 Feb 2018 11:41:36 +0200 Roger Quadros wrote: > Andreas, > > On 16/02/18 20:35, Andreas Kemnade wrote: > > On Fri, 16 Feb 2018 13:13:11 -0500 (EST) > > Alan Stern wrote: > > > >> On Fri, 16 Feb 2018, Andreas Kemnade wrote: > >> >

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

2018-02-25 Thread Peter Chen
On Sun, Feb 18, 2018 at 07:44:58PM +0100, Martin Blumenstingl wrote: > 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 >

Re: Continuous USB resets on NXP i.MX 6ULL device

2018-02-25 Thread Peter Chen
On Mon, Feb 12, 2018 at 03:56:52PM +0100, Stefan Agner wrote: > Hi Peter, > > Our Colibri iMX6ULL is using NXP i.MX6 ULL in USB host mode. With > 4.15-rc3 and 4.16-rc1 I noticed that when a USB Hub is connected to the > USB OTG controller in host mode, Linux continuously resets the USB > device

Re: [PATCH v2 06/12] usb: typec: tcpm: Use new Type-C switch/mux and usb-role-switch functions

2018-02-25 Thread Guenter Roeck
On 02/25/2018 07:25 AM, Hans de Goede wrote: Remove the unused (not implemented anywhere) tcpc_mux_dev abstraction and replace it with calling the new typec_set_orientation, usb_role_switch_set and typec_set_mode functions. Reviewed-by: Heikki Krogerus

Re: [PATCH v2 02/12] usb: typec: Start using ERR_PTR

2018-02-25 Thread Guenter Roeck
On 02/25/2018 07:25 AM, Hans de Goede wrote: From: Heikki Krogerus In order to allow the USB Type-C Class driver take care of things like muxes and other possible dependencies for the port drivers, returning ERR_PTR instead of NULL from the registration

Re: [PATCH v2 05/12] usb: typec: tcpm: Set USB role switch to device mode when configured as such

2018-02-25 Thread Guenter Roeck
On 02/25/2018 07:25 AM, Hans de Goede wrote: Setting the mux to MUX_NONE and the switch to USB_SWITCH_DISCONNECT when the data-role is device is not correct. Plenty of devices support operating as USB device through a (separate) USB device controller. We really need 2 different versions of

Re: [PATCH v2 03/12] usb: typec: API for controlling USB Type-C Multiplexers

2018-02-25 Thread Randy Dunlap
On 02/25/2018 07:25 AM, Hans de Goede wrote: > From: Heikki Krogerus > > --- > Documentation/driver-api/usb/typec.rst | 73 +++-- > drivers/usb/typec/Makefile | 1 + > drivers/usb/typec/{typec.c => class.c} | 70 >

Re: [PATCH v2 01/12] drivers: base: Unified device connection lookup

2018-02-25 Thread Randy Dunlap
On 02/25/2018 07:24 AM, Hans de Goede wrote: > From: Heikki Krogerus > > Several frameworks - clk, gpio, phy, pmw, etc. - maintain > lookup tables for describing connections and provide custom > API for handling them. This introduces a single generic > lookup

Re: [PATCH v2 12/12] extcon: axp288: Set USB role where necessary

2018-02-25 Thread Randy Dunlap
Hi, On 02/25/2018 07:25 AM, Hans de Goede wrote: > diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig > index a7bca4207f44..de15bf55895b 100644 > --- a/drivers/extcon/Kconfig > +++ b/drivers/extcon/Kconfig > @@ -30,7 +30,8 @@ config EXTCON_ARIZONA > > config EXTCON_AXP288 >

Re: [PATCH v2 09/12] usb: roles: Add Intel xHCI USB role switch driver

2018-02-25 Thread Randy Dunlap
On 02/25/2018 07:25 AM, Hans de Goede wrote: > diff --git a/drivers/usb/roles/Kconfig b/drivers/usb/roles/Kconfig > new file mode 100644 > index ..f5a5e6f79f1b > --- /dev/null > +++ b/drivers/usb/roles/Kconfig > @@ -0,0 +1,14 @@ > +if USB_ROLE_SWITCH > + > +config USB_ROLES_INTEL_XHCI

Re: [PATCH v3] usb: core: Add "quirks" parameter for usbcore

2018-02-25 Thread Kai-Heng Feng
On Sun, Feb 25, 2018 at 11:18 PM, Matthew Wilcox wrote: > On Sun, Feb 25, 2018 at 08:38:33PM +0800, Kai-Heng Feng wrote: >> v2: Use in-kernel tolower() function. > > ... why are you using tolower at all? > > You've got 13 quirks already; you may need to use upper case as well

[PATCH v2 01/12] drivers: base: Unified device connection lookup

2018-02-25 Thread Hans de Goede
From: Heikki Krogerus Several frameworks - clk, gpio, phy, pmw, etc. - maintain lookup tables for describing connections and provide custom API for handling them. This introduces a single generic lookup table and API for the connections. The motivation for this

[PATCH v2 04/12] usb: common: Small class for USB role switches

2018-02-25 Thread Hans de Goede
From: Heikki Krogerus USB role switch is a device that can be used to choose the data role for USB connector. With dual-role capable USB controllers, the controller itself will be the switch, but on some platforms the USB host and device controllers are separate

[PATCH v2 05/12] usb: typec: tcpm: Set USB role switch to device mode when configured as such

2018-02-25 Thread Hans de Goede
Setting the mux to MUX_NONE and the switch to USB_SWITCH_DISCONNECT when the data-role is device is not correct. Plenty of devices support operating as USB device through a (separate) USB device controller. We really need 2 different versions of USB_SWITCH_CONNECT, USB_SWITCH_CONNECT_HOST and

[PATCH v2 03/12] usb: typec: API for controlling USB Type-C Multiplexers

2018-02-25 Thread Hans de Goede
From: Heikki Krogerus USB Type-C connectors consist of various muxes and switches that route the pins on the connector to the right locations. The USB Type-C drivers need to be able to control the muxes, as they are the ones that know things like the cable plug

[PATCH v2 07/12] xhci: Add option to get next extended capability in list by passing id = 0

2018-02-25 Thread Hans de Goede
From: Mathias Nyman Modify xhci_find_next_ext_cap(base, offset, id) to return the next capability offset if 0 is passed for id. Otherwise it will behave as previously and return the offset of the next capability with matching id capability id 0 is not used by xHCI

[PATCH v2 02/12] usb: typec: Start using ERR_PTR

2018-02-25 Thread Hans de Goede
From: Heikki Krogerus In order to allow the USB Type-C Class driver take care of things like muxes and other possible dependencies for the port drivers, returning ERR_PTR instead of NULL from the registration functions in case of failure. The reason for taking

[PATCH v2 06/12] usb: typec: tcpm: Use new Type-C switch/mux and usb-role-switch functions

2018-02-25 Thread Hans de Goede
Remove the unused (not implemented anywhere) tcpc_mux_dev abstraction and replace it with calling the new typec_set_orientation, usb_role_switch_set and typec_set_mode functions. Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede ---

[PATCH v2 10/12] usb: typec: driver for Pericom PI3USB30532 Type-C cross switch

2018-02-25 Thread Hans de Goede
Add a driver for the Pericom PI3USB30532 Type-C cross switch / mux chip found on some devices with a Type-C port. Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede --- Changes in v2: -Cleanup pi3usb30532_set_conf() error handling

[PATCH v2 08/12] xhci: Add Intel extended cap / otg phy mux handling

2018-02-25 Thread Hans de Goede
The xHCI controller on various Intel SoCs has an extended cap mmio-range which contains registers to control the muxing to the xHCI (host mode) or the dwc3 (device mode) and vbus-detection for the otg usb-phy. Having a role-sw driver included in the xHCI code (under drivers/usb/host) is not

[PATCH v2 11/12] platform/x86: intel_cht_int33fe: Add device connections for the Type-C port

2018-02-25 Thread Hans de Goede
We need to add device-connections for the Type-C mux/switch and usb-role code to be able to find the PI3USB30532 Type-C cross-switch and the device/host role-switch integrated in the CHT SoC. Acked-by: Andy Shevchenko Reviewed-by: Heikki Krogerus

[PATCH v2 09/12] usb: roles: Add Intel xHCI USB role switch driver

2018-02-25 Thread Hans de Goede
Various Intel SoCs (Cherry Trail, Broxton and others) have an internal USB role switch for swiching the OTG USB data lines between the xHCI host controller and the dwc3 gadget controller. Note on some Cherry Trail systems there is ACPI/AML code listening to edge interrupts on the id-pin (through

[PATCH v2 12/12] extcon: axp288: Set USB role where necessary

2018-02-25 Thread Hans de Goede
The AXP288 BC1.2 charger detection / extcon code may seem like a strange place to add code to control the USB role-switch on devices with an AXP288, but there are 2 reasons to do this inside the axp288 extcon code: 1) On many devices the USB role is controlled by ACPI AML code, but the AML

[PATCH v2 00/12] USB Type-C device-connection, mux and switch support

2018-02-25 Thread Hans de Goede
Hi All, Here is version 2 of Heikki's and my USB Type-C device-connection, mux and switch support series. Version 2 brings various small code and style fixes based on review of v1 (no major changes). Here is the cover-letter of v1: Some devices with an USB Type-C connector have a bunch of muxes

Re: [PATCH v3] usb: core: Add "quirks" parameter for usbcore

2018-02-25 Thread Matthew Wilcox
On Sun, Feb 25, 2018 at 08:38:33PM +0800, Kai-Heng Feng wrote: > v2: Use in-kernel tolower() function. ... why are you using tolower at all? You've got 13 quirks already; you may need to use upper case as well before too long. > + quirk = vmalloc(sizeof(struct quirk_entry));

Re: [PATCH 12/12] extcon: axp288: Set USB role where necessary

2018-02-25 Thread Hans de Goede
Hi, On 16-02-18 14:19, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote: The AXP288 BC1.2 charger detection / extcon code may seem like a strange place to add code to control the USB role-switch on devices with an AXP288, but there are 2

Re: [PATCH 09/12] usb: roles: Add Intel XHCI USB role switch driver

2018-02-25 Thread Hans de Goede
Hi, On 16-02-18 14:47, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote: Various Intel SoCs (Cherry Trail, Broxton and others) have an internal USB role switch for swiching the OTG USB data lines between the xHCI host controller and the dwc3

Re: [PATCH 08/12] xhci: Add Intel extended cap / otg phy mux handling

2018-02-25 Thread Hans de Goede
Hi, On 16-02-18 14:53, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote: The xHCI controller on various Intel SoCs has an extended cap mmio-range which contains registers to control the muxing to the xHCI (host mode) or the dwc3 (device mode)

[PATCH v3] usb: core: Add "quirks" parameter for usbcore

2018-02-25 Thread Kai-Heng Feng
Trying quirks in usbcore needs to rebuild the driver or the entire kernel if it's builtin. It can save a lot of time if usbcore has similar ability like "usbhid.quirks=" and "usb-storage.quirks=". Rename the original quirk detection function to "static" as we introduce this new "dynamic"

Re: [PATCH 04/12] usb: common: Small class for USB role switches

2018-02-25 Thread Hans de Goede
Hi, On 16-02-18 15:07, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote: USB role switch is a device that can be used to choose the data role for USB connector. With dual-role capable USB controllers, the controller itself will be the switch,

Re: [PATCH 04/12] usb: common: Small class for USB role switches

2018-02-25 Thread Hans de Goede
Hi, On 16-02-18 19:33, Randy Dunlap wrote: On 02/16/2018 02:47 AM, Hans de Goede wrote: From: Heikki Krogerus diff --git a/drivers/usb/common/roles.c b/drivers/usb/common/roles.c new file mode 100644 index ..923e3721d183 --- /dev/null +++

Re: [RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON'

2018-02-25 Thread Andy Shevchenko
On Sat, Feb 24, 2018 at 4:50 PM, Masahiro Yamada wrote: > Also, make MFD_SYSCON 'default y' because some defconfig files may > rely on someone select's MFD_SYSCON. I'm not sure this is right thing to do. You basically imply that there always a user of it. --

Re: [PATCH 03/12] usb: typec: API for controlling USB Type-C Multiplexers

2018-02-25 Thread Hans de Goede
Hi, On 16-02-18 15:00, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote: USB Type-C connectors consist of various muxes and switches that route the pins on the connector to the right locations. The USB Type-C drivers need to be able to control

Re: [PATCH 09/12] usb: roles: Add Intel XHCI USB role switch driver

2018-02-25 Thread Hans de Goede
Hi, On 16-02-18 14:38, Heikki Krogerus wrote: On Fri, Feb 16, 2018 at 11:47:48AM +0100, Hans de Goede wrote: diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 060643a1b5c8..7d1b8c82b208 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -65,3 +65,5 @@

Re: [RFC PATCH] usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers

2018-02-25 Thread Sergei Shtylyov
Hello! On 2/24/2018 11:51 PM, Merlijn Wajer wrote: Without pm_runtime_{get,put}_sync calls in place, reading vbus status via /sys causes the following error: Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa0ab060 pgd = b333e822 [fa0ab060] *pgd=48011452(bad) []