Re: [PATCH v8 4/6] power: supply: Add 'usb_type' property and supporting code

2018-04-24 Thread Heikki Krogerus
; SDP and PPS types. The mirroring is intentional so as to not impact > existing usage of the 'type' property. > > Signed-off-by: Adam Thomson Reviewed-by: Heikki Krogerus > --- > Documentation/ABI/testing/sysfs-class-power | 12 > drivers/power/supply/power_s

Re: [PATCH v8 3/6] power: supply: Add error checking of psy desc during registration

2018-04-24 Thread Heikki Krogerus
_thermal() will try to dereference the pointer > thus causing a kernel dump. > > This commit updates the registration code to add some basic > checks on the desc pointer validity, name, and presence of > properties. > > Signed-off-by: Adam Thomson Reviewed-by: Heik

Re: [PATCH v8 2/6] Documentation: power: Initial effort to document power_supply ABI

2018-04-24 Thread Heikki Krogerus
USB related properties have been listed. > > Signed-off-by: Adam Thomson Thank you a lot for doing this Adam! FWIW: Reviewed-by: Heikki Krogerus > --- > Documentation/ABI/testing/sysfs-class-power | 443 > > MAINTAINERS

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

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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

[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

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

[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 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 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 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 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 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 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 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 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 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 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 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 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

[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

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

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

2018-02-16 Thread Heikki Krogerus
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 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 12/12] extcon: axp288: Set USB role where necessary

2018-02-16 Thread Heikki Krogerus
le (always) gets initialized as host > > Signed-off-by: Hans de Goede After addressing Andy's comments: Reviewed-by: Heikki Krogerus Thanks, -- heikki

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

2018-02-16 Thread Heikki Krogerus
: Hans de Goede Reviewed-by: Heikki Krogerus Thanks, -- heikki

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

2018-02-16 Thread Heikki Krogerus
On Fri, Feb 16, 2018 at 11:47:49AM +0100, Hans de Goede wrote: > 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 Thanks, -- heikki

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

2018-02-16 Thread Heikki Krogerus
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-$(CONFIG_USB_COMMON)+= common/ > obj-$(CONFIG_US

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

2018-02-16 Thread Heikki Krogerus
ci_ext_cap_init() a call to it should also > be added to other bus probe paths. > > Signed-off-by: Hans de Goede > Acked-by: Mathias Nyman Reviewed-by: Heikki Krogerus Thanks, -- heikki

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

2018-02-16 Thread Heikki Krogerus
capability with matching id > > capability id 0 is not used by xhci (reserved) > > This is useful when we want to loop through all capabilities. > > Signed-off-by: Mathias Nyman > Signed-off-by: Hans de Goede FWIW: Reviewed-by: Heikki Krogerus Br, -- heikki

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

2018-02-16 Thread Heikki Krogerus
e Reviewed-by: Heikki Krogerus Thanks, -- heikki

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

2018-02-16 Thread Heikki Krogerus
This commit also makes tcpm_reset_port() call tcpm_mux_set(port, > TYPEC_MUX_NONE, USB_ROLE_NONE) so that the mux and switch > do _not_ stay in their last mode after a detach. > > Signed-off-by: Hans de Goede I'm happy with this, but Guenter should also check tcpm changes. Reviewe

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

2018-02-16 Thread Heikki Krogerus
On Fri, Feb 16, 2018 at 12:21:15PM +0100, Hans de Goede wrote: > Hi, > > On 16-02-18 12:00, Andy Shevchenko wrote: > > On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote: > > > From: Heikki Krogerus > > > > > > Several frameworks - clk, gpio, phy

Re: [PATCH] staging: typec: handle vendor defined part and modify drp toggling flow

2018-02-14 Thread Heikki Krogerus
On Wed, Feb 14, 2018 at 05:24:04PM +0800, ShuFanLee wrote: > From: ShuFanLee > > Handle vendor defined behavior in tcpci_init and tcpci_irq. > More operations can be extended in tcpci_vendor_data if needed. > According to TCPCI specification, 4.4.5.2 ROLE_CONTROL, > TCPC shall not start DRP toggl

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

2018-02-08 Thread Heikki Krogerus
Hi Adam, On Tue, Feb 06, 2018 at 03:51:26PM +, Adam Thomson wrote: > Right now there is no documentation for the generic psy class. The stuff in > sysfs-class-power is device specific property information, and the same goes > for > sysfs-class-power-twl4030. The property usage can vary depend

Re: [PATCH v4 4/7] typec: tcpm: Add core support for sink side PPS

2018-02-06 Thread Heikki Krogerus
On Tue, Feb 06, 2018 at 02:33:08PM +, Adam Thomson wrote: > On 30 January 2018 12:47, Heikki Krogerus wrote: > > > > +static int tcpm_pps_set_op_curr(struct tcpm_port *port, u16 op_curr) > > > +{ > > > + unsigned int target_mw; > > > + int ret = 0; &

Re: [PATCH v4 0/7] typec: tcpm: Add sink side support for PPS

2018-01-30 Thread Heikki Krogerus
On Tue, Jan 02, 2018 at 03:50:48PM +, Adam Thomson wrote: > This patch set adds sink side support for the PPS feature introduced in the > USB PD 3.0 specification. > > The source PPS supply is represented using the Power Supply framework to > provide > access and control APIs for dealing with

Re: [PATCH v4 7/7] typec: tcpm: Add support for sink PPS related messages

2018-01-30 Thread Heikki Krogerus
added. Sending of > Not_Supported is added is added to handle messages > received but not yet handled. > > Signed-off-by: Adam Thomson FWIW: Acked-by: Heikki Krogerus -- heikki

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

2018-01-30 Thread Heikki Krogerus
Hi Adam, On Tue, Jan 02, 2018 at 03:50:54PM +, Adam Thomson wrote: > This commit adds a power_supply class instance to represent a > PD source's voltage and current properties. This provides an > interface for reading these properties from user-space or other > drivers. > > For PPS enabled So

Re: [PATCH v4 5/7] power: supply: Add 'connected_type' property and supporting code

2018-01-30 Thread Heikki Krogerus
and in addition has > the PPS type. In the future this can be extended further for other > types which have multiple connected types supported. The mirroring > is intentional so as to not impact existing usage of the 'type' > property. > > Signed-off-by: Adam Thomson

Re: [PATCH v4 4/7] typec: tcpm: Add core support for sink side PPS

2018-01-30 Thread Heikki Krogerus
On Tue, Jan 02, 2018 at 03:50:52PM +, Adam Thomson wrote: > This commit adds code to handle requesting of PPS APDOs. Switching > between standard PDOs and APDOs, and re-requesting an APDO to > modify operating voltage/current will be triggered by an > external call into TCPM. > > Signed-off-by

Re: [PATCH v4 3/7] typec: tcpm: Add SDB header for Status message handling

2018-01-30 Thread Heikki Krogerus
On Tue, Jan 02, 2018 at 03:50:51PM +, Adam Thomson wrote: > This commit adds a header providing definitions for handling > Status messages. Currently the header only focuses on handling > incoming Status messages. > > Signed-off-by: Adam Thomson Acked-by: Heikki Kro

Re: [PATCH v4 2/7] typec: tcpm: Add ADO header for Alert message handling

2018-01-30 Thread Heikki Krogerus
On Tue, Jan 02, 2018 at 03:50:50PM +, Adam Thomson wrote: > This commit adds a header providing definitions for handling Alert > messages. Currently the header only focuses on handling incoming > alerts. > > Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus Thanks, -- heikki

Re: [PATCH v4 1/7] typec: tcpm: Add PD Rev 3.0 definitions to PD header

2018-01-30 Thread Heikki Krogerus
per line in several places in this series, and I many cases it does not look like splitting the line would make the code any less readable. But I don't think that is critical, so if there are no other comments: Acked-by: Heikki Krogerus > --- > inclu

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-19 Thread Heikki Krogerus
Hi, On Fri, Jan 19, 2018 at 09:01:24AM +, shufan_lee(?|) wrote: > Hi Heikki, > > For example, the flow of tcpci_init is a little bit different. > In tcpci_init, there are more parameters need to be set for RT1711H. Different init parameters is really not a reason for a fork of the dr

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-19 Thread Heikki Krogerus
Hi Shu-Fan, On Fri, Jan 19, 2018 at 05:48:02AM +, shufan_lee(?) wrote: > Hi Jun, > > For now, RT1711H is not fully compatible with TCPCI. So the existing tcpci.c > may not work for it. The datasheet for RT1711H does talk about TCPCi and TCPM+TCPC [1]. What are the differences tha

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Heikki Krogerus
Hi Greg, On Wed, Jan 17, 2018 at 12:14:02PM +0100, Greg KH wrote: > On Wed, Jan 17, 2018 at 01:08:58PM +0200, Heikki Krogerus wrote: > > Hi, > > > > On Wed, Jan 17, 2018 at 09:30:45AM +, shufan_lee(?) wrote: > > > Dear Heikki, > > > > >

Re: [PATCH] USB TYPEC: RT1711H Type-C Chip Driver

2018-01-17 Thread Heikki Krogerus
Hi, On Wed, Jan 17, 2018 at 09:30:45AM +, shufan_lee(?) wrote: > Dear Heikki, > > Sorry for bothering. > > Just want to check is there anything we need to modify? I'll check the patch this week, but please note that we are -rc8, so nothing is going to happen before -rc1 is out.

Re: [PATCH 21/45] usb: typec: remove duplicate includes

2017-12-04 Thread Heikki Krogerus
On Tue, Dec 05, 2017 at 07:34:55AM +0530, Pravin Shedge wrote: > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge Acked-by: Heikki Krogerus > ---

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

2017-11-28 Thread Heikki Krogerus
On Mon, Nov 27, 2017 at 04:54:08PM +, Adam Thomson wrote: > On 27 November 2017 14:12, Heikki Krogerus wrote: > > > Hi Adam, > > > > On Fri, Nov 24, 2017 at 02:05:27PM +, Adam Thomson wrote: > > > On 24 November 2017 12:19, Heikki Krogerus wrote: >

<    4   5   6   7   8   9   10   11   12   13   >