Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-03 Thread Hans de Goede
Hi, On 03-12-18 17:21, Stephan Gerhold wrote: On Mon, Dec 03, 2018 at 11:50:53AM +0100, Hans de Goede wrote: Hi, On 02-12-18 18:08, Stephan Gerhold wrote: Hi, thanks for the quick reply! :) On Sun, Dec 02, 2018 at 03:41:29PM +0100, Hans de Goede wrote: Hi, On 01-12-18 13:22, Stephan

Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-03 Thread Hans de Goede
Hi, On 02-12-18 18:08, Stephan Gerhold wrote: Hi, thanks for the quick reply! :) On Sun, Dec 02, 2018 at 03:41:29PM +0100, Hans de Goede wrote: Hi, On 01-12-18 13:22, Stephan Gerhold wrote: Hi, I have been updating my Intel Baytrail tablet from 4.14 to 4.19 and noticed that the tusb1210

Re: tusb1210 probe of dwc3.0.auto.ulpi fails with EBUSY on 4.19+

2018-12-02 Thread Hans de Goede
Hi, On 01-12-18 13:22, Stephan Gerhold wrote: Hi, I have been updating my Intel Baytrail tablet from 4.14 to 4.19 and noticed that the tusb1210 PHY driver now fails to probe on 4.19.x and 4.20-rc4: tusb1210: probe of dwc3.0.auto.ulpi failed with error -16 (EBUSY) The commit that broke

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

2018-10-10 Thread Hans de Goede
that this works fine there: Tested-by: Hans de Goede Acked-by: Hans de Goede Regards, Hans --- drivers/usb/roles/intel-xhci-usb-role-switch.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c b/drivers/usb/roles

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

2018-10-01 Thread Hans de Goede
Hi, On 01-10-18 16:53, Wang, Yu1 wrote: Hi Hans, On 18-10-01 16:23:31, Hans de Goede wrote: Hi, 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

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

2018-10-01 Thread Hans de Goede
Hi, 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 DUAL_ROLE_CFG1 to check if the role switched successful or not. So the

Re: [PATCH v4 00/10] usb: typec: A few more improvements for Intel CHT

2018-09-11 Thread Hans de Goede
to be enumerated as USB3 devices instead of USB2 devices. The origin thread can be read here: https://www.spinics.net/lists/linux-usb/msg172033.html Thanks, the entire series looks good to me and has been tested by me on a GPD win with a fusb302 tcpm controller: Acked-by: Hans de Goede Tested

Re: [PATCH V6] roles: Fix USB 3.0 OTG issue on Intel platform

2018-09-10 Thread Hans de Goede
Hi, On 10-09-18 12:13, Heikki Krogerus wrote: On Sun, Sep 09, 2018 at 01:18:45PM +0200, Hans de Goede wrote: Hi Saranya, Heikki, On 07-09-18 10:18, Heikki Krogerus wrote: +Hans On Fri, Sep 07, 2018 at 12:32:01PM +0530, saranya.go...@intel.com wrote: From: Saranya Gopal This patch adds

Re: [PATCH V6] roles: Fix USB 3.0 OTG issue on Intel platform

2018-09-09 Thread Hans de Goede
Hi Saranya, Heikki, On 07-09-18 10:18, Heikki Krogerus wrote: +Hans On Fri, Sep 07, 2018 at 12:32:01PM +0530, saranya.go...@intel.com wrote: From: Saranya Gopal This patch adds static DRD mode for host/device mode switch. This fixes the issue where device mode was not working after DUT

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

2018-09-08 Thread Hans de Goede
HI, On 07-09-18 18:19, Guenter Roeck wrote: On Fri, Sep 07, 2018 at 05:06:12PM +0300, Heikki Krogerus wrote: On Fri, Sep 07, 2018 at 06:35:12AM -0700, Guenter Roeck wrote: On 09/07/2018 05:56 AM, Heikki Krogerus wrote: Moving all the drivers that depend on the Port Controller Manager under a

Re: [PATCH v3 02/10] usb: roles: Handle driver reference counting

2018-09-06 Thread Hans de Goede
HI, On 04-09-18 13:22, Heikki Krogerus wrote: This fixes potential "BUG: unable to handle kernel paging request at ..." from happening. Fixes: fde0aa6c175a ("usb: common: Small class for USB role switches") Cc: Signed-off-by: Heikki Krogerus --- drivers/usb/common/roles.c | 15

Re: [PATCH v3 00/10] usb: typec: A few more improvements for Intel CHT

2018-09-04 Thread Hans de Goede
be read here: https://www.spinics.net/lists/linux-usb/msg172033.html It seems you forgot my tag Acked-by: Andy Shevchenko for PDx86 bits on condition that Hans is okay with them. I'm ok with them now. The entire series is: Reviewed-by: Hans de Goede Greg, I believe that the intent

Re: [PATCH v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-04 Thread Hans de Goede
Hi, On 04-09-18 09:44, Heikki Krogerus wrote: On Tue, Sep 04, 2018 at 09:40:35AM +0200, Hans de Goede wrote: HI, On 04-09-18 09:37, Heikki Krogerus wrote: Hi Hans, On Mon, Sep 03, 2018 at 04:59:51PM +0200, Hans de Goede wrote: Hi, On 03-09-18 15:36, Heikki Krogerus wrote: PI3USB30532

Re: [PATCH v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-04 Thread Hans de Goede
HI, On 04-09-18 09:37, Heikki Krogerus wrote: Hi Hans, On Mon, Sep 03, 2018 at 04:59:51PM +0200, Hans de Goede wrote: Hi, On 03-09-18 15:36, Heikki Krogerus wrote: PI3USB30532 is used for muxing the port to DisplayPort on CHT platforms, so changing the connection ID so that the mux will get

Re: [PATCH v2 06/10] platform: x86: intel_cht_int33fe: Fix the identifier for the mux connection

2018-09-03 Thread Hans de Goede
Hi, On 03-09-18 15:36, Heikki Krogerus wrote: PI3USB30532 is used for muxing the port to DisplayPort on CHT platforms, so changing the connection ID so that the mux will get assigned to the alternate mode device and not the port device. Connection ID "typec-mux" is now reserved for Accessory

Re: [PATCH 0/8] usb: typec: A few more improvements for Intel CHT

2018-09-03 Thread Hans de Goede
Hi, On 31-08-18 16:20, Heikki Krogerus wrote: Hi, The second last patch in this series will make it possible to use multiport USB Type-C and PD controllers with the muxes. The CHT connections are simply adapted to that. The rest of the series will mainly allow us to use the USB Type-C on CHT

Re: [PATCH 4/8] usb: xhci: pci: Only create Intel mux device when it's needed

2018-09-03 Thread Hans de Goede
Hi, On 31-08-18 16:20, Heikki Krogerus wrote: Only create thre Intel role mux device if the platform has USB peripheral controller PCI device. While here, enable the role mux on Apollo Lake platforms. Signed-off-by: Heikki Krogerus Cc: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 20

Re: [PATCH -next] usb: dwc3: pci: Fix return value check in dwc3_byt_enable_ulpi_refclock()

2018-07-31 Thread Hans de Goede
mware does not") Signed-off-by: Wei Yongjun Thank you for catching this: Reviewed-by: Hans de Goede Regards, Hans --- drivers/usb/dwc3/dwc3-pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c ind

Re: [PATCH v3 1/3] usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources

2018-07-03 Thread Hans de Goede
Hi, On 10-06-18 16:01, Hans de Goede wrote: Bay Trail / BYT SoCs do not have a builtin device-mode phy, instead they require an external ULPI phy for device-mode. Only some BYT devices have an external phy, but even on those devices device-mode is not working because the dwc3 does not see

Re: [PATCH 4.18 REGRESSION fix 2/2] i2c-cht-wc: Fix bq24190 supplier

2018-07-02 Thread Hans de Goede
Hi, On 02-07-18 12:34, Adam Thomson wrote: On 01 July 2018 10:49, Hans de Goede wrote: Commit f2a8aa053c17 ("typec: tcpm: Represent source supply through power_supply") moved the code to register a power_supply representing the device supplying power to the type-C connector, from t

Re: [PATCH 4.18 REGRESSION fix 1/2] typec: tcpm: Correctly report power_supply current and voltage for non pd supply

2018-07-02 Thread Hans de Goede
Hi, On 02-07-18 12:28, Adam Thomson wrote: On 01 July 2018 10:49, Hans de Goede wrote: Commit f2a8aa053c17 ("typec: tcpm: Represent source supply through power_supply") moved the code to register a power_supply representing the device supplying power to the type-C connector, from t

[PATCH] USB: typec: fsusb302: Drop empty set_current_limit implementation

2018-07-01 Thread Hans de Goede
The set_current_limit tcpm_dev callback is optional and the tcpm core will already log the passed in values, so there is no need to have an empty implementation of this. Signed-off-by: Hans de Goede --- drivers/usb/typec/fusb302/fusb302.c | 12 1 file changed, 12 deletions(-) diff

[PATCH 4.18 REGRESSION fix 2/2] i2c-cht-wc: Fix bq24190 supplier

2018-07-01 Thread Hans de Goede
he fusb302 driver, which determines how much current the bq24190 can draw, to change name from "fusb302-typec-source" to "tcpm-source-psy-i2c-fusb302". Fixes: f2a8aa053c17 ("typec: tcpm: Represent source supply through...") Cc: Adam Thomson Signed-off-by: Hans de Goe

[PATCH 4.18 REGRESSION fix 1/2] typec: tcpm: Correctly report power_supply current and voltage for non pd supply

2018-07-01 Thread Hans de Goede
aa053c17 ("typec: tcpm: Represent source supply through...") Cc: Adam Thomson Signed-off-by: Hans de Goede --- drivers/usb/typec/tcpm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 8a201dd53d36..31695

[PATCH 4.18 REGRESSION fix 0/2] typec: tcpm: Fix current-limit for non PD charging

2018-07-01 Thread Hans de Goede
Hi All, Commit f2a8aa053c17 ("typec: tcpm: Represent source supply through power_supply"), causes the GPD win and pocket to charge at 5V 500ma instead of 5V 2000ma when using a non PD charger (the GPD win comes with a non PD charger). These 2 patches fix this. They are both needed to fix this,

[PATCH] usb: dwc3: Only call clk_bulk_get() on devicetree instantiated devices

2018-06-12 Thread Hans de Goede
ode) check so that it only is done on devicetree instantiated devices, fixing this error. Cc: Masahiro Yamada Signed-off-by: Hans de Goede --- drivers/usb/dwc3/core.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/us

Re: "usb: dwc3: support clocks and resets for DWC3 core" is causing errors on x86

2018-06-12 Thread Hans de Goede
Hi, On 12-06-18 08:27, Masahiro Yamada wrote: Hi Hans, 2018-06-08 5:57 GMT+09:00 Hans de Goede : Hi All, While testing usb-next on some Intle Bay and Cherry Trail devices I noticed the following new error in my logs: [ 26.187958] dwc3 dwc3.3.auto: Failed to get clk 'ref': -2

[PATCH v3 1/3] usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources

2018-06-10 Thread Hans de Goede
by gpiod_add_lookup_table is a fallback mapping, so boards which properly provide GPIO resources in the ACPI firmware-node resources will not use this. *) Except for the first revision of the evalulation-kit, which normal users don't have Signed-off-by: Hans de Goede --- Changes in v3: -Add

[PATCH v3 3/3] usb: dwc3: pci: Use devm functions to get the phy GPIOs

2018-06-10 Thread Hans de Goede
-by: Hans de Goede --- drivers/usb/dwc3/dwc3-pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 046f7f55789f..bd4d010e 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c

[PATCH v3 2/3] usb: dwc3: pci: Enable ULPI Refclk on platforms where the firmware does not

2018-06-10 Thread Hans de Goede
On some Bay Trail (BYT) systems the firmware does not enable the ULPI Refclk. This commit adds a helper which checks and if necessary enabled the Refclk and calls this helper for BYT machines. Signed-off-by: Hans de Goede --- Changes in v2: -Use pcim_iomap instead of parsing resources ourselves

Re: [PATCH 1/3] usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources

2018-06-10 Thread Hans de Goede
Hi, On 07-06-18 15:35, Hans de Goede wrote: Hi, On 07-06-18 15:28, Andy Shevchenko wrote: On Thu, Jun 7, 2018 at 1:38 PM, Hans de Goede wrote: Bay Trail / BYT SoCs do not have a builtin device-mode phy, instead they require an external ULPI phy for device-mode. Only some BYT devices have

[PATCH v2 2/3] usb: dwc3: pci: Enable ULPI Refclk on platforms where the firmware does not

2018-06-08 Thread Hans de Goede
On some Bay Trail (BYT) systems the firmware does not enable the ULPI Refclk. This commit adds a helper which checks and if necessary enabled the Refclk and calls this helper for BYT machines. Signed-off-by: Hans de Goede --- Changes in v2: -Use pcim_iomap instead of parsing resources ourselves

[PATCH v2 1/3] usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources

2018-06-08 Thread Hans de Goede
a (mostly) unmodified version of the reference design BIOS is used. 3 out of the 20 BYT tablets which I have for testing have an external ULPI phy and all 3 models use this vendor string. Signed-off-by: Hans de Goede --- drivers/usb/dwc3/dwc3-pci.c | 27 +++ 1 file changed, 27

[PATCH v2 3/3] usb: dwc3: pci: Use devm functions to get the phy GPIOs

2018-06-08 Thread Hans de Goede
-by: Hans de Goede --- drivers/usb/dwc3/dwc3-pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 3f64cf7bf6c7..34bc43e1b5f8 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c

"usb: dwc3: support clocks and resets for DWC3 core" is causing errors on x86

2018-06-07 Thread Hans de Goede
Hi All, While testing usb-next on some Intle Bay and Cherry Trail devices I noticed the following new error in my logs: [ 26.187958] dwc3 dwc3.3.auto: Failed to get clk 'ref': -2 This is caused by the new clk_bulk_get() call in drivers/usb/dwc3/core.c If I understand the commit message

Re: [PATCH 2/3] usb: dwc3: pci: Enable ULPI Refclk on platforms where the firmware doesnot

2018-06-07 Thread Hans de Goede
Hi, On 07-06-18 18:43, Sergei Shtylyov wrote: Hello! On 06/07/2018 01:38 PM, Hans de Goede wrote: On some Bay Trail (BYT) systems the firmware does not enable the ULPI Refclk. This commit adds a helper which checks and if necessary enabled the Refclk and calls this helper for BYT machines

Re: [PATCH 2/3] usb: dwc3: pci: Enable ULPI Refclk on platforms where the firmware doesnot

2018-06-07 Thread Hans de Goede
Hi, On 07-06-18 15:30, Andy Shevchenko wrote: On Thu, Jun 7, 2018 at 1:38 PM, Hans de Goede wrote: On some Bay Trail (BYT) systems the firmware does not enable the ULPI Refclk. This commit adds a helper which checks and if necessary enabled the Refclk and calls this helper for BYT machines

Re: [PATCH 1/3] usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources

2018-06-07 Thread Hans de Goede
Hi, On 07-06-18 15:28, Andy Shevchenko wrote: On Thu, Jun 7, 2018 at 1:38 PM, Hans de Goede wrote: Bay Trail / BYT SoCs do not have a builtin device-mode phy, instead they require an external ULPI phy for device-mode. Only some BYT devices have an external phy, but even on those devices

[PATCH 1/3] usb: dwc3: pci: Add GPIO lookup table on platforms without ACPI GPIO resources

2018-06-07 Thread Hans de Goede
a (mostly) unmodified version of the reference design BIOS is used. 3 out of the 20 BYT tablets which I have for testing have an external ULPI phy and all 3 models use this vendor string. Signed-off-by: Hans de Goede --- drivers/usb/dwc3/dwc3-pci.c | 27 +++ 1 file changed, 27

[PATCH 3/3] usb: dwc3: pci: Use devm functions to get the phy GPIOs

2018-06-07 Thread Hans de Goede
-by: Hans de Goede --- drivers/usb/dwc3/dwc3-pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 65bc110388f3..2659a68eefd2 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c

[PATCH 2/3] usb: dwc3: pci: Enable ULPI Refclk on platforms where the firmware doesnot

2018-06-07 Thread Hans de Goede
On some Bay Trail (BYT) systems the firmware does not enable the ULPI Refclk. This commit adds a helper which checks and if necessary enabled the Refclk and calls this helper for BYT machines. Signed-off-by: Hans de Goede --- drivers/usb/dwc3/dwc3-pci.c | 34

Re: USB role switches, usb-connector, typec and device trees

2018-06-07 Thread Hans de Goede
Hi, On 06-06-18 23:36, Mats Karrman wrote: Hello Gentlemen, I'm trying to get my head around USB role switches in connection with Type-C ports and device-trees. So far I have not found much documentation, e.g. there are no device-tree bindings documented and really no good examples in

Re: [PATCH v2 1/3] usb: roles: intel_xhci: Always allow user control

2018-05-23 Thread Hans de Goede
le, .get = intel_xhci_usb_get_role, + .allow_userspace_control = true, }; static int intel_xhci_usb_probe(struct platform_device *pdev) I hate to be pedantic here, but the sw_desc can and should be made const now, with that fixed the entire series is: Reviewed-by: Hans

Re: [PATCH 4/4] usb: roles: intel_xhci: Always allow user control

2018-05-01 Thread Hans de Goede
of the struct and also make the struct const since we are now no longer changing it and usb_role_switch_register() accepts it being const. With that changed: Reviewed-by: Hans de Goede <hdego...@redhat.com> Regards, Hans -- To unsubscribe from this list: send the line "unsubscr

Re: [PATCH 2/4] usb: typec: tcpm: Release the role mux when exiting

2018-05-01 Thread Hans de Goede
;heikki.kroge...@linux.intel.com> Makes sense: Reviewed-by: Hans de Goede <hdego...@redhat.com> Regards, Hans --- drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 1ee259bc14a5..66dc0773b9bf 100644 -

Re: [PATCH 1/4] platform: x86: intel_cht_int33fe: Fix dependencies

2018-05-01 Thread Hans de Goede
Hi, On 30-04-18 14:41, Heikki Krogerus wrote: The driver will not probe unless bq24190 is loaded, so making it a dependency. Hmm, the dependency is pure run-time, with this Kconfig change if a user now decides to builtin the intel_cht_int33fe driver, the bq24190 driver must also be builtin,

Re: [PATCH] usb: always build usb/common/ targets; fixes extcon-axp288 build error

2018-04-24 Thread Hans de Goede
Hi, On 24-04-18 09:42, Chanwoo Choi wrote: On 2018년 04월 17일 18:01, Hans de Goede wrote: Hi, On 17-04-18 07:14, Randy Dunlap wrote: From: Randy Dunlap <rdun...@infradead.org> The extcon-axp288 driver selects USB_ROLE_SWITCH, but the USB Makefile does not currently build drivers/usb/

Re: [PATCH RFC] usb: typec: tcpm: remove operating_snk_mw for rdo

2018-04-20 Thread Hans de Goede
Hi, On 04/20/2018 04:13 PM, Guenter Roeck wrote: On 04/20/2018 03:51 AM, Jun Li wrote: -Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: 2018年4月20日 17:21 To: Jun Li <jun...@nxp.com>; li...@roeck-us.net; heikki.kroge...@linux.intel.com C

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

2018-04-20 Thread Hans de Goede
Hi, On 04/20/2018 04:35 PM, Heikki Krogerus wrote: 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

Re: [PATCH RFC] usb: typec: tcpm: remove operating_snk_mw for rdo

2018-04-20 Thread Hans de Goede
Hi, On 20-04-18 12:51, Jun Li wrote: -Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: 2018年4月20日 17:21 To: Jun Li <jun...@nxp.com>; li...@roeck-us.net; heikki.kroge...@linux.intel.com Cc: gre...@linuxfoundation.org; linux-usb@vger.kernel.org; dl-lin

Re: [PATCH RFC] usb: typec: tcpm: remove operating_snk_mw for rdo

2018-04-20 Thread Hans de Goede
Hi, On 20-04-18 11:18, Jun Li wrote: -Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: 2018年4月18日 19:40 To: Jun Li <jun...@nxp.com>; li...@roeck-us.net; heikki.kroge...@linux.intel.com Cc: gre...@linuxfoundation.org; linux-usb@vger.kernel.org; dl-lin

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

2018-04-20 Thread Hans de Goede
Hi Heikki, On 20-04-18 10:06, Heikki Krogerus wrote: This will add an array of known USB Type-C Port devices that will be used as a blacklist for enabling userspace-control, and remove the PMIC ACPI HID which was used for the same purpose. It turns out that on some CHT based platforms the

Re: [PATCH RFC] usb: typec: tcpm: remove operating_snk_mw for rdo

2018-04-18 Thread Hans de Goede
Hi, On 17-04-18 08:01, Li Jun wrote: This patch is a further update for rdo based on [1], which removed max_snk_ma/mv/mw but kept operating_snk_mw. operating_snk_mw is only used to judge capability mismatch, per PD spec, we can achieve this via compare the selected source PDO and matching sink

Re: [PATCH] usb: always build usb/common/ targets; fixes extcon-axp288 build error

2018-04-17 Thread Hans de Goede
orted-by: Fengguang Wu <fengguang...@intel.com> Signed-off-by: Randy Dunlap <rdun...@infradead.org> Cc: MyungJoo Ham <myungjoo....@samsung.com> Cc: Chanwoo Choi <cw00.c...@samsung.com> Cc: Hans de Goede <hdego...@redhat.com> Cc: Greg Kroah-Hartman <gre...@linuxfoun

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

2018-04-13 Thread Hans de Goede
e same pdo type of sink and 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> --- drivers/usb/typec/tcpm.c | 102 ++

Re: [PATCH v3 0/5] usb: typec: remove max_snk_mv/ma/mw

2018-04-13 Thread Hans de Goede
ies passing max_snk_* to be a variable sink pdo for fusb302. Thank you for your work on this, v3 of the series looks good to me: Reviewed-by: Hans de Goede <hdego...@redhat.com> Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-usb"

[PATCH] usb: typec: Fix kernel documentation no longer building

2018-04-08 Thread Hans de Goede
Fix kernel documentation no longer building due to un-escaped ascii-art in Documentation/driver-api/usb/typec.rst. Fixes: bdecb33af34f ("usb: typec: API for controlling USB Type-C ...") Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Documentation/driver-api/usb/typec.rs

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

2018-04-04 Thread Hans de Goede
Hi, On 04-04-18 14:06, Mats Karrman wrote: Hi Li, On 2018-03-23 15:58, Li Jun wrote: Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Signed-off-by: Li Jun ---   drivers/usb/typec/fusb302/fusb302.c | 51

Re: [PATCH] usb: select USB_COMMON for usb role switch config

2018-04-04 Thread Hans de Goede
ix this (matches the other drivers/usb/Kconfig bits): Reviewed-by: Hans de Goede <hdego...@redhat.com> Regards, Hans --- drivers/usb/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 75f7fb151f71..987fc5ba6321 100644 --- a/dri

Re: [PATCH v2 0/5] usb: typec: remove max_snk_mv/ma/mw

2018-04-03 Thread Hans de Goede
Hi, On 23-03-18 15:58, Li Jun wrote: This patch set is to remove max_snk_mv/ma/mw configs, as we should define the sink capability by sink PDOs, the first patch update the source PDO match policy by compare the voltage range between source and sink PDOs no matter what type they are, the

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

2018-04-03 Thread Hans de Goede
Hi, On 23-03-18 15:58, Li Jun wrote: Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Signed-off-by: Li Jun --- drivers/usb/typec/fusb302/fusb302.c | 51 +++-- 1 file changed, 37

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

2018-04-03 Thread Hans de Goede
Hi, On 23-03-18 15:58, Li Jun wrote: This patch is a combination of commit 57e6f0d7b804 ("typec: tcpm: Only request matching pdos") and source pdo selection optimization based on it, instead of only compare between the same pdo type of sink and source, we should check source pdo voltage range

Re: [PATCH -next] usb: roles: Fix return value check in intel_xhci_usb_probe()

2018-03-26 Thread Hans de Goede
t;) Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> You're right, thank you for catching this. Reviewed-by: Hans de Goede <hdego...@redhat.com> Regards, Hans --- drivers/usb/roles/intel-xhci-usb-role-switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

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

2018-03-21 Thread Hans de Goede
Hi, On 21-03-18 12:19, Jun Li wrote: -Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: 2018年3月20日 20:29 To: Jun Li <jun...@nxp.com>; gre...@linuxfoundation.org; robh...@kernel.org; mark.rutl...@arm.com; heikki.kroge...@linux.intel.com; li...@roeck-us.ne

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

2018-03-20 Thread Hans de Goede
Hi, On 20-03-18 11:26, Li Jun wrote: Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. NACK there are actual users of the device-properties which you are now breaking. As I mentioned in another thread, you need to instead add the pdo array to

Re: [PATCH 1/5] usb: typec: tcpm: source pdo selection update

2018-03-20 Thread Hans de Goede
Hi, On 20-03-18 11:26, Li Jun wrote: Instead of only compare between the same pdo type of sink and source, this patch update the source pdo selection by checking the source pdo voltage range is within that of sink. Signed-off-by: Li Jun This patch applies on top of the

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

2018-03-20 Thread Hans de Goede
Hi, 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) +{ + mutex_lock(_lock); + list_del_rcu(>list); See, rcu? True. I'll send one more version. Before I do

Re: [RFC PATCH] usb: typec: tcpm: match source fixed pdo with sink variable pdo

2018-03-19 Thread Hans de Goede
HI, On 19-03-18 10:43, Jun Li wrote: Hi -Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: 2018年3月14日 18:39 To: Jun Li <jun...@nxp.com>; gre...@linuxfoundation.org; li...@roeck-us.net; heikki.kroge...@linux.intel.com; adam.thomson.opensou...@diasemi.co

Re: [RFC] musb: removing otg protocol support

2018-03-18 Thread Hans de Goede
Hi, On 18-03-18 14:16, Greg Kroah-Hartman wrote: On Fri, Mar 16, 2018 at 02:09:51PM -0500, Bin Liu wrote: Hi, The kernel usb stack and musb drivers have gone through some changes in the past several kernel versions, such as adding otg fsm, musb runtime PM, and musb otg state moving from musb

Re: [RFC PATCH] usb: typec: tcpm: match source fixed pdo with sink variable pdo

2018-03-14 Thread Hans de Goede
Hi, On 14-03-18 10:32, Jun Li wrote: Hi -Original Message- From: Hans de Goede [mailto:hdego...@redhat.com] Sent: 2018年3月13日 19:36 To: Jun Li <jun...@nxp.com>; gre...@linuxfoundation.org; li...@roeck-us.net; heikki.kroge...@linux.intel.com; adam.thomson.opensou...@diasemi.co

Re: [RFC PATCH] usb: typec: tcpm: match source fixed pdo with sink variable pdo

2018-03-13 Thread Hans de Goede
HI, On 13-03-18 12:36, Hans de Goede wrote: Hi, On 13-03-18 01:02, Li Jun wrote: This patch tries to fix the problem describled on revert patch commit[1], suppose any supported voltage ranges of sink should be describled by variable pdo, so instead of revert the patch of only comparing source

Re: [RFC PATCH] usb: typec: tcpm: match source fixed pdo with sink variable pdo

2018-03-13 Thread Hans de Goede
, this patch adds the match between source fixed pdo and sink variable pdo. [1] https://www.spinics.net/lists/linux-usb/msg166366.html CC: Hans de Goede <hdego...@redhat.com> CC: Guenter Roeck <li...@roeck-us.net> CC: Heikki Krogerus <heikki.kroge...@linux.intel.com> CC: Adam Thomson <

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

2018-03-12 Thread Hans de Goede
an you create an immutable branch for the platform/x86 and extcon maintainers to merge once this is done? Regards, Hans Hans de Goede (7): usb: typec: tcpm: Set USB role switch to device mode when configured as such usb: typec: tcpm: Use new Type-C switch/mux and usb-role-switch

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

2018-03-12 Thread Hans de Goede
Hi, On 12-03-18 09:13, Heikki Krogerus wrote: 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> S

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

2018-03-11 Thread Hans de Goede
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> Several frameworks - clk, gpio, phy, pmw, etc. - maintain lookup tables for describing connections and provide cust

Re: [PATCH] uas: fix comparison for error code

2018-03-06 Thread Hans de Goede
Hi, On 06-03-18 15:04, Oliver Neukum wrote: A typo broke the comparison. Fixes: cbeef22fd611c4f47c494b821b2b105b8af970bb ("usb: uas: unconditionally bring back host after reset") Signed-off-by: Oliver Neukum <oneu...@suse.com> CC: sta...@kernel.org Thanks. Acked-by: Hans

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

2018-03-06 Thread Hans de Goede
d against a variable snk_cap, so at a minimum the commit should be rewritten to support that. For now lets revert the "typec: tcpm: Only request matching pdos" commit, fixing the regression. Cc: Badhri Jagan Sridharan <bad...@google.com> Signed-off-by: Hans de Goede <hdego...@re

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

2018-03-02 Thread Hans de Goede
ogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Consistently use IS_ERR_OR_NULL where applicable -Add Andy's Revi

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

2018-03-02 Thread Hans de Goede
mode after a detach. Reviewed-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: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Re

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

2018-03-02 Thread Hans de Goede
ck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- 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 |

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

2018-03-02 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v6: -Fix data and match arguments being swapped in __device_find_connection() call in device_find_connection() (as not

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

2018-03-02 Thread Hans de Goede
com> Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Reviewed-by Changes in v2: -Use SPDX license header -Various small style

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

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

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

2018-03-02 Thread 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. Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.c

[PATCH v6 02/12] usb: typec: Start using ERR_PTR

2018-03-02 Thread Hans de Goede
taking over control of the muxes for example is because handling them in the port drivers would be just boilerplate. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Revi

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

2018-03-02 Thread Hans de Goede
with an INT3496 ACPI device -Charger-type misdetection (always SDP) on devices with an INT3496 when the USB role (always) gets initialized as host Reviewed-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de

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

2018-03-02 Thread Hans de Goede
ernate Modes. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Re

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

2018-03-02 Thread Hans de Goede
y.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.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/intel_cht_int33fe.c | 25 +

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

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

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

2018-03-02 Thread Hans de Goede
Hi All, Here is version 6 of Heikki's and my USB Type-C device-connection, mux and switch support series. Versions 2 - 5 bring various small code and style fixes based on review (no major changes). Version 6 is rebased on top of the latest usb-next and brings one small but important code fix in

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

2018-03-02 Thread Hans de Goede
Electronics On 2018년 03월 01일 00:07, Hans de Goede wrote: The AXP288 BC1.2 charger detection / extcon code may seem like a strange place to add code to control the USB role-switch on devices with an AXP288, but there are 2 reasons to do this inside the axp288 extcon code: 1) On many devices the USB role

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

2018-03-01 Thread Hans de Goede
Hi, On 01-03-18 10:32, Andy Shevchenko wrote: On Thu, Mar 1, 2018 at 9:28 AM, Heikki Krogerus wrote: 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

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

2018-02-28 Thread Hans de Goede
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 96099a245c69..5917e3095e2a 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1825,6 +1825,7

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

2018-02-28 Thread Hans de Goede
Hi, On 26-02-18 20:34, Randy Dunlap wrote: On 02/26/2018 10:39 AM, Hans de Goede wrote: diff --git a/include/linux/connection.h b/include/linux/connection.h new file mode 100644 index ..0b4430eae53a --- /dev/null +++ b/include/linux/connection.h @@ -0,0 +1,33 @@ +// SPDX-License

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

2018-02-28 Thread Hans de Goede
-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v5: -Add missing documentation for @list struct devcon member Changes in v4: -Add Andy's Reviewed-by Changes in v3: -Var

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

2018-02-28 Thread Hans de Goede
Hi All, Here is version 5 of Heikki's and my USB Type-C device-connection, mux and switch support series. Versions 2 - 5 bring various small code and style fixes based on review (no major changes). Here is the original cover-letter of v1: Some devices with an USB Type-C connector have a bunch

[PATCH v5 02/12] usb: typec: Start using ERR_PTR

2018-02-28 Thread Hans de Goede
taking over control of the muxes for example is because handling them in the port drivers would be just boilerplate. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Guenter Roeck <li...@roeck-us.net> Revi

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

2018-02-28 Thread Hans de Goede
ernate Modes. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- Changes in v4: -Add Andy's Re

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

2018-02-28 Thread Hans de Goede
ck-us.net> Reviewed-by: Andy Shevchenko <andy.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.com> --- 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 |

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

2018-02-28 Thread Hans de Goede
y.shevche...@gmail.com> Signed-off-by: Hans de Goede <hdego...@redhat.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/intel_cht_int33fe.c | 25 +

  1   2   3   4   5   6   7   8   9   10   >