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

2018-02-28 Thread Hans de Goede
/modify of cfg0 may race with the AML code doing the same to avoid this we take the global ACPI lock while doing the read/write/modify. Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de

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

2018-02-28 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 <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.c

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

2018-02-28 Thread Hans de Goede
y xHCI (reserved) This is useful when we want to loop through all capabilities. Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-

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

2018-02-28 Thread Hans de Goede
ogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Consistently use IS_ERR_OR_NULL where applicable -Add Andy's Revi

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

2018-02-28 Thread Hans de Goede
mode after a detach. Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Re

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

2018-02-28 Thread Hans de Goede
com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Use SPDX license header -Various small style

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

2018-02-28 Thread Hans de Goede
with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de

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

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

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

2018-02-26 Thread Hans de Goede
taking over control of the muxes for example is because handling them in the port drivers would be just boilerplate. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Revi

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

2018-02-26 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Various spelling and gramar fixes in the docs pointed out by Randy Dunlap

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

2018-02-26 Thread Hans de Goede
mode after a detach. Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Re

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

2018-02-26 Thread Hans de Goede
ernate Modes. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Re

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

2018-02-26 Thread Hans de Goede
ogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Consistently use IS_ERR_OR_NULL where applicable -Add Andy's Revi

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

2018-02-26 Thread Hans de Goede
ck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add Guenter's Reviewed-by Changes in v2: -Added Heikki's Reviewed-by --- drivers/usb/typec/Kconfig |

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

2018-02-26 Thread Hans de Goede
com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Use SPDX license header -Various small style

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

2018-02-26 Thread Hans de Goede
/modify of cfg0 may race with the AML code doing the same to avoid this we take the global ACPI lock while doing the read/write/modify. Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de

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

2018-02-26 Thread Hans de Goede
y xHCI (reserved) This is useful when we want to loop through all capabilities. Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-

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

2018-02-26 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 <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.c

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

2018-02-26 Thread Hans de Goede
y.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Replace Andy's Acked-by with his Reviewed-by Changes in v2: -Add Andy's Acked-by -Add Heikki's Reviewed-by --- drivers/platform/x86/intel_cht_int33fe.c | 25 +

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

2018-02-26 Thread Hans de Goede
with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de

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

2018-02-26 Thread Hans de Goede
Hi, On 26-02-18 11:59, Andy Shevchenko wrote: On Mon, Feb 26, 2018 at 11:09 AM, Hans de Goede <hdego...@redhat.com> wrote: Hi All, Here is version 3 of Heikki's and my USB Type-C device-connection, mux and switch support series. Version 2 and 3 bring various small code and style fixes

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

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

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

2018-02-26 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v3: -Various spelling and gramar fixes in the docs pointed out by Randy Dunlap Changes in v2: -Add a (struct devcon) cast to the DEVCON() macro --- Documentation/driver-api/dev

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

2018-02-26 Thread Hans de Goede
ogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Minor style fixes from review of v1 --- Documentation/ABI/testing/sysfs-class-usb_role | 21 ++ drivers/usb/Kconfig

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

2018-02-26 Thread Hans de Goede
y xHCI (reserved) This is useful when we want to loop through all capabilities. Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2:

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

2018-02-26 Thread Hans de Goede
ernate Modes. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v3: -Add #include-s for a few missing headers to drivers/usb/typec/mux.c -Various s

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

2018-02-26 Thread Hans de Goede
taking over control of the muxes for example is because handling them in the port drivers would be just boilerplate. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Sign

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

2018-02-26 Thread Hans de Goede
com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Use SPDX license header -Various small style cleanups / changes -Add Heikki's Reviewed-by Changes from some time ago when this patch was part of

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

2018-02-26 Thread Hans de Goede
mode after a detach. Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v3: -Add Guenter's Reviewed-by Changes in v2: -Added Heikki's Reviewed-by ---

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

2018-02-26 Thread Hans de Goede
/modify of cfg0 may race with the AML code doing the same to avoid this we take the global ACPI lock while doing the read/write/modify. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Drop unnecessary depends on EXTCON from Kconfig -Use BIT(), resource_size() -Various other

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

2018-02-26 Thread Hans de Goede
t> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v3: -Add Guenter's Reviewed-by Changes in v2: -Added Heikki's Reviewed-by --- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/fusb302.c | 1 - drivers/usb/typec/tcpm

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

2018-02-26 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 <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Cleanup pi3usb30532_set_conf() er

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

2018-02-26 Thread Hans de Goede
with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Add de

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

2018-02-26 Thread Hans de Goede
kki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Add Andy's Acked-by -Add Heikki's Reviewed-by --- drivers/platform/x86/intel_cht_int33fe.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/platform/x86/inte

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

2018-02-26 Thread Hans de Goede
Hi, On 25-02-18 19:51, Randy Dunlap wrote: 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

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

2018-02-25 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Add a (struct devcon) cast to the DEVCON() macro --- Documentation/driver-api/device_connection.rst | 43 drivers/base/Makefile | 3 +

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

2018-02-25 Thread Hans de Goede
ogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Minor style fixes from review of v1 --- Documentation/ABI/testing/sysfs-class-usb_role | 21 ++ drivers/usb/Kconfig

[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
mode after a detach. Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Added Heikki's Reviewed-by --- drivers/usb/typec/tcpm.c | 22 +++--- include/linux/usb/tcpm.h | 8 ++-- 2 f

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

2018-02-25 Thread Hans de Goede
ernate Modes. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Documentation/driver-api/usb/typec.rst | 73 +++-- drivers/usb/typec/Makefile

[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
y xHCI (reserved) This is useful when we want to loop through all capabilities. Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2:

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

2018-02-25 Thread Hans de Goede
taking over control of the muxes for example is because handling them in the port drivers would be just boilerplate. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com>

[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 <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@r

[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 <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Cleanup pi3usb30532_set_conf() er

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

2018-02-25 Thread Hans de Goede
com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Use SPDX license header -Various small style cleanups / changes -Add Heikki's Reviewed-by Changes from some time ago when this patch was part of

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

2018-02-25 Thread Hans de Goede
kki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Add Andy's Acked-by -Add Heikki's Reviewed-by --- drivers/platform/x86/intel_cht_int33fe.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/platform/x86/inte

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

2018-02-25 Thread Hans de Goede
/modify of cfg0 may race with the AML code doing the same to avoid this we take the global ACPI lock while doing the read/write/modify. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Drop unnecessary depends on EXTCON from Kconfig -Use BIT(), resource_size() -Various other

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

2018-02-25 Thread Hans de Goede
with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Add de

[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 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 <hdego...@redhat.com> 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

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 <hdego...@redhat.com> 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 th

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 <hdego...@redhat.com> 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 (devic

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 <hdego...@redhat.com> 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

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 <heikki.kroge...@linux.intel.com> diff --git a/drivers/usb/common/roles.c b/drivers/usb/common/roles.c new file mode 100644 index ..923e3721d183 --- /dev/null

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 <hdego...@redhat.com> 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 c

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 @@ obj

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

2018-02-19 Thread Hans de Goede
Hi, On 16-02-18 15:22, Heikki Krogerus wrote: On Fri, Feb 16, 2018 at 04:07:59PM +0200, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede <hdego...@redhat.com> wrote: USB role switch is a device that can be used to choose the data role for USB connector. With dua

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

2018-02-16 Thread Hans de Goede
Hi, On 16-02-18 12:07, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede <hdego...@redhat.com> wrote: From: Heikki Krogerus <heikki.kroge...@linux.intel.com> In order to allow the USB Type-C Class driver take care of things like muxes and other possible

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

2018-02-16 Thread Hans de Goede
Hi, On 16-02-18 12:00, Andy Shevchenko wrote: On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede <hdego...@redhat.com> wrote: From: Heikki Krogerus <heikki.kroge...@linux.intel.com> Several frameworks - clk, gpio, phy, pmw, etc. - maintain lookup tables for describing connections

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

2018-02-16 Thread Hans de Goede
Hi All, Some devices with an USB Type-C connector have a bunch of muxes behind that connector which need to be controlled by the kernel (rather then having them controlled by firmware as on most devices). Quite a while back I submitted a patch-series to tie together these muxes and the Type-C

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

2018-02-16 Thread Hans de Goede
ogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Documentation/ABI/testing/sysfs-class-usb_role | 21 ++ drivers/usb/Kconfig| 3 + drivers/usb/common/Makefile

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

2018-02-16 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Documentation/driver-api/device_connection.rst | 43 drivers/base/Makefile | 3 +- drivers/base/devcon.c | 139

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

2018-02-16 Thread Hans de Goede
taking over control of the muxes for example is because handling them in the port drivers would be just boilerplate. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com>

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

2018-02-16 Thread Hans de Goede
ernate Modes. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Documentation/driver-api/usb/typec.rst | 73 +++-- drivers/usb/typec/Makefile

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

2018-02-16 Thread Hans de Goede
mode after a detach. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/typec/tcpm.c | 22 +++--- include/linux/usb/tcpm.h | 8 ++-- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c

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

2018-02-16 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. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/typec/Kconfig | 1 + drivers/usb

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

2018-02-16 Thread Hans de Goede
to xhci_pci_probe(), it is added here because xhci_ext_cap_init() must be called only once. If in the future we also want to handle ext-caps on non pci xHCI HCDs from xhci_ext_cap_init() a call to it should also be added to other bus probe paths. Signed-off-by: Hans de Goede <hdego...@redhat.com>

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

2018-02-16 Thread Hans de Goede
y xhci (reserved) This is useful when we want to loop through all capabilities. Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/host/xhci-ext-caps.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deleti

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

2018-02-16 Thread Hans de Goede
/modify of cfg0 may race with the AML code doing the same to avoid this we take the global ACPI lock while doing the read/write/modify. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- MAINTAINERS| 6 + drivers/usb/Kconfig

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

2018-02-16 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. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Note this is a rewrite of my previous driver which was using the drivers/mux framework to use the new drivers/usb/typ

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

2018-02-16 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 switch integrated in the CHT SoC. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/platform/x86/intel_cht_int33fe.

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

2018-02-16 Thread Hans de Goede
with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/extcon/Kconfig | 3 +- drivers/extcon/extcon-axp288.c

Re: race condition between shutdown() and post_reset() resulting in deadlock

2018-01-16 Thread Hans de Goede
Hi, On 16-01-18 10:57, Oliver Neukum wrote: Hi, looking at your last patch I noticed something. I think it fails to work if we hit a peculiar race condition. It looks to me like we can get the following: task A pre_reset()   --> calling scsi_block_requests()

[PATCH] USB: cdc-acm: Do not log urb submission errors on disconnect

2018-01-14 Thread Hans de Goede
. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/class/cdc-acm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 8e0636c963a7..6c64ab6e80fa 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/d

Re: [PATCH] uas: Unblock scsi-requests on failure to alloc streams in post_reset

2018-01-10 Thread Hans de Goede
Hi, On 10-01-18 16:23, Oliver Neukum wrote: Am Mittwoch, den 10.01.2018, 08:13 +0100 schrieb Hans de Goede: If we return 1 from our post_reset handler, then our disconnect handler will be called immediately afterwards. Since pre_reset blocks all scsi requests our disconnect handler

[PATCH] uas: Unblock scsi-requests on failure to alloc streams in post_reset

2018-01-09 Thread Hans de Goede
error") Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/storage/uas.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 5d04c40ee40a..5471422aa1ab 100644 --- a/drivers/usb/storage/uas

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-12-07 Thread Hans de Goede
Hi, On 07-12-17 16:00, Heikki Krogerus wrote: Hi Hans, On Tue, Dec 05, 2017 at 03:56:05PM +0100, Hans de Goede wrote: Hi, On 01-12-17 09:38, Heikki Krogerus wrote: Hi, Thanks for taking a look at this.. On Sun, Nov 26, 2017 at 12:23:31PM +0100, Hans de Goede wrote: Hi Heiko, On 28-09-17

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-12-05 Thread Hans de Goede
Hi, On 01-12-17 09:38, Heikki Krogerus wrote: Hi, Thanks for taking a look at this.. On Sun, Nov 26, 2017 at 12:23:31PM +0100, Hans de Goede wrote: Hi Heiko, On 28-09-17 13:35, Heikki Krogerus wrote: Hi guys, The bus allows SVID specific communication with the partners to be handled

[PATCH] uas: Remove US_FL_NO_ATA_1X unusual device entries for Seagate devices

2017-11-29 Thread Hans de Goede
Since commit 7fee72d5e8f1 ("uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices"), the US_FL_NO_ATA_1X is always set for Seagate devices, so the per device unusual_uas.h entries for Seagate devices can be removed. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- dri

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-11-26 Thread Hans de Goede
Hi Heiko, On 28-09-17 13:35, Heikki Krogerus wrote: Hi guys, The bus allows SVID specific communication with the partners to be handled in separate drivers for each alternate mode. Alternate mode handling happens with two separate logical devices: 1. Partner alternate mode devices which

Re: [RFC PATCH v2 6/7] typec: tcpm: Represent source supply through power_supply class

2017-11-25 Thread Hans de Goede
Hi, On 11/24/2017 01:19 PM, Heikki Krogerus wrote: Hi, On Tue, Nov 14, 2017 at 11:44:47AM +, Adam Thomson wrote: diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 78983e1..7c26c3d 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -12,6 +12,7 @@

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-15 Thread Hans de Goede
Hi, On 15-11-17 10:06, Oliver Neukum wrote: Am Dienstag, den 14.11.2017, 18:44 +0100 schrieb Hans de Goede: Greg, please do no merge the 2 recent uas seagate quirks I send then. I will submit a patch with the new approach right away. Hi, I am afraid in that case we will need a way

[PATCH] uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices

2017-11-14 Thread Hans de Goede
We've been adding this as a quirk on a per device basis hoping that newer disk enclosures would do better, but that has not happened, so simply apply this quirk to all Seagate devices. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/storage/uas-detect.h | 4

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Hans de Goede
Hi, On 11/14/2017 04:25 PM, Alan Stern wrote: On Tue, 14 Nov 2017, Hans de Goede wrote: Hi, On 14-11-17 15:00, Hans de Goede wrote: Just like all previous UAS capable Seagate disk enclosures, this one needs a US_FL_NO_ATA_1X quirk. Cc: sta...@vger.kernel.org # 3.16 Reported-by: Wido <w

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Hans de Goede
Hi, On 14-11-17 15:00, Hans de Goede wrote: Just like all previous UAS capable Seagate disk enclosures, this one needs a US_FL_NO_ATA_1X quirk. Cc: sta...@vger.kernel.org # 3.16 Reported-by: Wido <wido...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> So far we've

[PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-14 Thread Hans de Goede
Just like all previous UAS capable Seagate disk enclosures, this one needs a US_FL_NO_ATA_1X quirk. Cc: sta...@vger.kernel.org # 3.16 Reported-by: Wido <wido...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/storage/unusual_uas.h | 7 +++ 1 fil

Re: [PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-13 Thread Hans de Goede
Hi, On 13-11-17 07:14, Jérôme Carretero wrote: On Mon, 13 Nov 2017 07:01:30 +0300 Andrey Astafyev <1...@246060.ru> wrote: 13.11.2017 00:42, Jérôme Carretero пишет: Nov 12 16:20:59 Bidule kernel: sd 22:0:0:0: [sdaa] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT [...] Do you see

[PATCH] uas: Add US_FL_NO_ATA_1X quirk for one more Seagate device

2017-11-10 Thread Hans de Goede
Just like all previous UAS capable Seagate disk enclosures, this one needs a US_FL_NO_ATA_1X quirk. Cc: sta...@vger.kernel.org # 3.16 Signed-off-by: Andrey Astafyev <1...@246060.ru> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/storage/unusual_uas.h | 7 +++

Re: Seagate Backup Plus UAS patch

2017-11-05 Thread Hans de Goede
Hi, On 05-11-17 13:00, Andrey Astafyev wrote: Hello. Please, add Seagate Backup Plus entry to unusual devices list. As Greg already mentioned you need to submit this as a proper patch following the kernel's patch-submission guidelines. If you don't know how to do that I can do this for you,

Re: [PATCH v3 10/14] extcon: intel-int3496: Add support for controlling the USB-role mux

2017-10-18 Thread Hans de Goede
Hi, On 18-10-17 04:33, Chanwoo Choi wrote: Hi Hans, On 2017년 09월 23일 03:37, Hans de Goede wrote: Cherry Trail SoCs have a built-in USB-role mux for switching between the host and device controllers, rather then using an external mux controller by a GPIO. There is a driver using the mux

[PATCH 4.14 REGRESSION fix] USB: devio: Revert "USB: devio: Don't corrupt user memory"

2017-10-16 Thread Hans de Goede
uxfoundation.org> Cc: sta...@vger.kernel.org Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/core/devio.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 4664e543cf2f..e9326f31db8d 100644

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-25 Thread Hans de Goede
Hi, On 25-09-17 15:45, Peter Rosin wrote: On 2017-09-25 13:35, Hans de Goede wrote: Hi, On 25-09-17 12:34, Peter Rosin wrote: On 2017-09-13 17:48, Hans de Goede wrote: Hi, On 13-09-17 17:07, Rob Herring wrote: On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede <hdego...@redhat.com> wrot

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-25 Thread Hans de Goede
Hi, On 25-09-17 12:34, Peter Rosin wrote: On 2017-09-13 17:48, Hans de Goede wrote: Hi, On 13-09-17 17:07, Rob Herring wrote: On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede <hdego...@redhat.com> wrote: Hi, On 13-09-17 15:38, Rob Herring wrote: On Wed, Sep 13, 2017 at 3:56 AM, H

[PATCH v3 06/14] xhci: Add option to get next extended capability in list by passing id = 0

2017-09-22 Thread Hans de Goede
y xhci (reserved) This is useful when we want to loop through all capabilities. Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/usb/host/xhci-ext-caps.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deleti

[PATCH v3 03/14] mux: core: Add of_mux_control_get helper function

2017-09-22 Thread Hans de Goede
for getting muxes on non DT platforms. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- drivers/mux/core.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mux/core.c b/drivers/mux/core.c index d0ad56abca2a..8c0a4c83cdc5 100644 --- a/drivers/mux/

[PATCH v3 01/14] mux: core: Add mux_control_get_optional() API

2017-09-22 Thread Hans de Goede
gh, so add a mux_control_get_optional() API that allows the driver to differentiate errors getting the mux from there not being a mux for the driver to use at all. Signed-off-by: Stephen Boyd <stephen.b...@linaro.org> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Document

[PATCH v3 02/14] mux: core: Add explicit hook to leave the mux as-is on init/registration

2017-09-22 Thread Hans de Goede
nsumer can access it and set a state that destroys booting all the same. 2. The mux controller might linger in a state that is not the preferred idle state indefinitely, if no mux consumer ever selects and then deselects the mux. Signed-off-by: Hans de Goede <hdego...@redhat.com> ---

[PATCH v3 04/14] mux: core: Add support for getting a mux controller on a non DT platform

2017-09-22 Thread Hans de Goede
controller on a non DT platform following this pattern. It is based on a simplified version of the pwm subsys lookup code, the dev_id and mux_name parts of a lookup table entry are mandatory in the mux-core implementation. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2:

[PATCH v3 05/14] mux: core: Add usb.h header with MUX_USB_* and and MUX_TYPEC_* state constants

2017-09-22 Thread Hans de Goede
Add MUX_USB_* and MUX_TYPEC_* state constant defines, which can be used by USB device/host, resp. Type-C polarity/role/altmode mux drivers and consumers to ensure that they agree on the meaning of the mux_control_select() state argument. Signed-off-by: Hans de Goede <hdego...@redhat.

[PATCH v3 07/14] xhci: Add Intel cherrytrail extended cap / otg phy mux handling

2017-09-22 Thread Hans de Goede
(), it is added here because xhci_ext_cap_init() must be called only once. If in the future we also want to handle ext-caps on non pci XHCI HCDs from xhci_ext_cap_init() a call to it should also be added to other bus probe paths. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes

[PATCH v3 08/14] mux: Add Intel Cherrytrail USB mux driver

2017-09-22 Thread Hans de Goede
the Intel Vendor Defined XHCI extended capabilities region. Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v2: -Complete rewrite as a stand-alone platform-driver rather then as a phy driver, since this is just a mux, not a phy Changes in v3: -Make this a mux subsys driver inst

<    1   2   3   4   5   6   7   8   9   10   >