Re: [PATCH 4/5] usb: typec: ucsi: Preliminary support for alternate modes

2019-02-05 Thread Heikki Krogerus
Hi Michael, On Tue, Feb 05, 2019 at 02:20:34AM +, Michael Hsu wrote: > > Your PPM is reporting a separate mode for every pin-assignment it supports. > > It > > really should _not_ do that! You need to be able to get the capabilities > > for DP > > alt mode with GET_ALTERNATE_MODE command in

Re: [PATCH 4/5] usb: typec: ucsi: Preliminary support for alternate modes

2019-02-04 Thread Heikki Krogerus
Hi, On Fri, Feb 01, 2019 at 10:02:19PM +, Michael Hsu wrote: > Hi Heikki, the use of "con->port_altmode[cur]->mode" (which is a 1-based > index, not a 32-bit mode VDO) can cause incorrect matches if the > GET_ALTERNATE_MODES returns different ordering for recipient=connector and > recipient=so

[PATCH 5/5] usb: typec: ucsi: Support for DisplayPort alt mode

2019-02-01 Thread Heikki Krogerus
driver has. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/Makefile | 15 +- drivers/usb/typec/ucsi/displayport.c | 301 +++ drivers/usb/typec/ucsi/ucsi.c| 22 +- drivers/usb/typec/ucsi/ucsi.h| 21 ++ 4 files changed, 351 insertions(+), 8

[PATCH 0/5] usb: typec: ucsi: Support for DP alt mode

2019-02-01 Thread Heikki Krogerus
with a help of only one DP adapter, making that the only adapter that the machine appears to work with, even when in reality other adapters are working just fine :-(. I'm trying to work around some of those problems in these patches (I sure hope I'm not opening a can of worms with this s

[PATCH 4/5] usb: typec: ucsi: Preliminary support for alternate modes

2019-02-01 Thread Heikki Krogerus
to an alternate mode will not be possible until support for that alternate mode is added to the UCSI driver. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/trace.c | 12 ++ drivers/usb/typec/ucsi/trace.h | 26 +++ drivers/usb/typec/ucsi/ucsi.c | 351

[PATCH 1/5] usb: typec: displayport: Move the Configuration VDO helpers to the header

2019-02-01 Thread Heikki Krogerus
The helpers used for reading and writing the pin assignment from and to the Configuration VDO will be useful in GPU drivers, and also UCSI driver after DisplayPort alt mode support is added to it. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/altmodes/displayport.c | 4 include

[PATCH 3/5] usb: typec: ucsi: Remove debug.h file

2019-02-01 Thread Heikki Krogerus
It's not needed. Moving everything from it to trace.c. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/debug.h | 65 -- drivers/usb/typec/ucsi/trace.c | 59 ++ drivers/usb/typec/ucsi/trace.h | 7 ++-- 3 files change

[PATCH 2/5] usb: typec: Prepare alt mode enter/exit reporting for UCSI alt mode support

2019-02-01 Thread Heikki Krogerus
module ref count is incremented/decremented only if there really is a driver for the alt mode. That avoids a NULL pointer dereference from happening when the driver is missing. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH v2 0/9] device connection: Add support for device graphs

2019-01-31 Thread Heikki Krogerus
On Thu, Jan 31, 2019 at 11:06:29AM +0100, Hans de Goede wrote: > Hi, > > On 30-01-19 17:02, Heikki Krogerus wrote: > > Hi, > > > > This is the second version of this series. On top the two code style > > improvements requested by Andy, I also renamed the connect

Re: [PATCH v2 7/9] usb: typec: Find the ports by also matching against the device node

2019-01-31 Thread Heikki Krogerus
On Wed, Jan 30, 2019 at 06:51:56PM +0200, Andy Shevchenko wrote: > On Wed, Jan 30, 2019 at 6:03 PM Heikki Krogerus > wrote: > > > > When the connections are defined in firmware, struct > > device_connection will have the fwnode member pointing to > > the device node

Re: [PATCH] usb: typec: tcpm: Correct the PPS out_volt calculation

2019-01-31 Thread Heikki Krogerus
On Thu, Jan 31, 2019 at 09:01:00AM +0100, Greg KH wrote: > On Thu, Jan 31, 2019 at 09:31:25AM +0200, Heikki Krogerus wrote: > > On Wed, Jan 30, 2019 at 11:13:53AM +0800, Kyle Tso wrote: > > > When Sink negotiates PPS, the voltage range of selected PPS APDO might > >

Re: [PATCH] usb: typec: tcpm: Correct the PPS out_volt calculation

2019-01-30 Thread Heikki Krogerus
f0 ("usb: typec: tcpm: Extend the matching rules on PPS APDO selection") Cc: stable... Right? In any case: Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/tcpm/tcpm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/typ

[PATCH v2 0/9] device connection: Add support for device graphs

2019-01-30 Thread Heikki Krogerus
ching with fwnode in the future, so no more device name matching. The software fwnodes that we now have in kernel should make that possible, once we add support for references to them. The original RFC: https://lkml.org/lkml/2018/10/24/619 thanks, Heikki Krogerus (9): platform/x86: intel_cht_int33f

[PATCH v2 1/9] platform/x86: intel_cht_int33fe: Prepare for better mux naming scheme

2019-01-30 Thread Heikki Krogerus
Adding new connections with for the muxes with new identifiers. The old connection are left in for now. Signed-off-by: Heikki Krogerus --- drivers/platform/x86/intel_cht_int33fe.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel_cht_int33fe.c

[PATCH v2 3/9] platform/x86: intel_cht_int33fe: Remove old style mux connections

2019-01-30 Thread Heikki Krogerus
t to get a handle to the mux device. Signed-off-by: Heikki Krogerus --- drivers/platform/x86/intel_cht_int33fe.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c index 29

[PATCH v2 2/9] usb: typec: Rationalize the API for the muxes

2019-01-30 Thread Heikki Krogerus
er done using device property "svid" of the mux. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 7 ++- drivers/usb/typec/mux.c | 10 ++ include/linux/usb/typec_mux.h | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drive

[PATCH v2 4/9] device connection: Add fwnode member to struct device_connection

2019-01-30 Thread Heikki Krogerus
This will prepare the device connection API for connections described in firmware. Signed-off-by: Heikki Krogerus --- include/linux/device.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index 5663003a95eb..1fb077f5a936 100644 --- a

[PATCH v2 7/9] usb: typec: Find the ports by also matching against the device node

2019-01-30 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 24

[PATCH v2 5/9] usb: typec: mux: Find the muxes by also matching against the device node

2019-01-30 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/mux.c | 86

[PATCH v2 8/9] device connection: Prepare support for firmware described connections

2019-01-30 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device. The endpoint member for the device names will not be used at all in that case. Signed-off-by: Heikki Krogerus

[PATCH v2 9/9] device connection: Find device connections also from device graphs

2019-01-30 Thread Heikki Krogerus
If connections between devices are described in OF graph or ACPI device graph, we can find them by using the fwnode_graph_*() functions. Signed-off-by: Heikki Krogerus --- drivers/base/devcon.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff

[PATCH v2 6/9] usb: roles: Find the muxes by also matching against the device node

2019-01-30 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/roles/class.c | 21

Re: [PATCH v2 3/6] usb: typec: ucsi: add port num info

2019-01-30 Thread Heikki Krogerus
On Mon, Jan 28, 2019 at 12:37:28PM -0800, Ajay Gupta wrote: > Read PD port number information and save. It will be > required while sending PD_PORT_ENABLE command. > > Signed-off-by: Ajay Gupta > --- > Changes from v1: > - Updated commit message > - Used mask and shift instead of bitf

Re: [PATCH v2 2/6] usb: typec: ucsi: add ccg command framework

2019-01-30 Thread Heikki Krogerus
On Mon, Jan 28, 2019 at 12:37:27PM -0800, Ajay Gupta wrote: > Used to send various commands to ccg controller. They are > mainly used during firmware update process. > > We wait for response after sending the command and then > read the response from RAB_RESPONSE register. > > Signed-off-by: Ajay

Re: [PATCH 4/8] usb: typec: mux: Find the muxes by also matching against the device node

2019-01-28 Thread Heikki Krogerus
On Mon, Jan 28, 2019 at 11:53:54AM +0200, Andy Shevchenko wrote: > On Fri, Jan 25, 2019 at 3:17 PM Heikki Krogerus > wrote: > > > > When the connections are defined in firmware, struct > > device_connection will have the fwnode member pointing to > > the device node

Re: [PATCH 2/8] usb: typec: Rationalize the API for the muxes

2019-01-28 Thread Heikki Krogerus
On Mon, Jan 28, 2019 at 11:50:31AM +0200, Andy Shevchenko wrote: > On Fri, Jan 25, 2019 at 3:18 PM Heikki Krogerus > wrote: > > > > We can replace the second parameter that is passed to the > > typec_mux_get() function with alt mode description > > structure, and s

Re: [PATCH 1/8] platform/x86: intel_cht_int33fe: Remove connection for the alt mode mux

2019-01-28 Thread Heikki Krogerus
Hi Hans, On Mon, Jan 28, 2019 at 11:44:29AM +0100, Hans de Goede wrote: > Hi, > > On 28-01-19 10:45, Andy Shevchenko wrote: > > On Fri, Jan 25, 2019 at 3:17 PM Heikki Krogerus > > wrote: > > > > > > Driver for fusb302 does not support alternate modes

Re: [PATCH 2/7] usb: typec: ucsi: add ccg command framework

2019-01-25 Thread Heikki Krogerus
On Thu, Jan 24, 2019 at 07:15:35PM +, Ajay Gupta wrote: > Hi Heikki > > > > Used to send command to ccg controller > > > > > > Signed-off-by: Ajay Gupta > > > --- > > > drivers/usb/typec/ucsi/ucsi_ccg.c | 252 > > > -- > > > 1 file changed, 243 insertions(+), 9 de

Re: [PATCH 1/7] usb: typec: ucsi: add get_fw_info function

2019-01-25 Thread Heikki Krogerus
On Thu, Jan 24, 2019 at 05:45:48PM +, Ajay Gupta wrote: > Hi Heikki, > > > > Function is to get the details of ccg firmware and device version. > > > > > > Signed-off-by: Ajay Gupta > > > --- > > > drivers/usb/typec/ucsi/ucsi_ccg.c | 76 > > > ++- > > > 1 file cha

[PATCH 6/8] usb: typec: Find the ports by also matching against the device node

2019-01-25 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 24

[PATCH 5/8] usb: roles: Find the muxes by also matching against the device node

2019-01-25 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/roles/class.c | 21

[PATCH 8/8] device connection: Find device connections also from device graphs

2019-01-25 Thread Heikki Krogerus
If connections between devices are described in OF graph or ACPI device graph, we can find them by using the fwnode_graph_*() functions. Signed-off-by: Heikki Krogerus --- drivers/base/devcon.c | 39 --- 1 file changed, 36 insertions(+), 3 deletions(-) diff

[PATCH 0/8] device connection: Add support for device graphs

2019-01-25 Thread Heikki Krogerus
pport matching with fwnode in the future, so no more device name matching. The software fwnodes that we now have in kernel should make that possible, once we add support for references to them. The original RFC: https://lkml.org/lkml/2018/10/24/619 thanks, Heikki Krogerus (8): platfor

[PATCH 3/8] device connection: Add fwnode member to struct device_connection

2019-01-25 Thread Heikki Krogerus
This will prepare the device connection API for connections described in firmware. Signed-off-by: Heikki Krogerus --- include/linux/device.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index 5663003a95eb..1fb077f5a936 100644 --- a

[PATCH 1/8] platform/x86: intel_cht_int33fe: Remove connection for the alt mode mux

2019-01-25 Thread Heikki Krogerus
Driver for fusb302 does not support alternate modes, so the connection is not really needed for now. Removing that connection description allows us to improve the USB Type-C mux API. Signed-off-by: Heikki Krogerus --- drivers/platform/x86/intel_cht_int33fe.c | 11 --- 1 file changed, 4

[PATCH 2/8] usb: typec: Rationalize the API for the muxes

2019-01-25 Thread Heikki Krogerus
muxing is needed), only with alternate modes we need to identify the exact alternate mode. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 7 ++- drivers/usb/typec/mux.c | 8 +--- include/linux/usb/typec_mux.h | 3 ++- 3 files changed, 9 insertions(+), 9 deletions

[PATCH 4/8] usb: typec: mux: Find the muxes by also matching against the device node

2019-01-25 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/mux.c | 78

[PATCH 7/8] device connection: Prepare support for firmware described connections

2019-01-25 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device. The endpoint member for the device names will not be used at all in that case. Signed-off-by: Heikki Krogerus

Re: [PATCH v1 07/12] usb: roles: Find the usb role switch by also matching against the device node

2019-01-25 Thread Heikki Krogerus
On Mon, Jan 21, 2019 at 03:51:35PM +0200, Heikki Krogerus wrote: > Hi, > > On Mon, Jan 21, 2019 at 04:36:13PM +0800, Chen Yu wrote: > > Have the fwnode_get_name() patches been accepted? > > No, I didn't have a user for the function anymore: > https://lkml.org/lkm

Re: [PATCH] usb: typec: tpcm: improve error handling of tcpm_register_port

2019-01-22 Thread Heikki Krogerus
On Tue, Jan 22, 2019 at 09:00:24AM +, Jun Li wrote: > Remove debugfs if tcpm register port fails. > > Signed-off-by: Li Jun Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/tcpm/tcpm.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >

Re: [RFC PATCH 3/5] usb: roles: Find the muxes by also matching against the device node

2019-01-22 Thread Heikki Krogerus
On Tue, Jan 22, 2019 at 01:40:02PM +0800, Jun Li wrote: > Hi Heikki, > Heikki Krogerus 于2018年10月24日周三 下午11:06写道: > > > > When the connections are defined in firmware, struct > > device_connection will have the fwnode member pointing to > > the device node (struct f

Re: [PATCH v1 07/12] usb: roles: Find the usb role switch by also matching against the device node

2019-01-21 Thread Heikki Krogerus
Hi, On Mon, Jan 21, 2019 at 04:36:13PM +0800, Chen Yu wrote: > Have the fwnode_get_name() patches been accepted? No, I didn't have a user for the function anymore: https://lkml.org/lkml/2018/12/17/284 > And I will be grateful if you can tell me your plan about the > https://lkml.org/lkml/2018/10

Re: [PATCH 5/7] usb: typec: ucsi: add fw update needed check

2019-01-18 Thread Heikki Krogerus
On Thu, Jan 17, 2019 at 05:12:38PM -0800, Ajay Gupta wrote: > This will be needed to check if latest fw is already flashed. > > Signed-off-by: Ajay Gupta > --- > drivers/usb/typec/ucsi/ucsi_ccg.c | 139 ++ > 1 file changed, 139 insertions(+) > > diff --git a/drivers/

Re: [PATCH 6/7] usb: typec: ucsi: add check for supported vendor

2019-01-18 Thread Heikki Krogerus
On Thu, Jan 17, 2019 at 05:13:02PM -0800, Ajay Gupta wrote: > Added check to see the currently flashed or new firmware being > flashed is from a supported vendor. Why separate patch for this? thanks, -- heikki

Re: [PATCH 2/7] usb: typec: ucsi: add ccg command framework

2019-01-18 Thread Heikki Krogerus
On Thu, Jan 17, 2019 at 05:09:04PM -0800, Ajay Gupta wrote: > Used to send command to ccg controller > > Signed-off-by: Ajay Gupta > --- > drivers/usb/typec/ucsi/ucsi_ccg.c | 252 -- > 1 file changed, 243 insertions(+), 9 deletions(-) > > diff --git a/drivers/usb/typ

Re: [PATCH 1/7] usb: typec: ucsi: add get_fw_info function

2019-01-18 Thread Heikki Krogerus
Hi Ajay, On Thu, Jan 17, 2019 at 05:09:03PM -0800, Ajay Gupta wrote: > Function is to get the details of ccg firmware and device version. > > Signed-off-by: Ajay Gupta > --- > drivers/usb/typec/ucsi/ucsi_ccg.c | 76 ++- > 1 file changed, 74 insertions(+), 2 deletions

Re: [PATCH V2] roles: Fix for Enabling USB ROLE SWITCH QUIRK on INTEL_SUNRISEPOINT_LP_XHCI

2019-01-07 Thread Heikki Krogerus
On Tue, Jan 08, 2019 at 05:04:20AM -0500, m.bal...@intel.com wrote: > From: M, Balaji > > This fix enables USB role feature on intel commercial nuc > platform which is based on Kabylake chipset. > > Signed-off-by: M, Balaji > Reviewed-by: Hans de Goede OK by me: Reviewe

Re: [PATCH v3] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-18 Thread Heikki Krogerus
l be the maximum operational voltage times the >maximum current defined in the selected Source PDO > d. Select the Source PDO with the highest maximum power > > Signed-off-by: Kyle Tso Reviewed-by: Heikki Krogerus > --- > Changelog since v1: > - updated the commit messag

[PATCH] usb: typec: Improve Alt Mode documentation

2018-12-18 Thread Heikki Krogerus
Adding the document to the usb index file and fixing a few references. Also, exposing the code examples as "literal blocks" so they are more easy to read. Signed-off-by: Heikki Krogerus --- Documentation/driver-api/usb/index.rst | 1 + Documentation/driver-api/usb/typec.rs

Re: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Heikki Krogerus
l be the maximum operational voltage times the >maximum current defined in the selected Source PDO > d. Select the Source PDO with the highest maximum power > > Signed-off-by: Kyle Tso Reviewed-by: Heikki Krogerus In case you'll do one more version, I have a minor comment abo

[PATCH] usb: roles: Add a description for the class to Kconfig

2018-12-12 Thread Heikki Krogerus
efore hides the problem. So in practice Intel USB role switch driver was depending on USB Type-C drivers. Fixes: f6fb9ec02be1 ("usb: roles: Add Intel xHCI USB role switch driver") Cc: Signed-off-by: Heikki Krogerus --- drivers/usb/Kconfig | 4 drivers/usb/

Re: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-07 Thread Heikki Krogerus
ghest maximum power > > Signed-off-by: Kyle Tso Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/tcpm/tcpm.c | 29 + > 1 file changed, 17 insertions(+), 12 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/t

Re: [PATCH v1 12/12] dts: hi3660: Add support for usb on Hikey960

2018-12-04 Thread Heikki Krogerus
On Mon, Dec 03, 2018 at 11:45:15AM +0800, Yu Chen wrote: > This patch adds support for usb on Hikey960. > > Cc: Wei Xu > Cc: Rob Herring > Cc: Mark Rutland > Cc: linux-arm-ker...@lists.infradead.org > Cc: John Stultz > Cc: Binghui Wang > Signed-off-by: Yu Chen > --- > arch/arm64/boot/dts/hi

Re: [PATCH v1 09/12] usb: dwc3: Registering a role switch in the DRD code.

2018-12-04 Thread Heikki Krogerus
Balbi > Cc: Greg Kroah-Hartman > Signed-off-by: Yu Chen > Signed-off-by: Heikki Krogerus > > -- > v0: > The patch is provided by Heikki Krogerus. I modified and test it > on Hikey960 platform. > -- > --- > drivers/usb/

Re: [PATCH v1 09/12] usb: dwc3: Registering a role switch in the DRD code.

2018-12-03 Thread Heikki Krogerus
Balbi > Cc: Greg Kroah-Hartman > Signed-off-by: Yu Chen > Signed-off-by: Heikki Krogerus > > -- > v0: > The patch is provided by Heikki Krogerus. I modified and test it > on Hikey960 platform. Either make me as the original author by adding a "from" line with

Re: [PATCH v1 08/12] usb: roles: Add usb role switch notifier.

2018-12-03 Thread Heikki Krogerus
On Mon, Dec 03, 2018 at 11:45:11AM +0800, Yu Chen wrote: > This patch adds notifier for drivers want to be informed of the usb role > switch. I think in this case it would be good to explain a little for what we need the notifier for. > Cc: Greg Kroah-Hartman > Cc: Heikki Krogerus

Re: [PATCH v1 07/12] usb: roles: Find the usb role switch by also matching against the device node

2018-12-03 Thread Heikki Krogerus
Hi, On Mon, Dec 03, 2018 at 10:17:20AM +0200, Andy Shevchenko wrote: > On Mon, Dec 3, 2018 at 5:45 AM Yu Chen wrote: > > > > This patch adds code for supporting find usb role switch by matching against > > the device node described using of_graph. > > > #include > > #include > > #include >

Re: [PATCH v2 1/3] staging: typec: fusb302: Rename fcs,extcon-name to linux,extcon-name

2018-11-15 Thread Heikki Krogerus
Goede > Cc: Guenter Roeck > Acked-by: Hans de Goede > Acked-by: Guenter Roeck FWIW, the series: Reviewed-by: Heikki Krogerus > --- > drivers/platform/x86/intel_cht_int33fe.c | 2 +- > drivers/usb/typec/tcpm/fusb302.c | 2 +- > 2 files changed, 2 insertions(+)

Re: [balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister'

2018-11-15 Thread Heikki Krogerus
On Thu, Nov 15, 2018 at 09:46:26AM +0200, Felipe Balbi wrote: > > Hi Heikki, > > kbuild test robot writes: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git > > testing/next > > head: bad6c1502dac79c80ad5a7149fa308849c0191dd > > commit: 24e2238d8c102f242ece57f45fbeb

Re: [PATCH v1 2/5] extcon: Return -EPROBE_DEFER when extcon device is not found

2018-11-12 Thread Heikki Krogerus
d with the same requirements. > > To decrease a code duplication and a burden to the callers, > return -EPROBE_DEFER directly from extcon_get_extcon_dev(). > > Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Krogerus > --- > drivers/extcon/extcon-axp288.c

Re: [PATCH v3 3/3] usb: typec: tcpm: charge current handling for sink during hard reset

2018-11-06 Thread Heikki Krogerus
On Mon, Nov 05, 2018 at 04:15:24PM -0800, Badhri Jagan Sridharan wrote: > Hi Heikki, Rob, > > Thanks for reviewing ! > Should I update the patchset with the Reviewed-by tag and bumpup the > patchset version ? > Or is that not necessary? No it's not necessary. Greg will eventually pick these to hi

Re: [PATCH v15 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-11-02 Thread Heikki Krogerus
On Fri, Oct 26, 2018 at 09:36:59AM -0700, Ajay Gupta wrote: > Latest NVIDIA GPU cards have a Cypress CCGx Type-C controller > over I2C interface. > > This UCSI I2C driver uses I2C bus driver interface for communicating > with Type-C controller. > > Signed-off-by: Ajay Gup

Re: [PATCH v3 3/3] usb: typec: tcpm: charge current handling for sink during hard reset

2018-11-02 Thread Heikki Krogerus
ARD_RESET_SINK_OFF. Set the current limits to default value based > of CC pull up and resume the charge path when port enters > SNK_HARD_RESET_SINK_ON. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus > > Changes in V3: > Rebase on top of usb-ne

Re: [PATCH v3 2/3] usb: typec: tcpm: Do not disconnect link for self powered devices

2018-11-02 Thread Heikki Krogerus
know whether the device is self or bus powered. > > This overcomes unnecessary port disconnections from hard reset. > Also, speeds up the enumeration time when connected to Type-A ports. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus > - >

Re: [PATCH v3 1/3] dt-bindings: connector: Add self-powered property

2018-11-02 Thread Heikki Krogerus
to put the tag to this patch instead? FWIW: Reviewed-by: Heikki Krogerus > --- > Changes is v3: > - Rebase on top of usb-next > - no change w.r.t to this patch. Same as previous versions. > > No v2 version as the patch was introduced there. > > --- > Docu

[RFC PATCH 1/1] usb: dwc3: drd: Register a USB role switch

2018-10-30 Thread Heikki Krogerus
The Type-C drivers use USB role switch API to inform the system about the negotiated data role, so registering a role switch in the DRD code in order to support platforms with USB Type-C connectors. Signed-off-by: Heikki Krogerus --- Hi Chen Yu, This is related to your Hikey960 USB patches

Re: [PATCH 07/10] hikey960: Support usb functionality of Hikey960

2018-10-30 Thread Heikki Krogerus
On Tue, Oct 30, 2018 at 10:50:22AM +0800, Chen Yu wrote: > > I think you have too many things integrated into this one driver. IMO > > it would at least be better to just let the Type-C port driver take > > care of VBUS like I mentioned above. I'm also wondering if it would > > make sense to handle

Re: [PATCH 07/10] hikey960: Support usb functionality of Hikey960

2018-10-29 Thread Heikki Krogerus
Hi, On Sat, Oct 27, 2018 at 05:58:17PM +0800, Yu Chen wrote: > This driver handles usb hub power on and typeC port event of HiKey960 board: > 1)DP&DM switching between usb hub and typeC port base on typeC port > state By "hub" do you mean you have some kind of an integrated USB hub on your SoC?

Re: [PATCH 08/10] usb: typec: Add support for usb role switch in rt1711h driver

2018-10-29 Thread Heikki Krogerus
On Sat, Oct 27, 2018 at 05:58:18PM +0800, Yu Chen wrote: > This patch add struct device_connection to rt1711h driver to support > find "usb-role-switch" in tcpm_register_port. > > Cc: Heikki Krogerus > Cc: Greg Kroah-Hartman > Cc: Lucas Tsai > Cc: shufan_lee &

Re: [PATCH v13 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-26 Thread Heikki Krogerus
On Thu, Oct 25, 2018 at 09:55:47PM +, Ajay Gupta wrote: > Hi Heikki and Andy > [...] > > > > Shouldn't you return -ETIMEDOUT if count == 0? > > > Yes. Good catch. Does the below fix looks ok? > > > > > > do { > > > status = ccg_write(uc, CCGX_RAB_INTR_REG, &data, > > >

Re: [PATCH v13 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-25 Thread Heikki Krogerus
Hi Peter, > > I still didn't understand why can't this just be taken care of in your > > I2C host driver? Why can't you just read 4 bytes at a time in your > > master_xfer hook until you have received as much as the message is > > asking, and only after that return? > > The I2C host hardware *can

Re: [RFC PATCH 4/5] usb: typec: Find the ports by also matching against the device node

2018-10-25 Thread Heikki Krogerus
On Thu, Oct 25, 2018 at 10:27:20AM +0300, Heikki Krogerus wrote: > On Wed, Oct 24, 2018 at 08:07:09PM +0300, Sergei Shtylyov wrote: > > Hello! > > > > On 10/24/2018 06:05 PM, Heikki Krogerus wrote: > > > > > When the connections are defined in firmware, stru

Re: [PATCH v13 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-25 Thread Heikki Krogerus
Hi, On Tue, Oct 23, 2018 at 06:56:59PM +, Ajay Gupta wrote: > > > + /* i2c adapter (ccgx-ucsi) can read 4 byte max */ > > > > By "i2c adapter" do you mean this Cypress CCGx controller, or the NVIDIA I2C > > host adapter? > It mean NVIDIA I2C host adapter with name "ccgx-ucsi" > > > > + whil

Re: [RFC PATCH 1/5] driver core: Add fwnode member to struct device_connection

2018-10-25 Thread Heikki Krogerus
On Wed, Oct 24, 2018 at 08:33:53AM -0700, Randy Dunlap wrote: > On 10/24/18 8:05 AM, Heikki Krogerus wrote: > > This will prepare the device connection API for connections > > described in firmware. > > > > Signed-off-by: Heikki Krogerus > > --- > > includ

Re: [RFC PATCH 4/5] usb: typec: Find the ports by also matching against the device node

2018-10-25 Thread Heikki Krogerus
On Wed, Oct 24, 2018 at 08:07:09PM +0300, Sergei Shtylyov wrote: > Hello! > > On 10/24/2018 06:05 PM, Heikki Krogerus wrote: > > > When the connections are defined in firmware, struct > > device_connection will have the fwnode member pointing to > > the device node

[RFC PATCH 4/5] usb: typec: Find the ports by also matching against the device node

2018-10-24 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/class.c | 19

[RFC PATCH 5/5] drivers core: Find device connections also from device graphs

2018-10-24 Thread Heikki Krogerus
If connections between devices are described in OF graph or ACPI device graph, we can find them by using the fwnode_graph_*() functions. Signed-off-by: Heikki Krogerus --- drivers/base/devcon.c | 48 --- 1 file changed, 45 insertions(+), 3 deletions

[RFC PATCH 0/5] Adding graph handling to device connection API

2018-10-24 Thread Heikki Krogerus
sted on DT platform as well, so if somebody can do that, I would much appreciate. Thanks, Heikki Krogerus (5): driver core: Add fwnode member to struct device_connection usb: typec: mux: Find the muxes by also matching against the device node usb: roles: Find the muxes by also matching a

[RFC PATCH 3/5] usb: roles: Find the muxes by also matching against the device node

2018-10-24 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/common/roles.c

[RFC PATCH 2/5] usb: typec: mux: Find the muxes by also matching against the device node

2018-10-24 Thread Heikki Krogerus
When the connections are defined in firmware, struct device_connection will have the fwnode member pointing to the device node (struct fwnode_handle) of the requested device, and the endpoint will not be used at all in that case. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/mux.c | 19

[RFC PATCH 1/5] driver core: Add fwnode member to struct device_connection

2018-10-24 Thread Heikki Krogerus
This will prepare the device connection API for connections described in firmware. Signed-off-by: Heikki Krogerus --- include/linux/device.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index 90224e75ade4..a964a0d614fa 100644 --- a

Re: usb typec not doing handling in-kernel

2018-10-23 Thread Heikki Krogerus
Hi guys, On Tue, Oct 23, 2018 at 03:49:03PM +0200, Heiko Stuebner wrote: > > True, the graph parsing is indeed missing from that API. I'll see if I > > can propose something for that at one point (soon hopefully). > > as I'm just sitting next to Guenter at ELCE talking about that type-c > stuff,

Re: [PATCH v13 2/2] usb: typec: ucsi: add support for Cypress CCGx

2018-10-23 Thread Heikki Krogerus
pe-C controller. > > Signed-off-by: Ajay Gupta > Reviewed-by: Andy Shevchenko > Acked-by: Heikki Krogerus > --- > Changes from v1 -> v2 > Fixed identation in drivers/usb/typec/ucsi/Kconfig > Changes from v2 -> v3 > Fixed most of comments from He

Re: [PATCH v13 0/2] Add support for USB Type-C interface on latest NVIDIA GPU

2018-10-16 Thread Heikki Krogerus
+Andy These have changed a bit since Andy gave his review. On Fri, Oct 12, 2018 at 06:00:50PM +, Ajay Gupta wrote: > Hi Heikki and Wolfram > Do you have any comments on these changes? Let me take one more look at the UCSI driver, just in case. Nothing's probable going to happen for a while i

Re: [PATCH] usb: roles: intel_xhci: Determine current role by DUAL_ROLE_CFG1

2018-10-10 Thread Heikki Krogerus
> the role switched successful or not. > > So the SW_IDPIN and SW_VBUS_VALID bits can't determine the current > acting role. > > This patch changes the logic for getting role logic. > > Signed-off-by: Yu Wang Acked-by: Heikki Krogerus > --- >

Re: [PATCH] usb: typec: Fix copy/paste on typec_set_vconn_role() kerneldoc

2018-10-08 Thread Heikki Krogerus
On Sun, Oct 07, 2018 at 04:46:12PM -0700, Stephen Boyd wrote: > This must have been copy pasted from the function above. Fix it. > > Signed-off-by: Stephen Boyd Acked-by: Heikki Krogerus > --- > drivers/usb/typec/class.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

[PATCH] usb: xhci: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-10-01 Thread Heikki Krogerus
Intel Apollo Lake has the same internal USB role mux as Intel Cherry Trail. Cc: Signed-off-by: Heikki Krogerus --- Hi, The patch with the topic fixed. Thanks, --- drivers/usb/host/xhci-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c

Re: [PATCH v2 RESEND 3/3] usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-10-01 Thread Heikki Krogerus
On Mon, Oct 01, 2018 at 06:44:51PM +0300, Heikki Krogerus wrote: > Hi, > > Not a biggie, but why was the topic for this patch changed? > > I'm not sure Apollo lakes even have Type-C connectors. The mux is > needed with the uAB connectors. My bad. The topic was wrong

Re: [PATCH v2 RESEND 3/3] usb: typec: pci: Enable Intel USB role mux on Apollo Lake platforms

2018-10-01 Thread Heikki Krogerus
Hi, Not a biggie, but why was the topic for this patch changed? I'm not sure Apollo lakes even have Type-C connectors. The mux is needed with the uAB connectors. On Mon, Oct 01, 2018 at 06:36:09PM +0300, Mathias Nyman wrote: > From: Heikki Krogerus > > Intel Apollo Lake has the

Re: [PATCH] usb: roles: intel_xhci: Determine current role by DUAL_ROLE_CFG1

2018-10-01 Thread Heikki Krogerus
On Mon, Oct 01, 2018 at 04:23:31PM +0200, Hans de Goede wrote: > On 29-09-18 16:26, Yu Wang wrote: > > The USB PHY mux switch depend on both USB2/USB3 PHY state and xHCI/xDCI > > controller state. The role can't be switched if related states haven't > > satisfied. That is why we need to poll the DU

Re: [PATCH 2/3] [PATCH v2 2/3] usb: typec: tcpm: Do not disconnect link for self powered devices

2018-10-01 Thread Heikki Krogerus
ext. These are not going to apply cleanly on top of it because tcpm.c and all port drivers are now in their own directory drivers/usb/typec/tcpm/. Reviewed-by: Heikki Krogerus > - > Version history: > > V2: > Based on feedback from heikki.kroge...@linux.intel.com > -

Re: USB ports on Thunderbolt 3 Dock always doesn't work after resume from suspend

2018-10-01 Thread Heikki Krogerus
+Mika, Mathias On Sat, Sep 29, 2018 at 08:51:43AM +0200, Ondrej Holy wrote: > Hi, > > I recently got new Lenovo Thinkpad T480s with the ThinkPad Thunderbolt > 3 Dock. The USB ports (but probably also audio and ethernet) on the > dock always don't work after resume from suspend on up-to-date Fedor

Re: [PATCH 1/2] usb: typec: fusb302: Correct spelling mistake for toggling state

2018-09-27 Thread Heikki Krogerus
On Wed, Sep 26, 2018 at 04:23:51PM +0100, Adam Thomson wrote: > There's a typo in the enum name of the 'OFF' state for toggling > (TOGGLINE instead of TOGGLING). This commit resolves that trivial > spelling inconsistency. > > Signed-off-by: Adam Thomson

Re: [PATCH 2/2] usb: typec: fusb302: Resolve fixed power role contract setup

2018-09-27 Thread Heikki Krogerus
way by the 'fusb302_handle_togdone()' function, and CC events > are generated as expected for TCPM allowing a contract to be > established. > > Signed-off-by: Adam Thomson Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/tcpm/fusb302.c | 24 +++

Re: [PATCH] usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage

2018-09-24 Thread Heikki Krogerus
APDO having a lower maximum current output, > which is actually valid. > > Fixes: 2eadc33f40d4 ("typec: tcpm: Add core support for sink side PPS") > Cc: > Signed-off-by: Adam Thomson Reviewed-by: Heikki Krogerus > --- > Code based on usb-testing bran

Re: [PATCH] Revert "usb: typec: fusb302: Fix debugfs issue"

2018-09-21 Thread Heikki Krogerus
Hi Michael, On Fri, Sep 21, 2018 at 11:49:23AM +0200, Michael Gebhard wrote: > This reverts commit c9359f416207 ("usb: typec: fusb302: Fix debugfs issue") > > Removing debugfs directory leaves pointing at > freed memory. The next subsequent call to fusb302_probe() causes a > NULL pointer derenf

Re: [PATCH 1/2] usb: typec: mux: Take care of driver module reference counting

2018-09-20 Thread Heikki Krogerus
On Thu, Sep 20, 2018 at 01:20:03PM +0200, Greg KH wrote: > On Wed, Sep 19, 2018 at 10:58:04AM +0300, Heikki Krogerus wrote: > > Functions typec_mux_get() and typec_switch_get() already > > make sure that the mux device reference count is > > incremented, but the same must

[PATCH 12/12] usb: typec: Group all TCPCI/TCPM code together

2018-09-20 Thread Heikki Krogerus
Moving all the drivers that depend on the Port Controller Manager under a new directory drivers/usb/typec/tcpm/ and making Guenter Roeck the designated reviewer of that code. Acked-by: Guenter Roeck Signed-off-by: Heikki Krogerus --- MAINTAINERS | 6

[PATCH 11/12] usb: typec: fusb302: reorganizing the probe function a little

2018-09-20 Thread Heikki Krogerus
that. Acked-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Heikki Krogerus --- drivers/usb/typec/fusb302/fusb302.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb

[PATCH 02/12] dt-bindings: usb: fusb302: Use usb-connector bindings for configuration

2018-09-20 Thread Heikki Krogerus
ector' bindings instead to achieve the required port config. Signed-off-by: Adam Thomson Reviewed-by: Rob Herring Signed-off-by: Heikki Krogerus --- .../devicetree/bindings/usb/fcs,fusb302.txt | 32 +++ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/Documentation

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