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

2018-04-24 Thread Heikki Krogerus
existing usage of the 'type' property. > > Signed-off-by: Adam Thomson <adam.thomson.opensou...@diasemi.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> > --- > Documentation/ABI/testing/sysfs-class-power | 12 > drivers/power/su

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

2018-04-24 Thread Heikki Krogerus
l() 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 <adam.thomson.opensou...@diasem

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 <adam.thomson.opensou...@diasemi.com> Thank you a lot for doing this Adam! FWIW: Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> > --- > Documentation

Re: [PATCH/RFC 04/11] of: platform: add device connection parsing

2018-04-24 Thread Heikki Krogerus
Hi Yoshihiro, On Wed, Apr 18, 2018 at 05:09:58PM +0900, Yoshihiro Shimoda wrote: > This patch adds device connection parsing in of_platform_populate(). > > TODO: > - How to free the devcon memories? > - How to remove the devcon instances? > > Signed-off-by: Yoshihiro Shimoda

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

2018-04-24 Thread Heikki Krogerus
On Mon, Apr 23, 2018 at 09:43:57AM -0700, Guenter Roeck wrote: > On Mon, Apr 23, 2018 at 11:03:09AM +0300, Heikki Krogerus wrote: > > On Fri, Apr 20, 2018 at 10:26:08AM -0700, Guenter Roeck wrote: > > > On Wed, Apr 18, 2018 at 03:34:09PM +0300, Heikki Krogerus wrote: > >

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

2018-04-23 Thread Heikki Krogerus
On Fri, Apr 20, 2018 at 10:26:08AM -0700, Guenter Roeck wrote: > On Wed, Apr 18, 2018 at 03:34:09PM +0300, Heikki Krogerus wrote: > > If the I2C adapter that the PD controller is attached to > > does not support SMBus protocol, the driver needs to handle > > block reads separ

Re: [PATCH v5 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw

2018-04-20 Thread Heikki Krogerus
On Mon, Apr 16, 2018 at 02:54:37PM +0800, Li Jun wrote: > Since there is no user of max_snk_*, so we can remove them from tcpm. > > Reviewed-by: Hans de Goede <hdego...@redhat.com> > Signed-off-by: Li Jun <jun...@nxp.com> Acked-by: Heikki Krogerus <heik

Re: [PATCH v5 4/5] usb: typec: wcove: remove max_snk_* for sink config

2018-04-20 Thread Heikki Krogerus
On Mon, Apr 16, 2018 at 02:54:36PM +0800, Li Jun wrote: > Since max_snk_* is to be deprecated, so remove max_snk_* by adding a > variable PDO for sink config. > > Reviewed-by: Hans de Goede <hdego...@redhat.com> > Signed-off-by: Li Jun <jun...@nxp.com> Acked-by: He

Re: [PATCH v5 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-04-20 Thread Heikki Krogerus
On Mon, Apr 16, 2018 at 02:54:34PM +0800, Li Jun wrote: > Since max_snk_* is to be deprecated, so remove max_snk_* by adding a > variable PDO for sink config. > > Reviewed-by: Hans de Goede <hdego...@redhat.com> > Signed-off-by: Li Jun <jun...@nxp.com> Acked-by: He

Re: [PATCH v5 1/5] usb: typec: tcpm: pdo matching optimization

2018-04-20 Thread Heikki Krogerus
nd source, > we should check source pdo voltage range is within the > voltage range of one sink pdo. > > Reviewed-by: Hans de Goede <hdego...@redhat.com> > Signed-off-by: Li Jun <jun...@nxp.com> I don't see any problem with this, but I hope Guenter has time to c

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 <r...@kernel.org> > Reviewed-by: Hans de Goede <hdego...@redhat.com> > Signed-off-by: Li Jun <jun...@nxp.com> FW

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 rem

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

2018-04-20 Thread Heikki Krogerus
for it is 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 <heikki.kroge...@linux.intel.com> --- Hi Hans, So it seems that we can't rely on the PMIC. This is my proposal for a fix. I'm in practic

[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 <heikki.kroge...@linux.intel.com&

[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

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

2018-04-18 Thread Heikki Krogerus
") Cc: <sta...@vger.kernel.org> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/typec/ucsi/ucsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index bf097

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

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 <tobias.regn...@gmail.com> Acked-by: Heikki Krogerus <heikki.kroge...@linux.intel.co

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

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

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

2018-04-10 Thread Heikki Krogerus
") Cc: <sta...@vger.kernel.org> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/typec/ucsi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/ucsi/Makefile b/drivers/usb/typec/ucsi/Makefile index b5789

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,

[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 <standby2...@gmail.com> Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers") Signed-off-by:

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

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 <standby2...@gmail.com> > Fixes:

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 <standby2...@gmail.com> Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C Multiplexers") Signed-off-by: Heikki Krogerus <heikki.kroge

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

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 <heikki.kroge...@linux.intel.com> > Signed-off-by: Li Jun <jun...@nxp.com> > --- > d

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

2018-03-20 Thread Heikki Krogerus
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 been

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

2018-03-20 Thread Heikki Krogerus
com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- 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

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

2018-03-20 Thread Heikki Krogerus
y.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Consistently use IS_ERR_OR_NULL where applicable -Add Andy's Reviewed-by Changes in v2: -Minor style fixes from review of v1 --- Documentation/ABI/testing/sysfs-class-usb_role |

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

2018-03-20 Thread Heikki Krogerus
re clearly according to the newest specifications, introducing separate definitions for the data roles. Reviewed-by: Guenter Roeck <li...@roeck-us.net> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/typec/class.c | 56 ++--

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

2018-03-20 Thread Heikki Krogerus
-by: Guenter Roeck <li...@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add Guenter's Reviewed-by Changes in v2: -Added Heikki's Revi

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

2018-03-20 Thread Heikki Krogerus
NE) so that the mux and switch do _not_ stay in their last mode after a detach. Signed-off-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@l

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

2018-03-20 Thread Heikki Krogerus
ed-off-by: Hans de Goede <hdego...@redhat.com> Acked-by: Mathias Nyman <mathias.ny...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Add Andy's Reviewed-by Changes i

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

2018-03-20 Thread Heikki Krogerus
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: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in

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

2018-03-20 Thread Heikki Krogerus
com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Add depends on X86 to Kconfig (the AXP288 PMIC is only used on X86) -Use new acpi_dev_get_first_match_name() helper to get the INT3496 device-name -Add Heikki's

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

2018-03-20 Thread Heikki Krogerus
com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v7: - Declare intel_xhci_usb_remove() as static Changes in v4: -Add Andy's Reviewed-by -Add Heikki's Reviewed-by Changes in v2: -Drop unnecessary depends on EXTCON from Kconfig -Use BIT(), resource_size() -V

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

2018-03-20 Thread Heikki Krogerus
From: Hans de Goede <hdego...@redhat.com> 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> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-b

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

2018-03-20 Thread Heikki Krogerus
, but the 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 <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hei

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

2018-03-20 Thread Heikki Krogerus
gt; Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.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/

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(_lock); > > > + list_del_rcu(>list); > > > > See, rcu? > > True. I'll send o

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

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
TCPC_CC_STATUS_TOGGLING. > > Signed-off-by: ShuFan Lee <shufan_...@richtek.com> 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 <heikki.kroge...@linux.intel.com> > --- > drivers/

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

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

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

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

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

2018-03-14 Thread Heikki Krogerus
e a while back 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 Inte

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

2018-03-14 Thread Heikki Krogerus
, but the 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 <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hei

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

2018-03-14 Thread Heikki Krogerus
NE) so that the mux and switch do _not_ stay in their last mode after a detach. Signed-off-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@l

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

2018-03-14 Thread Heikki Krogerus
re clearly according to the newest specifications, introducing separate definitions for the data roles. Reviewed-by: Guenter Roeck <li...@roeck-us.net> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/typec/class.c | 56 ++--

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

2018-03-14 Thread Heikki Krogerus
-by: Guenter Roeck <li...@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Add Guenter's Reviewed-by Changes in v2: -Added Heikki's Revi

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

2018-03-14 Thread Heikki Krogerus
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: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in

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

2018-03-14 Thread Heikki Krogerus
ed-off-by: Hans de Goede <hdego...@redhat.com> Acked-by: Mathias Nyman <mathias.ny...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Add Andy's Reviewed-by Changes i

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

2018-03-14 Thread Heikki Krogerus
com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Add depends on X86 to Kconfig (the AXP288 PMIC is only used on X86) -Use new acpi_dev_get_first_match_name() helper to get the INT3496 device-name -Add Heikki's

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

2018-03-14 Thread Heikki Krogerus
From: Hans de Goede <hdego...@redhat.com> 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> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-b

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

2018-03-14 Thread Heikki Krogerus
com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v7: - Declare intel_xhci_usb_remove() as static Changes in v4: -Add Andy's Reviewed-by -Add Heikki's Reviewed-by Changes in v2: -Drop unnecessary depends on EXTCON from Kconfig -Use BIT(), resource_size() -V

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

2018-03-14 Thread Heikki Krogerus
gt; Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.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/

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

2018-03-14 Thread Heikki Krogerus
y.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Consistently use IS_ERR_OR_NULL where applicable -Add Andy's Reviewed-by Changes in v2: -Minor style fixes from review of v1 --- Documentation/ABI/testing/sysfs-class-usb_role |

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

2018-03-14 Thread Heikki Krogerus
com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- 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

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

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

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

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 <heikki.kroge...@linux.intel.com> You should not sign-off patches for other people. If you che

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

2018-03-12 Thread Heikki Krogerus
, but the 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 <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hei

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

2018-03-12 Thread Heikki Krogerus
y.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Consistently use IS_ERR_OR_NULL where applicable -Add Andy's Reviewed-by Changes in v2: -Minor style fixes from review of v1 --- Documentation/ABI/testing/sysfs-class-usb_role |

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

2018-03-12 Thread Heikki Krogerus
com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- 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

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

2018-03-12 Thread Heikki Krogerus
re clearly according to the newest specifications, introducing separate definitions for the data roles. Reviewed-by: Guenter Roeck <li...@roeck-us.net> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v7: - This patch was added to the series --- drivers/

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

2018-03-12 Thread Heikki Krogerus
NE) so that the mux and switch do _not_ stay in their last mode after a detach. Signed-off-by: Hans de Goede <hdego...@redhat.com> Revieved-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Reviewed-by: Andy Shevchenko <andy.shevc

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

2018-03-12 Thread Heikki Krogerus
d-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: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Add Andy's Reviewed-by Ch

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

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

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

2018-03-12 Thread Heikki Krogerus
ed-off-by: Hans de Goede <hdego...@redhat.com> Acked-by: Mathias Nyman <mathias.ny...@linux.intel.com> Revieved-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.i

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

2018-03-12 Thread Heikki Krogerus
g0 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 Goede <hdego...@redhat.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.inte

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

2018-03-12 Thread Heikki Krogerus
From: Hans de Goede <hdego...@redhat.com> 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> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com>

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

2018-03-12 Thread Heikki Krogerus
gt; Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- Changes in v4: -Replace Andy's Acked-by with his Reviewed-by Changes in v2: -Add Andy's A

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

2018-03-12 Thread Heikki Krogerus
AXP288 -Host mode not working 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 <hdego...@redhat.com> Reviewed-by: Heikki Krogerus <heikki.kroge...@

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

2018-03-12 Thread Heikki Krogerus
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 TYPEC subsystem, h

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 <heikki.kroge...@linux.intel.com> > > >

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

2018-03-09 Thread Heikki Krogerus
o 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 type for a

[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 <heikki.kroge...@linux.intel.com> --- Documentation/ABI/obsolete/sysfs-class-typec | 48 +++ Documentation/ABI/testing/sys

[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 <heikki.kroge...@linux.intel.

[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 <heikki.kroge...@linux.intel.com> --- drivers/usb/typec/tcpm.c

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

2018-03-09 Thread Heikki Krogerus
re clearly according to the newest specifications, introducing separate definitions for the data roles. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/typec/class.c | 56 ++--- drivers/usb/typec/fusb302/fusb302.c | 1 +

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 <bad...@google.com> > Signed-off-by: Hans de Goede <hdego...@redhat.com> You are correct. The patch should be rewritten. Acked-by: Heikki Krogerus <heikki.kroge...@linux.in

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

2018-03-06 Thread Heikki Krogerus
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 true). Final note. I think it would

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

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