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

2018-03-16 Thread Mats Karrman
Hi, On 2018-03-16 13:58, Greg KH wrote: On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: From: ShuFan Lee Richtek RT1711H Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Add definition of

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

2018-03-16 Thread Mats Karrman
Hi, On 2018-03-16 13:58, Greg KH wrote: On Fri, Mar 16, 2018 at 05:12:49PM +0800, ShuFan Lee wrote: From: ShuFan Lee Richtek RT1711H Type-C chip driver that works with Type-C Port Controller Manager to provide USB PD and USB Type-C functionalities. Add definition of TCPC_CC_STATUS_TOGGLING.

[PATCH v3] usb: typec: Don't prevent using constant typec_mode_desc initializers

2017-04-24 Thread Mats Karrman
Signed-off-by: Mats Karrman <mats.dev.l...@gmail.com> --- v3: - Fixed damaged white-space, finally? v2: - Fixed damaged white-space - Added signed-off-by drivers/usb/typec/typec.c | 11 ++- include/linux/usb/typec.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-)

[PATCH v3] usb: typec: Don't prevent using constant typec_mode_desc initializers

2017-04-24 Thread Mats Karrman
Signed-off-by: Mats Karrman --- v3: - Fixed damaged white-space, finally? v2: - Fixed damaged white-space - Added signed-off-by drivers/usb/typec/typec.c | 11 ++- include/linux/usb/typec.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/usb/typec

[PATCH v2] usb: typec: Don't prevent using constant typec_mode_desc initializers

2017-04-24 Thread Mats Karrman
Signed-off-by: Mats Karrman <mats.dev.l...@gmail.com> --- v2: - Fixed damaged white-space - Added signed-off-by drivers/usb/typec/typec.c | 11 ++- include/linux/usb/typec.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/usb/typec/typec.c b/d

[PATCH v2] usb: typec: Don't prevent using constant typec_mode_desc initializers

2017-04-24 Thread Mats Karrman
Signed-off-by: Mats Karrman --- v2: - Fixed damaged white-space - Added signed-off-by drivers/usb/typec/typec.c | 11 ++- include/linux/usb/typec.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/usb/typec/typec.c b/drivers/usb/typec/typec.c index

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-24 Thread Mats Karrman
Hello Guenter, Some corrections and suggestions follow. And then of course it would be nice to factor out the alternate mode handling so new mode handlers could be registered as needed :) BR // Mats On 04/22/2017 12:15 AM, Guenter Roeck wrote: From: Guenter Roeck This

Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm)

2017-04-24 Thread Mats Karrman
Hello Guenter, Some corrections and suggestions follow. And then of course it would be nice to factor out the alternate mode handling so new mode handlers could be registered as needed :) BR // Mats On 04/22/2017 12:15 AM, Guenter Roeck wrote: From: Guenter Roeck This driver implements

[PATCH] usb: typec: Don't prevent using constant typec_mode_desc initializers

2017-04-24 Thread Mats Karrman
From 98ff2be4de83f4d4b5293bfa424c274b25400e1e Mon Sep 17 00:00:00 2001 From: Mats Karrman <mats.dev.l...@gmail.com> Date: Mon, 24 Apr 2017 15:21:39 +0200 Subject: [PATCH] usb: typec: Don't prevent using constant typec_mode_desc initializers --- drivers/usb/typec/typec.

[PATCH] usb: typec: Don't prevent using constant typec_mode_desc initializers

2017-04-24 Thread Mats Karrman
From 98ff2be4de83f4d4b5293bfa424c274b25400e1e Mon Sep 17 00:00:00 2001 From: Mats Karrman Date: Mon, 24 Apr 2017 15:21:39 +0200 Subject: [PATCH] usb: typec: Don't prevent using constant typec_mode_desc initializers --- drivers/usb/typec/typec.c | 11 ++- include/linux/usb/typec.h

usb: typec: Missing link for altmode active store

2017-04-16 Thread Mats Karrman
Hello Heikki, I'm working with the new typec class code and have run into a problem. The struct typec_capability defines a callback function as: int (*activate_mode)(const struct typec_capability *, int mode, int activate); From the capability I can get to the corresponding port/plug/partner

usb: typec: Missing link for altmode active store

2017-04-16 Thread Mats Karrman
Hello Heikki, I'm working with the new typec class code and have run into a problem. The struct typec_capability defines a callback function as: int (*activate_mode)(const struct typec_capability *, int mode, int activate); From the capability I can get to the corresponding port/plug/partner

Re: USB Type-C Port Manager API concern

2017-04-14 Thread Mats Karrman
On 04/14/2017 04:57 AM, Guenter Roeck wrote: ... Overall I think there is an assumption in any API that any callback functions provided in a registration call can immediately be called. Otherwise any API would be in trouble. Can you modify your code to not require the port pointer in its

Re: USB Type-C Port Manager API concern

2017-04-14 Thread Mats Karrman
On 04/14/2017 04:57 AM, Guenter Roeck wrote: ... Overall I think there is an assumption in any API that any callback functions provided in a registration call can immediately be called. Otherwise any API would be in trouble. Can you modify your code to not require the port pointer in its

Re: USB Type-C Port Manager API concern

2017-04-09 Thread Mats Karrman
On 04/09/2017 05:16 PM, Guenter Roeck wrote: Hi Mats, On Sun, Apr 09, 2017 at 01:09:57AM +0200, Mats Karrman wrote: I'm working on a tcpi driver and have some concern about the tcpm api. The tcpm_register_port() is typically called from the probe function of tcpi driver where the tcpm_port

Re: USB Type-C Port Manager API concern

2017-04-09 Thread Mats Karrman
On 04/09/2017 05:16 PM, Guenter Roeck wrote: Hi Mats, On Sun, Apr 09, 2017 at 01:09:57AM +0200, Mats Karrman wrote: I'm working on a tcpi driver and have some concern about the tcpm api. The tcpm_register_port() is typically called from the probe function of tcpi driver where the tcpm_port

USB Type-C Port Manager API concern

2017-04-08 Thread Mats Karrman
Hi Guenter, From a previous thread: On 03/08/2017 02:38 AM, Guenter Roeck wrote: On 03/07/2017 02:30 PM, Mats Karrman wrote: [ ... ] I'm still struggling to catch up on what you guys have been up to during the last year or so :-) and came across some patches of Guenter from last October

USB Type-C Port Manager API concern

2017-04-08 Thread Mats Karrman
Hi Guenter, From a previous thread: On 03/08/2017 02:38 AM, Guenter Roeck wrote: On 03/07/2017 02:30 PM, Mats Karrman wrote: [ ... ] I'm still struggling to catch up on what you guys have been up to during the last year or so :-) and came across some patches of Guenter from last October

Re: [PATCH v17 0/3] USB Type-C Connector class

2017-03-22 Thread Mats Karrman
On 03/21/2017 11:37 AM, Heikki Krogerus wrote: I'm lost in the long thread here, is this series still ready to be merged in, or is there another version that is being worked on? There was one documentation fix proposed Mats. The rest of the thread was not about these patches. I'll send one

Re: [PATCH v17 0/3] USB Type-C Connector class

2017-03-22 Thread Mats Karrman
On 03/21/2017 11:37 AM, Heikki Krogerus wrote: I'm lost in the long thread here, is this series still ready to be merged in, or is there another version that is being worked on? There was one documentation fix proposed Mats. The rest of the thread was not about these patches. I'll send one

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-10 Thread Mats Karrman
On 2017-03-08 14:58, Heikki Krogerus wrote: On Tue, Mar 07, 2017 at 11:30:54PM +0100, Mats Karrman wrote: If I read Heikki's original suggestion I understand it like the DP driver would be responsible for AM specific USB PD/VDM communication. But wouldn't that lead to a lot of code

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-10 Thread Mats Karrman
On 2017-03-08 14:58, Heikki Krogerus wrote: On Tue, Mar 07, 2017 at 11:30:54PM +0100, Mats Karrman wrote: If I read Heikki's original suggestion I understand it like the DP driver would be responsible for AM specific USB PD/VDM communication. But wouldn't that lead to a lot of code

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Mats Karrman
On 2017-03-06 14:14, Heikki Krogerus wrote: Hi Mats, On Fri, Mar 03, 2017 at 08:27:08PM +0100, Mats Karrman wrote: My system is a bit different. It's an i.MX6 SoC with the typec phy and DP controller connected directly to the SoC and it's using DTB/OF. Is this "DP controller" a

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-07 Thread Mats Karrman
On 2017-03-06 14:14, Heikki Krogerus wrote: Hi Mats, On Fri, Mar 03, 2017 at 08:27:08PM +0100, Mats Karrman wrote: My system is a bit different. It's an i.MX6 SoC with the typec phy and DP controller connected directly to the SoC and it's using DTB/OF. Is this "DP controller" a

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-03 Thread Mats Karrman
On 2017-03-03 13:59, Heikki Krogerus wrote: On Fri, Mar 03, 2017 at 08:29:18AM +0100, Mats Karrman wrote: How would something like that sound to you guys? Complicated... Need to marinate on that for a while ;) My system is a bit different. It's an i.MX6 SoC with the typec phy and DP

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-03 Thread Mats Karrman
On 2017-03-03 13:59, Heikki Krogerus wrote: On Fri, Mar 03, 2017 at 08:29:18AM +0100, Mats Karrman wrote: How would something like that sound to you guys? Complicated... Need to marinate on that for a while ;) My system is a bit different. It's an i.MX6 SoC with the typec phy and DP

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-02 Thread Mats Karrman
On 2017-03-03 04:13, Guenter Roeck wrote: On 03/02/2017 07:22 AM, Mats Karrman wrote: Looking forward, one thing I have run into is how to connect the typec driver with a driver for an alternate mode. E.g. the DisplayPort Alternate Mode specification includes the HPD (hot plug) and HPD

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-02 Thread Mats Karrman
On 2017-03-03 04:13, Guenter Roeck wrote: On 03/02/2017 07:22 AM, Mats Karrman wrote: Looking forward, one thing I have run into is how to connect the typec driver with a driver for an alternate mode. E.g. the DisplayPort Alternate Mode specification includes the HPD (hot plug) and HPD

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-02 Thread Mats Karrman
Hi Heikki, Good to see things are happening with Type-C! On 2017-02-21 15:24, Heikki Krogerus wrote: ... +When connected, the partner will be presented also as its own device under +/sys/class/typec/. The parent of the partner device will always be the port it +is attached to. The partner

Re: [PATCH v17 2/3] usb: USB Type-C connector class

2017-03-02 Thread Mats Karrman
Hi Heikki, Good to see things are happening with Type-C! On 2017-02-21 15:24, Heikki Krogerus wrote: ... +When connected, the partner will be presented also as its own device under +/sys/class/typec/. The parent of the partner device will always be the port it +is attached to. The partner

Re: [PATCH] ASoC: Intel: sst: use ; instead of , at the of a C statement

2015-06-11 Thread Mats Karrman
On 2015-06-11 14:22, Sebastian Andrzej Siewior wrote: This was spotted by Fernando Lopez-Lezcano while he tried to compile a -RT kernel with this driver enabled. "make C=2" would also warn about this. This is is based on his patch. Reported-by: Fernando Lopez-Lezcano Signed-off-by:

Re: [PATCH] ASoC: Intel: sst: use ; instead of , at the of a C statement

2015-06-11 Thread Mats Karrman
On 2015-06-11 14:22, Sebastian Andrzej Siewior wrote: This was spotted by Fernando Lopez-Lezcano na...@ccrma.stanford.edu while he tried to compile a -RT kernel with this driver enabled. make C=2 would also warn about this. This is is based on his patch. Reported-by: Fernando Lopez-Lezcano