Re: [PATCH v5 3/5] dt-bindings: usb: fusb302: remove max-sink-* properties

2018-04-20 Thread Heikki Krogerus
On Mon, Apr 16, 2018 at 02:54:35PM +0800, Li Jun wrote: > Remove max-sink-* properties since they are deprecated. > > Reviewed-by: Rob Herring > Reviewed-by: Hans de Goede > Signed-off-by: Li Jun FWIW: Revieved-by: Heikki Krogerus > --- > Documentation/devicetree/bin

Re: [PATCH] usb: roles: intel_xhci: Don't use PMIC for port type identification

2018-04-20 Thread Heikki Krogerus
On Fri, Apr 20, 2018 at 11:16:05AM +0200, Hans de Goede wrote: > Hi Heikki, > > On 20-04-18 10:06, Heikki Krogerus wrote: > > This will add an array of known USB Type-C Port devices that > > will be used as a blacklist for enabling userspace-control, > > and remove

[PATCH] usb: roles: intel_xhci: Don't use PMIC for port type identification

2018-04-20 Thread Heikki Krogerus
therefore not usable for determining the port type. The driver now searches for known USB Type-C port devices instead. Signed-off-by: Heikki Krogerus --- Hi Hans, So it seems that we can't rely on the PMIC. This is my proposal for a fix. I'm in practice just using blacklist instead of

[PATCH 1/2] usb: typec: tps6598x: handle block reads separately with plain-I2C adapters

2018-04-18 Thread Heikki Krogerus
choose to use it in this case for convenience. It is easy to remove once we figure out how to handle this kind of cases in regmap-i2c. Fixes: 0a4c005bd171 ("usb: typec: driver for TI TPS6598x USB Power Delivery controllers") Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tps65

[PATCH 0/2] usb: typec: fixes

2018-04-18 Thread Heikki Krogerus
Hi, I got two separate fixes here. First one will fix an issue with ucsi where the driver may timeout if EC is under heavy load, and the second an issue with tps6598x when used with plain I2C adapters. Thanks, Heikki Krogerus (2): usb: typec: tps6598x: handle block reads separately with

[PATCH 2/2] usb: typec: ucsi: Increase command completion timeout value

2018-04-18 Thread Heikki Krogerus
On some boards, under heavy load, the EC firmware is unable to complete commands even in one second. Increasing the command completion timeout value to five seconds. Reported-by: Quanxian Wang Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Cc: Signed-off-by: Heikk

Re: [PATCH] usb: typec: ucsi: fix link error on randconfig

2018-04-12 Thread Heikki Krogerus
On Tue, Apr 10, 2018 at 10:51:13AM +0300, Heikki Krogerus wrote: > If building a kernel without FTRACE but with TRACING, > ucsi.ko fails to link due to missing trace events. Fix this > by using the correct Kconfig symbol on Makefile. > > Reported-by: Tobias Regnery > Fixes:

Re: [PATCH v2] usb: typec: ucsi: fix tracepoint related build error

2018-04-12 Thread Heikki Krogerus
. Change this to depend on CONFIG_TRACING like > other users of tracepoints do. > > Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") > Signed-off-by: Tobias Regnery Acked-by: Heikki Krogerus Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Lenovo ThinkVision X1 27" USB-C occasionally hangs the kernel (usbhid) and isn't setting a proper resolution when USB 3.0 (FHD) switched to USB 2.0 (UHD)

2018-04-11 Thread Heikki Krogerus
On Wed, Apr 11, 2018 at 02:09:29PM +0300, Heikki Krogerus wrote: > On Wed, Apr 11, 2018 at 08:28:44AM +, andrey.ara...@nixaid.com wrote: > > Thank you for the insights, Heikki! > > > > Please find the acpi.dump.tgz file is a attached. > > > > I do not ha

Re: [PATCH] usb: role: rcar-usb3-role-switch: add support for R-Car SoCs

2018-04-11 Thread Heikki Krogerus
On Wed, Apr 11, 2018 at 03:15:23AM +, Yoshihiro Shimoda wrote: > > > + host_node = of_parse_phandle(pdev->dev.of_node, "renesas,host", > > > 0); > > > + if (!host_node) > > > + return -ENODEV; > > > + > > > + pdev_host = of_find_device_by_node(host_node); > > >

Re: [PATCH] usb: role: rcar-usb3-role-switch: add support for R-Car SoCs

2018-04-11 Thread Heikki Krogerus
On Tue, Apr 10, 2018 at 09:03:46PM +0900, Yoshihiro Shimoda wrote: > This patch adds role switch support for R-Car SoCs. Some R-Car SoCs > (e.g. R-Car H3) have USB 3.0 dual-role device controller which has > the USB 3.0 xHCI host and Renesas USB 3.0 peripheral. > > Unfortunately, the mode change r

Re: Lenovo ThinkVision X1 27" USB-C occasionally hangs the kernel (usbhid) and isn't setting a proper resolution when USB 3.0 (FHD) switched to USB 2.0 (UHD)

2018-04-10 Thread Heikki Krogerus
On Tue, Apr 10, 2018 at 09:05:07AM +, andrey.ara...@nixaid.com wrote: > Dear Linux Kernel Devs, > > I have recently got a Lenovo ThinkVision X1 27" monitor, it is connected to my > laptop over a USB-C cable (DisplayPort). > > This monitor has a built-in USB hub with a toggle button, when pres

[PATCH] usb: typec: ucsi: fix link error on randconfig

2018-04-10 Thread Heikki Krogerus
If building a kernel without FTRACE but with TRACING, ucsi.ko fails to link due to missing trace events. Fix this by using the correct Kconfig symbol on Makefile. Reported-by: Tobias Regnery Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Cc: Signed-off-by: Heikk

Re: [PATCH] usb: typec: ucsi: fix tracepoint related build error

2018-04-10 Thread Heikki Krogerus
Hi Tobias, On Mon, Apr 09, 2018 at 01:40:53PM +0200, Tobias Regnery wrote: > You are right, building a defconfig, enable the UCSI driver and disable > CONFIG_FTRACE indeed builds without problems. So it must be some other > combination of config options. Attached is the randconfig which triggers >

Re: [PATCH] usb: typec: ucsi: fix tracepoint related build error

2018-04-09 Thread Heikki Krogerus
On Mon, Apr 09, 2018 at 09:55:17AM +0200, Tobias Regnery wrote: > The ucsi driver defines several tracepoints, but the header file with the > tracepoint definition trace.h is only conditionally built depending on > CONFIG_FTRACE. You mean trace.c, right? The definitions are indeed in the header, t

[PATCH v2] Documentation: typec.rst: Use literal-block element with ascii art

2018-04-06 Thread Heikki Krogerus
Using reStructuredText literal-block element with ascii-art. That prevents the ascii art from being processed as reStructuredText. Reported-by: Masanari Iida Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers") Signed-off-by: Heikki Krogerus --- Change

Re: make xmldocs failed with error after 4.17 merge period

2018-04-06 Thread Heikki Krogerus
Hi Markus, On Fri, Apr 06, 2018 at 12:03:55PM +0200, Markus Heiser wrote: > >> There are ways to do this, look at how the v4l2 and I think the drm > >> subsystems handle ascii art such that "real" drawings end up being > >> produced. > > > > Thanks. I did not actually find anything else except us

Re: [PATCH] Documentation: typec.rst: Mark ascii art as a comment

2018-04-06 Thread Heikki Krogerus
On Fri, Apr 06, 2018 at 11:22:29AM +0300, Heikki Krogerus wrote: > To prevent processing of ascii art as reStructuredText > elements, marking it as a comment. I will change this, and use literal-block instead. > Reported-by: Masanari Iida > Fixes: bdecb33af34f ("usb: typec: AP

Re: make xmldocs failed with error after 4.17 merge period

2018-04-06 Thread Heikki Krogerus
On Fri, Apr 06, 2018 at 10:30:10AM +0200, Greg KH wrote: > On Fri, Apr 06, 2018 at 11:15:55AM +0300, Heikki Krogerus wrote: > > On Fri, Apr 06, 2018 at 09:57:34AM +0200, Greg KH wrote: > > > On Fri, Apr 06, 2018 at 10:51:09AM +0300, Heikki Krogerus wrote: > > > > On F

[PATCH] Documentation: typec.rst: Mark ascii art as a comment

2018-04-06 Thread Heikki Krogerus
To prevent processing of ascii art as reStructuredText elements, marking it as a comment. Reported-by: Masanari Iida Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers") Signed-off-by: Heikki Krogerus --- Documentation/driver-api/usb/typec.rst | 2 +- 1 fi

Re: make xmldocs failed with error after 4.17 merge period

2018-04-06 Thread Heikki Krogerus
On Fri, Apr 06, 2018 at 09:57:34AM +0200, Greg KH wrote: > On Fri, Apr 06, 2018 at 10:51:09AM +0300, Heikki Krogerus wrote: > > On Fri, Apr 06, 2018 at 12:38:42PM +0900, Masanari Iida wrote: > > > After merge following patch during 4.17 merger period, > > > make xmldo

Re: make xmldocs failed with error after 4.17 merge period

2018-04-06 Thread Heikki Krogerus
On Fri, Apr 06, 2018 at 12:38:42PM +0900, Masanari Iida wrote: > After merge following patch during 4.17 merger period, > make xmldocs start to fail with error. > > [bdecb33af34f79cbfbb656661210f77c8b8b5b5f] > usb: typec: API for controlling USB Type-C Multiplexers > > Error messages. > reST mar

Re: [PATCH v4 04/13] usb: typec: add fwnode to tcpc

2018-03-29 Thread Heikki Krogerus
Hi, On Thu, Mar 29, 2018 at 12:06:09AM +0800, Li Jun wrote: > Add fwnode handle to get the fwnode so we can get typec configs > it contains. > > Suggested-by: Heikki Krogerus > Signed-off-by: Li Jun > --- > drivers/staging/typec/tcpci.c | 14 +++--- >

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

2018-03-20 Thread Heikki Krogerus
o tie together these muxes and the Type-C Port Manager (tcpm) code, using the then new drivers/mux framework. But the way I used the mux framework went against what it was designed for, so in the end that series got nowhere. Heikki Krogerus from Intel, who maintains the USB TYPEC subsystem, has recently

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

2018-03-20 Thread Heikki Krogerus
Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add #include-s for a few missing headers to drivers/usb/typec/mux.c -Various spelling and gramar fixes in the docs pointed out by Randy Dunlap --- Documentation/driver-api/usb/typec.rst

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

2018-03-20 Thread Heikki Krogerus
Type-C drivers for the control. For other types of USB connectors (mainly microAB) the class provides user space control via sysfs attribute file that can be used to request role swapping from the switch. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus

[PATCH v9 04/12] usb: typec: Separate the definitions for data and power roles

2018-03-20 Thread Heikki Krogerus
clearly according to the newest specifications, introducing separate definitions for the data roles. Reviewed-by: Guenter Roeck Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 56 ++--- drivers/usb/typec/fusb302/fusb302.c | 1 + driv

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

2018-03-20 Thread Heikki Krogerus
-off-by: Heikki Krogerus --- 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 | 1 + drivers/usb/typec/fusb302/fusb302.c | 1 - drivers/usb/typec/tcpm.c

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

2018-03-20 Thread Heikki Krogerus
_not_ stay in their last mode after a detach. Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add Guenter's Reviewed-by Changes in v2: -Added Heikki

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

2018-03-20 Thread Heikki Krogerus
when we want to loop through all capabilities. Signed-off-by: Mathias Nyman Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Added Heikki's Reviewed-by --- drivers/usb/host/xhci-ext-caps.h | 5 +++-- 1 file

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

2018-03-20 Thread Heikki Krogerus
-by: Mathias Nyman Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by 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 ano

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

2018-03-20 Thread Heikki Krogerus
that our read/write/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 Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v7: - Declare intel_xhci_usb_remove

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

2018-03-20 Thread Heikki Krogerus
on devices 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 Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Review

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

2018-03-20 Thread Heikki Krogerus
From: 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 Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v7: - Remove unneeded semicolon Changes in v4: -Add

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

2018-03-20 Thread Heikki Krogerus
goal is to ultimately extract the connection descriptions also from firmware by using the fwnode_graph_* functions and other mechanisms that are available. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v9 - Now really stop using rcu

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

2018-03-20 Thread Heikki Krogerus
From: 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. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki

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

2018-03-20 Thread Heikki Krogerus
On Tue, Mar 20, 2018 at 01:21:57PM +0100, Hans de Goede wrote: > On 20-03-18 11:32, Heikki Krogerus wrote: > > On Tue, Mar 20, 2018 at 12:04:12PM +0200, Heikki Krogerus wrote: > > > > > +void device_connection_remove(struct device_connection *con) > > >

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

2018-03-20 Thread Heikki Krogerus
On Tue, Mar 20, 2018 at 12:04:12PM +0200, Heikki Krogerus wrote: > > > +void device_connection_remove(struct device_connection *con) > > > +{ > > > + mutex_lock(&devcon_lock); > > > + list_del_rcu(&con->list); > > > > See, rcu? > &g

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

2018-03-20 Thread Heikki Krogerus
On Tue, Mar 20, 2018 at 10:20:04AM +0100, Greg Kroah-Hartman wrote: > On Wed, Mar 14, 2018 at 04:12:04PM +0300, Heikki Krogerus wrote: > > Several frameworks - clk, gpio, phy, pmw, etc. - maintain > > lookup tables for describing connections and provide custom > > API fo

Re: [RFC PATCH v2 3/3] usb: typec: tcpm: Support for Alternate Modes

2018-03-19 Thread Heikki Krogerus
Hi Guenter, On Fri, Mar 16, 2018 at 02:32:06PM -0700, Guenter Roeck wrote: > On Fri, Mar 09, 2018 at 06:19:18PM +0300, Heikki Krogerus wrote: > > This adds more complete handling of VDMs and registration of > > partner alternate modes, and introduces callbacks for > > alte

Re: [RFC PATCH v2 2/3] usb: typec: Bus type for alternate modes

2018-03-19 Thread Heikki Krogerus
Hi Guenter, On Fri, Mar 16, 2018 at 02:33:36PM -0700, Guenter Roeck wrote: > On Fri, Mar 09, 2018 at 06:19:17PM +0300, Heikki Krogerus wrote: > > diff --git a/drivers/usb/typec/bus.c b/drivers/usb/typec/bus.c > > new file mode 100644 > > index ..92944aaf3

Re: [PATCH 1/2] staging: typec: rt1711h typec chip driver

2018-03-19 Thread Heikki Krogerus
igned-off-by: ShuFan Lee Looks OK to me. I'll put a few nitpics below in case you make one more version for some other reason. In any case: Reviewed-by: Heikki Krogerus > --- > drivers/staging/typec/Kconfig | 8 + > drivers/staging/typec/Makefile| 1 + > dr

Re: [PATCH] staging: typec: rt1711h typec chip driver

2018-03-16 Thread Heikki Krogerus
Hi ShuFan, On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: > +static int rt1711h_init_gpio(struct rt1711h_chip *chip) > +{ > + int ret; > + struct device_node *np = chip->dev->of_node; > + > + ret = of_get_named_gpio(np, "rt,intr_gpio", 0); > + if (ret < 0) { > +

Re: [PATCH v3 05/12] usb: typec: add API to get sink and source config

2018-03-15 Thread Heikki Krogerus
Hi, A small nitpick. The subject lines seem to be a little bit inconsistent in this series. This patch for example does not mention tcpm at all in its subject or even commit message, even though it only modifies tcpm.c. Please change the subject lines of all the patches in this series mainly deal

Re: [PATCH v3 06/12] staging: typec: tcpci: support port config passed via dt

2018-03-15 Thread Heikki Krogerus
On Tue, Mar 13, 2018 at 05:34:32PM +0800, Li Jun wrote: > User can define the typec port properties in tcpci node to setup > the port config. > > Signed-off-by: Li Jun > --- > drivers/staging/typec/tcpci.c | 63 > +++ > 1 file changed, 63 insertions(+) >

Re: [PATCH v3 05/12] usb: typec: add API to get sink and source config

2018-03-15 Thread Heikki Krogerus
On Tue, Mar 13, 2018 at 05:34:31PM +0800, Li Jun wrote: > This patch add 2 APIs to get sink and source power config from firmware > description in case the port supports PD. > > Signed-off-by: Li Jun > --- > drivers/usb/typec/tcpm.c | 47 +++ > include

Re: [PATCH v1 2/2] usb: dwc3: Add Qualcomm DWC3 glue driver

2018-03-14 Thread Heikki Krogerus
Hi, On Wed, Mar 14, 2018 at 10:50:12AM +0200, Felipe Balbi wrote: > >>> - Support to replace pip3 clock going to DWC3 with utmi clock > >>>for hardware configuration where SSPHY is not used with DWC3. > >> Is that SW configurable? Really? In any case seems like this and SESSVLD > >> valid sho

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

2018-03-14 Thread Heikki Krogerus
I submitted a patch-series to tie together these muxes and the Type-C Port Manager (tcpm) code, using the then new drivers/mux framework. But the way I used the mux framework went against what it was designed for, so in the end that series got nowhere. Heikki Krogerus from Intel, who maintains the USB

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

2018-03-14 Thread Heikki Krogerus
goal is to ultimately extract the connection descriptions also from firmware by using the fwnode_graph_* functions and other mechanisms that are available. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v8: - No longer using rcu. Changes in v7

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

2018-03-14 Thread Heikki Krogerus
_not_ stay in their last mode after a detach. Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add Guenter's Reviewed-by Changes in v2: -Added Heikki

[PATCH v8 04/12] usb: typec: Separate the definitions for data and power roles

2018-03-14 Thread Heikki Krogerus
clearly according to the newest specifications, introducing separate definitions for the data roles. Reviewed-by: Guenter Roeck Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 56 ++--- drivers/usb/typec/fusb302/fusb302.c | 1 + driv

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

2018-03-14 Thread Heikki Krogerus
-off-by: Heikki Krogerus --- 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 | 1 + drivers/usb/typec/fusb302/fusb302.c | 1 - drivers/usb/typec/tcpm.c

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

2018-03-14 Thread Heikki Krogerus
when we want to loop through all capabilities. Signed-off-by: Mathias Nyman Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Added Heikki's Reviewed-by --- drivers/usb/host/xhci-ext-caps.h | 5 +++-- 1 file

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

2018-03-14 Thread Heikki Krogerus
-by: Mathias Nyman Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by 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 ano

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

2018-03-14 Thread Heikki Krogerus
on devices 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 Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Review

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

2018-03-14 Thread Heikki Krogerus
From: 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 Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v7: - Remove unneeded semicolon Changes in v4: -Add

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

2018-03-14 Thread Heikki Krogerus
From: 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. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki

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

2018-03-14 Thread Heikki Krogerus
that our read/write/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 Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v7: - Declare intel_xhci_usb_remove

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

2018-03-14 Thread Heikki Krogerus
Type-C drivers for the control. For other types of USB connectors (mainly microAB) the class provides user space control via sysfs attribute file that can be used to request role swapping from the switch. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus

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

2018-03-14 Thread Heikki Krogerus
Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add #include-s for a few missing headers to drivers/usb/typec/mux.c -Various spelling and gramar fixes in the docs pointed out by Randy Dunlap --- Documentation/driver-api/usb/typec.rst

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

2018-03-14 Thread Heikki Krogerus
On Wed, Mar 14, 2018 at 12:16:05PM +0100, Greg Kroah-Hartman wrote: > On Mon, Mar 12, 2018 at 05:34:20PM +0300, Heikki Krogerus wrote: > > Several frameworks - clk, gpio, phy, pmw, etc. - maintain > > lookup tables for describing connections and provide custom > > API fo

Re: [PATCH v3 04/12] usb: typec: add API to get typec basic port power and data config

2018-03-14 Thread Heikki Krogerus
Hi, On Tue, Mar 13, 2018 at 05:34:30PM +0800, Li Jun wrote: > +/** > + * typec_get_power_type - Get the typec port power type > + * @fwnode: Firmware node to get the property of > + * > + * This routine is used by typec hardware driver to read property > + * port power type from the device firmwar

Re: [PATCH v3 01/12] dt-bindings: connector: add properties for typec

2018-03-14 Thread Heikki Krogerus
On Tue, Mar 13, 2018 at 05:34:27PM +0800, Li Jun wrote: > Add bingdings supported by current typec driver, so user can pass > all those properties via dt. > > Signed-off-by: Li Jun > --- > Change for v3: > - port-type change to be power-type which only for power. > - add data-type for data capabi

Re: [PATCH v3 03/12] usb: typec: add fwnode to tcpc

2018-03-13 Thread Heikki Krogerus
Hi Jun Li, On Tue, Mar 13, 2018 at 05:34:29PM +0800, Li Jun wrote: > Add fwnode handle to get the fwnode so we can get typec configs > it contains. > > Signed-off-by: Heikki Krogerus You should not sign-off patches for other people. If you check section 13 from Documentation/proces

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

2018-03-12 Thread Heikki Krogerus
goal is to ultimately extract the connection descriptions also from firmware by using the fwnode_graph_* functions and other mechanisms that are available. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v7: - API naming improvements suggested

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

2018-03-12 Thread Heikki Krogerus
Type-C drivers for the control. For other types of USB connectors (mainly microAB) the class provides user space control via sysfs attribute file that can be used to request role swapping from the switch. Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus

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

2018-03-12 Thread Heikki Krogerus
Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add #include-s for a few missing headers to drivers/usb/typec/mux.c -Various spelling and gramar fixes in the docs pointed out by Randy Dunlap --- Documentation/driver-api/usb/typec.rst

[PATCH v7 04/12] usb: typec: Separate the definitions for data and power roles

2018-03-12 Thread Heikki Krogerus
clearly according to the newest specifications, introducing separate definitions for the data roles. Reviewed-by: Guenter Roeck Signed-off-by: Heikki Krogerus --- Changes in v7: - This patch was added to the series --- drivers/usb/typec/class.c | 56 ++--

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

2018-03-12 Thread Heikki Krogerus
_not_ stay in their last mode after a detach. Signed-off-by: Hans de Goede Revieved-by: Heikki Krogerus Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add Guenter's Reviewed-by Cha

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

2018-03-12 Thread Heikki Krogerus
From: 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 Revieved-by: Heikki Krogerus Reviewed-by: Guenter Roeck Reviewed

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

2018-03-12 Thread Heikki Krogerus
when we want to loop through all capabilities. Signed-off-by: Mathias Nyman Revieved-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Added Heikki's Reviewed-by --- drivers/usb/host/xhci-ext-

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

2018-03-12 Thread Heikki Krogerus
-by: Mathias Nyman Revieved-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Use SPDX license header -Various small style cleanups / changes -Add Heikki's Reviewed-by Changes from some time ago

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

2018-03-12 Thread Heikki Krogerus
that our read/write/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 Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v7

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

2018-03-12 Thread Heikki Krogerus
From: 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 Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v7: - Remove unneeded

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

2018-03-12 Thread Heikki Krogerus
From: 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. Signed-off-by: Hans de Goede Reviewed-by: Heikki Krogerus Reviewed-by: Andy

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

2018-03-12 Thread Heikki Krogerus
on devices 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 Reviewed-by: Heikki Krogerus Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- Changes in v4

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

2018-03-12 Thread Heikki Krogerus
muxes and the Type-C Port Manager (tcpm) code, using the then new drivers/mux framework. But the way I used the mux framework went against what it was designed for, so in the end that series got nowhere. Heikki Krogerus from Intel, who maintains the USB TYPEC subsystem, has recently been working

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

2018-03-12 Thread Heikki Krogerus
On Mon, Mar 12, 2018 at 10:19:34AM +0100, Hans de Goede wrote: > > > I currently have significantly less bandwidth for this due to > > > personal circumstances, so if a new version of this patch-set > > > is necessary it would be great if you (Heikki) can do a v7. > > > > Sure thing. I'll prepare

Re: [PATCH] usb: typec: Separate the definitions for data and power roles

2018-03-12 Thread Heikki Krogerus
On Fri, Mar 09, 2018 at 09:41:38AM -0800, Greg Kroah-Hartman wrote: > On Fri, Mar 09, 2018 at 02:09:18PM +0300, Heikki Krogerus wrote: > > USB Type-C specification v1.2 separated the power and data > > roles more clearly. Dual-Role-Data term was introduced, and > > the meani

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

2018-03-12 Thread Heikki Krogerus
On Sun, Mar 11, 2018 at 07:24:18PM +0100, Hans de Goede wrote: > Hi all, > > On 09-03-18 18:53, Greg Kroah-Hartman wrote: > > On Fri, Mar 02, 2018 at 11:20:46AM +0100, Hans de Goede wrote: > > > From: Heikki Krogerus > > > > > > Several framewo

[RFC PATCH v2 0/3] usb: typec: Support for Alternate Modes

2018-03-09 Thread Heikki Krogerus
no solution for the "platform data" case where we have neither DT nor ACPI to describe the connections for us. [1] Documentation/devicetree/bindings/graph.txt [2] Documentation/acpi/dsd/graph.txt Heikki Krogerus (3): usb: typec: Register a device for every mode usb: typec: Bus

[RFC PATCH v2 2/3] usb: typec: Bus type for alternate modes

2018-03-09 Thread Heikki Krogerus
Introducing a simple bus for the alternate modes. Bus allows binding drivers to the discovered alternate modes the partners support. Signed-off-by: Heikki Krogerus --- Documentation/ABI/obsolete/sysfs-class-typec | 48 +++ Documentation/ABI/testing/sysfs-bus-typec| 51 Documentation

[RFC PATCH v2 1/3] usb: typec: Register a device for every mode

2018-03-09 Thread Heikki Krogerus
Before a device was created for every discovered SVID, but this will create a device for every discovered mode of every SVID. The idea is to make it easier to create mode specific drivers once a bus for the alternate mode is added. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c

[RFC PATCH v2 3/3] usb: typec: tcpm: Support for Alternate Modes

2018-03-09 Thread Heikki Krogerus
This adds more complete handling of VDMs and registration of partner alternate modes, and introduces callbacks for alternate mode operations. Only DFP role is supported for now. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 133 +++ 1

[PATCH] usb: typec: Separate the definitions for data and power roles

2018-03-09 Thread Heikki Krogerus
clearly according to the newest specifications, introducing separate definitions for the data roles. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 56 ++--- drivers/usb/typec/fusb302/fusb302.c | 1 + drivers/usb/typec/tcpm.c

Re: [PATCH v2 10/12] dt-bindings: connector: add properties for typec power delivery

2018-03-08 Thread Heikki Krogerus
On Thu, Mar 08, 2018 at 01:41:23AM +, Jun Li wrote: > > If you are asking my opinion, the data role must be handled as separate > > capability of the port, i.e. you probable want to have separate properties > > for > > the power role and data role, even if we did not support that yet in the >

Re: [PATCH 4.16 REGRESSION fix] Revert "typec: tcpm: Only request matching pdos"

2018-03-06 Thread Heikki Krogerus
Only request matching pdos" commit, > fixing the regression. > > Cc: Badhri Jagan Sridharan > Signed-off-by: Hans de Goede You are correct. The patch should be rewritten. Acked-by: Heikki Krogerus Thanks, -- heikki -- To unsubscribe from this list: send the line "u

Re: [PATCH v2 10/12] dt-bindings: connector: add properties for typec power delivery

2018-03-06 Thread Heikki Krogerus
t call them "power-role" and "data-role" from now on. The default-role should tell the state machines whether Try.SNK or Try.SRC states should be used or not. Perhaps you should have boolean property for both: "try-snk" and "try-src" (note: both can not be t

Re: [PATCH v2 03/12] staging: typec: tcpci: support port config passed via dt

2018-03-05 Thread Heikki Krogerus
Hi, On Mon, Mar 05, 2018 at 10:35:07AM +, Jun Li wrote: > > So it actually does make sense to define those properties for the > > "connector" node instead of TCPC parent. They are generic "Type-C" > > properties (right?), so we may want to use them with multiport devices as > > well. > > > >

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-05 Thread Heikki Krogerus
On Mon, Mar 05, 2018 at 09:18:10AM +0100, Andrzej Hajda wrote: > On 02.03.2018 14:13, Heikki Krogerus wrote: > > Hi, > > > > On Tue, Feb 27, 2018 at 08:11:29AM +0100, Andrzej Hajda wrote: > >> +2. USB-C connector attached to CC controller (s2mm005), HS lines

Re: [PATCH v2 03/12] staging: typec: tcpci: support port config passed via dt

2018-03-05 Thread Heikki Krogerus
On Mon, Mar 05, 2018 at 08:53:00AM +, Jun Li wrote: > > On Mon, Feb 26, 2018 at 02:30:53PM +, Jun Li wrote: > > > > > + child = of_get_child_by_name(tcpci->dev->of_node, "connector"); > > > > > + if (!child) { > > > > > + dev_err(tcpci->dev, "failed to get connector node

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-02 Thread Heikki Krogerus
Hi, On Tue, Feb 27, 2018 at 08:11:29AM +0100, Andrzej Hajda wrote: > +2. USB-C connector attached to CC controller (s2mm005), HS lines routed > +to companion PMIC (max77865), SS lines to USB3 PHY and SBU to DisplayPort. > +DisplayPort video lines are routed to the connector via SS mux in USB3 PHY.

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

2018-02-28 Thread Heikki Krogerus
Hi, On Thu, Mar 01, 2018 at 12:56:57AM +, Jun Li wrote: > > +struct device *device_find_connection(struct device *dev, const char > > +*con_id) { > > + return __device_find_connection(dev, con_id, generic_match, NULL); } > > - return __device_find_connection(dev, con_id, generic_match

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

2018-02-28 Thread Heikki Krogerus
On Wed, Feb 28, 2018 at 04:42:32PM +0100, Hans de Goede wrote: > Hi, > > On 28-02-18 16:15, Heikki Krogerus wrote: > > On Wed, Feb 28, 2018 at 04:07:45PM +0100, Hans de Goede wrote: > > > diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h > > > index

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

2018-02-28 Thread Heikki Krogerus
On Wed, Feb 28, 2018 at 04:07:45PM +0100, Hans de Goede wrote: > diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h > index 96099a245c69..5917e3095e2a 100644 > --- a/drivers/usb/host/xhci.h > +++ b/drivers/usb/host/xhci.h > @@ -1825,6 +1825,7 @@ struct xhci_hcd { > /* Reserved. It was

Re: [PATCH v2 03/12] staging: typec: tcpci: support port config passed via dt

2018-02-27 Thread Heikki Krogerus
Hi, On Mon, Feb 26, 2018 at 02:30:53PM +, Jun Li wrote: > > > + child = of_get_child_by_name(tcpci->dev->of_node, "connector"); > > > + if (!child) { > > > + dev_err(tcpci->dev, "failed to get connector node.\n"); > > > + return -EINVAL; > > > + } > > > > Why do you need separ

Re: [PATCH v2 03/12] staging: typec: tcpci: support port config passed via dt

2018-02-26 Thread Heikki Krogerus
Hi, On Mon, Feb 26, 2018 at 07:49:10PM +0800, Li Jun wrote: > User can define the typec port properties in tcpci node to setup > the port config. > > Signed-off-by: Li Jun > --- > Changes for v2: > - Use infra APIs to get sink and source config. > - Improve the error message. > > drivers/stagi

Re: [PATCH v2 02/12] usb: typec: add API to get sink and source config

2018-02-26 Thread Heikki Krogerus
Hi, On Mon, Feb 26, 2018 at 07:49:09PM +0800, Li Jun wrote: > This patch add 2 APIs to get sink and source power config from firmware > description. > > Signed-off-by: Li Jun > --- > drivers/usb/typec/tcpm.c | 43 +++ > include/linux/usb/tcpm.h | 2 ++ >

Re: [PATCH v2 01/12] usb: typec: add API to get port type and preferred role

2018-02-26 Thread Heikki Krogerus
On Mon, Feb 26, 2018 at 07:49:08PM +0800, Li Jun wrote: > This patch add 2 APIs to get port type and preferred role from firmware > description. > > Signed-off-by: Li Jun > > --- > change for v2 > - Change the 2 APIs name and input para to be device_node pointer. Why? You are only dealing with

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

2018-02-26 Thread Heikki Krogerus
ndows. > > The presence of AML code which modifies the cfg0 reg (on some systems) > means that our read/write/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 Go

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