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

2018-02-16 Thread Heikki Krogerus
On Fri, Feb 16, 2018 at 04:07:59PM +0200, Andy Shevchenko wrote: > On Fri, Feb 16, 2018 at 12:47 PM, Hans de Goede wrote: > > > USB role switch is a device that can be used to choose the > > data role for USB connector. With dual-role capable USB > > controllers, the controller itself will be the

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

2018-02-16 Thread Heikki Krogerus
le (always) gets initialized as host > > Signed-off-by: Hans de Goede After addressing Andy's comments: Reviewed-by: Heikki Krogerus Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2018-02-16 Thread Heikki Krogerus
: Hans de Goede Reviewed-by: Heikki Krogerus Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2018-02-16 Thread Heikki Krogerus
On Fri, Feb 16, 2018 at 11:47:49AM +0100, Hans de Goede wrote: > Add a driver for the Pericom PI3USB30532 Type-C cross switch / > mux chip found on some devices with a Type-C port. > > Signed-off-by: Hans de Goede Reviewed-by: Heikki Krogerus Thanks, -- heikki -- To unsubscri

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

2018-02-16 Thread Heikki Krogerus
On Fri, Feb 16, 2018 at 11:47:48AM +0100, Hans de Goede wrote: > diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile > index 060643a1b5c8..7d1b8c82b208 100644 > --- a/drivers/usb/Makefile > +++ b/drivers/usb/Makefile > @@ -65,3 +65,5 @@ obj-$(CONFIG_USB_COMMON)+= common/ > obj-$(CONFIG_US

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

2018-02-16 Thread Heikki Krogerus
ci_ext_cap_init() a call to it should also > be added to other bus probe paths. > > Signed-off-by: Hans de Goede > Acked-by: Mathias Nyman Reviewed-by: Heikki Krogerus Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body

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

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

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

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

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

2018-02-16 Thread Heikki Krogerus
e Reviewed-by: Heikki Krogerus Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

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

Re: [PATCH v1 13/14] USB: typec: Re-use DEFINE_SHOW_ATTRIBUTE() macro

2018-02-15 Thread Heikki Krogerus
On Wed, Feb 14, 2018 at 06:08:29PM +0200, Andy Shevchenko wrote: > ...instead of open coding file operations followed by custom ->open() > callbacks per each attribute. > > Cc: Heikki Krogerus > Cc: Guenter Roeck > Signed-off-by: Andy Shevchenko Reviewed-by: Heikki Kroger

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

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

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

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

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

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

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

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

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

2018-01-30 Thread Heikki Krogerus
added. Sending of > Not_Supported is added is added to handle messages > received but not yet handled. > > Signed-off-by: Adam Thomson FWIW: Acked-by: Heikki Krogerus -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to m

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

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

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

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

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

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

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

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

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

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

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

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

Re: USB-C Devices only show up if connected at boot

2018-01-25 Thread Heikki Krogerus
+Mika On Tue, Jan 23, 2018 at 05:43:27PM +, Mike Lothian wrote: > On Tue, 23 Jan 2018 at 17:30 Greg KH wrote: > > > > On Tue, Jan 23, 2018 at 05:12:03PM +, Mike Lothian wrote: > > > Hi > > > > > > I raised https://bugzilla.kernel.org/show_bug.cgi?id=198557 but was > > > informed by Greg b

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

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

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

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

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

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

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

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

Re: [PATCH] usb: pd: fix the offset for SVID specific commands

2017-12-18 Thread Heikki Krogerus
On Mon, Dec 18, 2017 at 03:08:35PM +0100, Greg Kroah-Hartman wrote: > On Mon, Dec 18, 2017 at 05:03:03PM +0300, Heikki Krogerus wrote: > > The SVID specific commands in the Command field of the > > Structured VDM Header start from 16, not 10. Changing the > > value used in V

[PATCH] usb: pd: fix the offset for SVID specific commands

2017-12-18 Thread Heikki Krogerus
The SVID specific commands in the Command field of the Structured VDM Header start from 16, not 10. Changing the value used in VDO_CMD_VENDOR() macro from 10 to 0x10. Signed-off-by: Heikki Krogerus --- include/linux/usb/pd_vdo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: Dual-role behavior with USB-C?

2017-12-13 Thread Heikki Krogerus
Hi guys, On Wed, Dec 13, 2017 at 10:43:50AM +0800, Peter Chen wrote: > On Wed, Dec 13, 2017 at 01:17:23AM +, Takashi Matsuzawa wrote: > > Hello. > > > > >If you have a Type-C connector on your board, then you also should > > >have a USB Type-C PHY that takes care of CC logic. The host-to-devi

Re: Dual-role behavior with USB-C?

2017-12-12 Thread Heikki Krogerus
Hi Takashi, On Tue, Dec 12, 2017 at 07:01:34AM +, Takashi Matsuzawa wrote: > Hello. > Thank you very much for your comment. > > > Since USB OTG FSM has not been accepted by industry during last ten years, > > we decide > > to give up maintaining OTG FSM at Linux kernel. For role switch use c

[PATCH] usb: typec: wcove: fix the sink capabilities

2017-12-11 Thread Heikki Krogerus
attery and Variable Supply objects, as there is no need for them. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/typec_wcove.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c index a8d479eb221a..2e990e0d917d 10

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-12-08 Thread Heikki Krogerus
On Thu, Dec 07, 2017 at 05:40:40PM +0100, Hans de Goede wrote: > Hi, > > On 07-12-17 16:00, Heikki Krogerus wrote: > > Hi Hans, > > > > On Tue, Dec 05, 2017 at 03:56:05PM +0100, Hans de Goede wrote: > > > Hi, > > > > > >

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-12-07 Thread Heikki Krogerus
Hi Hans, On Tue, Dec 05, 2017 at 03:56:05PM +0100, Hans de Goede wrote: > Hi, > > On 01-12-17 09:38, Heikki Krogerus wrote: > > Hi, > > > > Thanks for taking a look at this.. > > > > On Sun, Nov 26, 2017 at 12:23:31PM +0100, Hans de Goede wrote: > &g

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

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

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-12-01 Thread Heikki Krogerus
Hi, Thanks for taking a look at this.. On Sun, Nov 26, 2017 at 12:23:31PM +0100, Hans de Goede wrote: > Hi Heiko, > > On 28-09-17 13:35, Heikki Krogerus wrote: > > Hi guys, > > > > The bus allows SVID specific communication with the partners to be > > han

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

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

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

2017-11-27 Thread Heikki Krogerus
Hi Adam, On Fri, Nov 24, 2017 at 02:05:27PM +, Adam Thomson wrote: > On 24 November 2017 12:19, Heikki Krogerus wrote: > > Is it OK to everybody that the type of the psy is changed like that? > > Hans?! > > > > We do have drivers that already change the type, fo

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

2017-11-27 Thread Heikki Krogerus
On Sat, Nov 25, 2017 at 03:03:02PM +0100, Hans de Goede wrote: > > Is it OK to everybody that the type of the psy is changed like that? > > Hans?! > > > > We do have drivers that already change the type, for example > > drivers/power/supply/isp1704_charger.c, but what does the user space > > expec

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

2017-11-24 Thread Heikki Krogerus
Hi, On Tue, Nov 14, 2017 at 11:44:47AM +, Adam Thomson wrote: > diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c > index 78983e1..7c26c3d 100644 > --- a/drivers/usb/typec/tcpm.c > +++ b/drivers/usb/typec/tcpm.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#incl

Re: [PATCH v3] typec: tcpm: fusb302: Resolve out of order messaging events

2017-11-24 Thread Heikki Krogerus
gt; code to check whether a GoodCRC message was received or not. Based > on this check it will either report that the previous transmission > has completed or it will pass the msg data to TCPM for futher > processing. This way the incorrect ordering of the events no longer > matters. > &g

Re: [PATCH v2] typec: fusb302: Use dev_err during probe

2017-11-24 Thread Heikki Krogerus
On Fri, Nov 24, 2017 at 12:03:16AM +0100, Mats Karrman wrote: > If probe fails, fusb302_debugfs_exit is called making it impossible > to view any logs so use normal dev_err for any error messages during > probe. > > Signed-off-by: Mats Karrman Acked-by: Heikki Krogerus Than

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

2017-11-21 Thread Heikki Krogerus
On Tue, Nov 21, 2017 at 01:51:41PM +, Adam Thomson wrote: > > These don't apply on top of Badhri's series: > > http://www.spinics.net/lists/kernel/msg2649921.html > > Hi Heikki, > > When I submitted these I was aware of Badhri's patch set but at the time they > hadn't been approved or pulled,

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

2017-11-21 Thread Heikki Krogerus
Hi Adam, On Tue, Nov 14, 2017 at 11:44:41AM +, Adam Thomson wrote: > This patch set adds sink side support for the PPS feature introduced in the > USB PD 3.0 specification. > > The source PPS supply is represented using the Power Supply framework to > provide > access and control APIs for de

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Heikki Krogerus
Hi Guenter, On Tue, Nov 14, 2017 at 06:48:21AM -0800, Guenter Roeck wrote: > On 11/14/2017 05:17 AM, Greg KH wrote: > > On Mon, Nov 13, 2017 at 09:29:36PM -0800, Linus Torvalds wrote: > > > On Mon, Nov 13, 2017 at 8:19 AM, Greg KH > > > wrote: > > > > > > > > Other major thing is the typec code

Re: [GIT PULL] USB/PHY driver changes for 4.15-rc1

2017-11-14 Thread Heikki Krogerus
rt Controller Manager, which of course is not the case any more. Would the attached patch be sufficient? Thanks, -- heikki >From 3bbd624a67df91c23db996db5f2f931fde77fcc1 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Tue, 14 Nov 2017 14:45:27 +0300 Subject: [PATCH] usb: add user selectable option for the wh

Re: [PATCH 2/2 v5] typec: tcpm: Only request matching pdos

2017-11-07 Thread Heikki Krogerus
;m fine with this, but in case you'll prepare one more version, I'll put a few really minor nits below. I would prefer though that Guenter gave his ACK to any patches touching tcpm.c or tcpci.c. But FWIW: Acked-by: Heikki Krogerus Thanks, > drivers/usb/typec/tcpm.c | 147 >

Re: [PATCH 1/2 v5] typec: tcpm: Validate source and sink caps

2017-11-07 Thread Heikki Krogerus
f partner > device would only log them. > > Signed-off-by: Badhri Jagan Sridharan It would have been nice to have enum for the return values used in tcpm_cap_err() IMHO, but never mind. Is Guenter OK with these? FWIW: Acked-by: Heikki Krogerus Thanks, > --- > hange

Re: [PATCH 1/6] USB: add SPDX identifiers to all remaining Makefiles

2017-11-07 Thread Heikki Krogerus
Cc: Peter Korsgaard > Cc: Thomas Winischhofer > Cc: Johan Hovold > Cc: Heikki Krogerus > Signed-off-by: Greg Kroah-Hartman Acked-by: Heikki Krogerus -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to maj

Re: [PATCH 6/6] USB: typec: Remove remaining redundant license text

2017-11-07 Thread Heikki Krogerus
e on a quest to remove the 700+ different ways that files in > the kernel describe the GPL license text. And there's unneeded stuff > like the address (sometimes incorrect) for the FSF which is never > needed. > > No copyright headers or other non-license-description text wa

Re: [PATCH 5/6] USB: typec: add SPDX identifiers to some files

2017-11-07 Thread Heikki Krogerus
se text in the file > itself. > > The SPDX identifier is a legally binding shorthand, which can be used > instead of the full boiler plate text. > > Cc: Heikki Krogerus > Cc: Guenter Roeck > Cc: Hans de Goede > Cc: Yueyao Zhu > Cc: Rui Miguel Silva > Cc: Thomas Gle

Re: [PATCH 05/24] USB: typec: Remove redundant license text

2017-11-06 Thread Heikki Krogerus
e on a quest to remove the 700+ different ways that files in > the kernel describe the GPL license text. And there's unneeded stuff > like the address (sometimes incorrect) for the FSF which is never > needed. > > No copyright headers or other non-license-description text wa

Re: [PATCH 1/2 v3] typec: tcpm: Validate source and sink caps

2017-11-02 Thread Heikki Krogerus
+Dan and Guenter, I don't have any problems with this, but since I had those few comments for the 2/2 of this series, few nitpics below.. On Wed, Oct 18, 2017 at 01:22:47PM -0700, Badhri Jagan Sridharan wrote: > The source and sink caps should follow the following rules. > This patch validates wh

Re: [PATCH 2/2] typec: tcpm: Only request matching pdos

2017-11-02 Thread Heikki Krogerus
Hi, +Dan and Guenter I'm sorry for the late reply. These slipped under my radar. I do have a one more proposal below, and a few nits.. On Wed, Oct 18, 2017 at 01:22:48PM -0700, Badhri Jagan Sridharan wrote: > At present, TCPM code assumes that local device supports > variable/batt pdos and alway

Re: State of USB-C PD on the linux kernel

2017-11-02 Thread Heikki Krogerus
On Wed, Nov 01, 2017 at 11:38:13PM +0100, L. Rose wrote: > Hi, thanks for replying! > > > Could you send acpidump to me? > Sorry, but can you point me a URL where to get acpidump? I'm running > arch, but any x86_64-binary or source code should be fine. Couldn't find > it anywhere on the net. It i

Re: State of USB-C PD on the linux kernel

2017-11-01 Thread Heikki Krogerus
On Tue, Oct 31, 2017 at 04:19:58PM +0100, L. Rose wrote: > Hi, thanks for your reply! > > > On 31.10.2017 10:17, Heikki Krogerus wrote: > > Hi, > > > > It is likely that your system handles USB PD in firmware, and the OS > > has no say in that. Which board i

Re: State of USB-C PD on the linux kernel

2017-10-31 Thread Heikki Krogerus
Hi, On Mon, Oct 30, 2017 at 05:48:43PM +0100, L. Rose wrote: > Hello everyone, > > I see this is primarily a development mailing list, but I didn't find a > corresponding users mailing list. If there's a better place to ask this > question, just let me know. > > What is the state of USB-C Power

Re: [PATCH] usb: typec: tps6598x: mark expected switch fall-through

2017-10-31 Thread Heikki Krogerus
On Fri, Oct 27, 2017 at 04:01:13PM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Signed-off-by: Gustavo A. R. Silva Acked-by: Heikki Krogerus Thanks, -- heikki -- To unsu

Re: [PATCH] usb: typec: wcove: fix uninitialized usbc_irq1 and usbc_irq2

2017-10-11 Thread Heikki Krogerus
Fixes: 3c4fb9f16921 ("usb: typec: wcove: start using tcpm for USB PD support") > Signed-off-by: Colin Ian King Acked-by: Heikki Krogerus Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vge

[PATCH] usb: typec: tcpm: reset the port on removal

2017-10-10 Thread Heikki Krogerus
If a port is unregistered, all the devices attached to it must be unregistered as well. This will also make sure VBUS and VCONN are disabled. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb

Re: [PATCH 1/2 v2] typec: tcpm: Validate source and sink caps

2017-10-10 Thread Heikki Krogerus
Hi, On Mon, Oct 09, 2017 at 03:13:43PM -0700, Badhri Jagan Sridharan wrote: > The source and sink caps should follow the following rules. > This patch validates whether the src_caps/snk_caps adheres > to it. > > 6.4.1 Capabilities Message > A Capabilities message (Source Capabilities message or S

Re: [RFC PATCH 2/2] usb: typec: dummy alternate mode driver

2017-09-28 Thread Heikki Krogerus
On Thu, Sep 28, 2017 at 03:22:35PM +0300, Felipe Balbi wrote: > Heikki Krogerus writes: > > +MODULE_DESCRIPTION("DisplayPort Alternate Mode"); > > huh? Copy paste :-) Cheers, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb"

[RFC PATCH 2/2] usb: typec: dummy alternate mode driver

2017-09-28 Thread Heikki Krogerus
Example alternate mode driver. Meant only to give an idea how a real alternate mode driver *could* look like! Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 2 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/altmodes/Kconfig | 9 +++ drivers/usb

[RFC PATCH 1/2] usb: typec: Simple bus for alternate modes

2017-09-28 Thread Heikki Krogerus
Bus for binding SVID specific drivers to the altnernate mode devices. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Makefile | 2 + drivers/usb/typec/altmode.c| 249 + drivers/usb/typec/altmode.h| 46 ++ drivers

[RFC PATCH 0/2] usb: typec: alternate mode bus

2017-09-28 Thread Heikki Krogerus
by using the remote endpoint concept [1][2] on ACPI and DT platforms, but I have no solution for the "platform data" case where we have neither DT nor ACPI to describe the connections for us. [1] Documentation/devicetree/bindings/graph.txt [2] Documentation/acpi/dsd/graph.txt Heikki K

Re: [PATCH 02/12] usb: typec: add basic typec properties

2017-09-26 Thread Heikki Krogerus
On Tue, Sep 26, 2017 at 08:45:17AM +0800, Li Jun wrote: > port-type is required for any typec port; default-role is only required > for drp; power source capable needs src-pdos; power sink capable needs > snk-pdos, max-snk-mv, max-snk-ma, op-snk-mw. > > Signed-off-by: Li Jun > --- > Documentatio

Re: [PATCH 01/12] usb: typec: add API to get port type and preferred role

2017-09-26 Thread Heikki Krogerus
Hi, On Tue, Sep 26, 2017 at 08:45:16AM +0800, Li Jun wrote: > This patch add 2 APIs to get port type and preferred role from firmware > description. > > Signed-off-by: Li Jun > --- > drivers/usb/typec/typec.c | 45 + > include/linux/usb/typec.h | 2 +

Re: [PATCH v3 05/14] mux: core: Add usb.h header with MUX_USB_* and and MUX_TYPEC_* state constants

2017-09-26 Thread Heikki Krogerus
Hi Hans, Sorry about the late response. On Fri, Sep 22, 2017 at 08:37:54PM +0200, Hans de Goede wrote: > Add MUX_USB_* and MUX_TYPEC_* state constant defines, which can be used by > USB device/host, resp. Type-C polarity/role/altmode mux drivers and > consumers to ensure that they agree on the me

[PATCH] usb: typec: driver for TI TPS6598x USB Power Delivery controllers

2017-09-25 Thread Heikki Krogerus
-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig| 11 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/tps6598x.c | 475 +++ 3 files changed, 487 insertions(+) create mode 100644 drivers/usb/typec/tps6598x.c diff --git a/drivers/usb/typec

[PATCH] usb: typec: wcove: start using tcpm for USB PD support

2017-09-20 Thread Heikki Krogerus
This patch makes the driver work with USB Type-C Port Manager (tcpm.c) to provide USB PD functionality. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 4 +- drivers/usb/typec/typec_wcove.c | 594 ++-- 2 files changed, 447 insertions

Re: [PATCH v3 1/5] staging: typec: tcpm: Drop commented out code

2017-09-12 Thread Heikki Krogerus
taging/typec/tcpm.c | 37 + > 1 file changed, 1 insertion(+), 36 deletions(-) Nice! Just to be sure: The idea is to leave tcpci.c in staging, right? In any case, FWIW, for all of these: Acked-by: Heikki Krogerus -- heikki -- To unsubscribe from this list: send the line "unsubsc

Re: [PATCH 04/11] usb: xhci: Add Intel cherrytrail extended cap / otg phy mux handling

2017-09-04 Thread Heikki Krogerus
Hi, On Fri, Sep 01, 2017 at 11:48:38PM +0200, Hans de Goede wrote: > The Intel cherrytrail xhci controller has an extended cap mmio-range > which contains registers to control the muxing to the xhci (host mode) > or the dwc3 (device mode) and vbus-detection for the otg usb-phy. > > Having a mux d

Re: [PATCH 15/15] usb: make device_type const

2017-08-22 Thread Heikki Krogerus
On Sat, Aug 19, 2017 at 01:52:26PM +0530, Bhumika Goyal wrote: > Make this const as it is only stored in the type field of a device > structure, which is const. > Done using Coccinelle. > > Signed-off-by: Bhumika Goyal Acked-by: Heikki Krogerus > --- > drivers/usb/comm

Re: Sometimes supports_usb_power_delivery reports incorrect value.

2017-08-16 Thread Heikki Krogerus
On Tue, Aug 15, 2017 at 04:26:07PM -0700, Badhri Jagan Sridharan wrote: > Submitted couple of patches for the missing pieces in TCPM. > Those patches along with "usb: typec: update partner power delivery > support with opmode" > seems to address the issue of reporting the right value for > supports

Re: Sometimes supports_usb_power_delivery reports incorrect value.

2017-08-15 Thread Heikki Krogerus
Hi, On Mon, Aug 14, 2017 at 11:57:15AM -0700, Badhri Jagan Sridharan wrote: > Hi Heikki, > > While testing with different type-c phones available in the market, > With some phones, I noticed that supports_usb_power_delivery > reports "no" eventhough an explicit pd contract has been > established.

Re: [PATCH] usb: typec: include linux/device.h in ucsi.h

2017-07-03 Thread Heikki Krogerus
UCSI interface") > Signed-off-by: Arnd Bergmann Acked-by: Heikki Krogerus > --- > drivers/usb/typec/ucsi/ucsi.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h > index 6b0d2f0918c6..8a88f45822e3 1

Re: [PATCH v4 1/2] usb: typec: Add support for UCSI interface

2017-06-21 Thread Heikki Krogerus
On Fri, Jun 16, 2017 at 03:14:37PM -0700, Guenter Roeck wrote: > On Fri, Jun 16, 2017 at 11:21:24AM +0300, Heikki Krogerus wrote: > > UCSI - USB Type-C Connector System Software Interface - is a > > specification that defines set of registers and data > > structures for contr

[PATCH v4 2/2] usb: typec: ucsi: Add ACPI driver

2017-06-16 Thread Heikki Krogerus
Driver for ACPI UCSI interface method. This driver replaces the previous UCSI driver drivers/usb/misc/ucsi.c. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/misc/Kconfig | 26 -- drivers/usb/misc/Makefile | 1 - drivers/usb/misc/ucsi.c

[PATCH v4 0/2] usb: typec: New driver for UCSI

2017-06-16 Thread Heikki Krogerus
nds by using _MS ending with the definition (UCSI_TIMEOUT_MS and UCSI_SWAP_TIMEOUT_MS) as suggested by Guenter. - Including also in ucsi.h as suggested by Guenter. - In ucsi_acpi.c, explicitly pointing out in the comment that we can not use devm_ioremap_resource() as suggested by Guenter. H

[PATCH v4 1/2] usb: typec: Add support for UCSI interface

2017-06-16 Thread Heikki Krogerus
f the optional UCSI features (alternate modes, power source capabilities, and cable capabilities). Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 2 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/ucsi/Kconfig | 23 ++ drivers/usb/typec/ucsi/Makefile | 7 + dr

Re: [PATCH v3 1/2] usb: typec: Add support for UCSI interface

2017-06-16 Thread Heikki Krogerus
On Thu, Jun 15, 2017 at 08:08:19AM -0700, Guenter Roeck wrote: > On Mon, Jun 12, 2017 at 05:40:08PM +0300, Heikki Krogerus wrote: > > UCSI - USB Type-C Connector System Software Interface - is a > > specification that defines set of registers and data > > structures for contr

Re: [PATCH v3 1/2] usb: typec: Add support for UCSI interface

2017-06-14 Thread Heikki Krogerus
On Wed, Jun 14, 2017 at 12:50:38PM +0200, Greg Kroah-Hartman wrote: > On Wed, Jun 14, 2017 at 09:45:46AM +0300, Heikki Krogerus wrote: > > Hi Guenter, > > > > Gentle ping. > > After less than 2 days? Relax please... OK, Sorry for the noise. -- heikki -- To unsub

Re: [PATCH v3 1/2] usb: typec: Add support for UCSI interface

2017-06-13 Thread Heikki Krogerus
Hi Guenter, Gentle ping. I'm sorry to bother you with this, I know you are busy. On Mon, Jun 12, 2017 at 05:40:08PM +0300, Heikki Krogerus wrote: > UCSI - USB Type-C Connector System Software Interface - is a > specification that defines set of registers and data > structures f

[PATCH v3 0/2] New driver for UCSI (USB Type-C)

2017-06-12 Thread Heikki Krogerus
the timeouts are in milliseconds by using _MS ending with the definition (UCSI_TIMEOUT_MS and UCSI_SWAP_TIMEOUT_MS) as suggested by Guenter. - Including also in ucsi.h as suggested by Guenter. - In ucsi_acpi.c, explicitly pointing out in the comment that we can not use devm_ioremap_resource(

[PATCH v3 2/2] usb: typec: ucsi: Add ACPI driver

2017-06-12 Thread Heikki Krogerus
Driver for ACPI UCSI interface method. This driver replaces the previous UCSI driver drivers/usb/misc/ucsi.c. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/misc/Kconfig | 26 -- drivers/usb/misc/Makefile | 1 - drivers/usb/misc/ucsi.c

[PATCH v3 1/2] usb: typec: Add support for UCSI interface

2017-06-12 Thread Heikki Krogerus
f the optional UCSI features (alternate modes, power source capabilities, and cable capabilities). Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 2 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/ucsi/Kconfig | 23 ++ drivers/usb/typec/ucsi/Makefile | 7 + dr

Re: [PATCH v2 1/2] usb: typec: Add support for UCSI interface

2017-06-12 Thread Heikki Krogerus
Hi Guenter, On Mon, Jun 12, 2017 at 02:55:49PM +0300, Heikki Krogerus wrote: > > > +/* Command Status and Connector Change Indication (CCI) data structure */ > > > +struct ucsi_cci { > > > + u8:1; /* reserved */ > > > + u8 connector_change:7; > > >

Re: [PATCH v2 1/2] usb: typec: Add support for UCSI interface

2017-06-12 Thread Heikki Krogerus
Hi, On Fri, Jun 09, 2017 at 07:52:56PM -0700, Guenter Roeck wrote: > > diff --git a/drivers/usb/typec/ucsi/debug.h b/drivers/usb/typec/ucsi/debug.h > > new file mode 100644 > > index ..87d0cd20597a > > --- /dev/null > > +++ b/drivers/usb/typec/ucsi/debug.h > > @@ -0,0 +1,64 @@ > > +#if

Re: [PATCH v2 0/3] New driver for UCSI (USB Type-C)

2017-06-12 Thread Heikki Krogerus
On Fri, Jun 09, 2017 at 06:30:30AM -0700, Guenter Roeck wrote: > On 06/09/2017 04:03 AM, Heikki Krogerus wrote: > > Hi Guenter, > > > > On Mon, Jun 05, 2017 at 05:30:22PM +0300, Heikki Krogerus wrote: > > > Hi, > > > > > > This moves the current

Re: [PATCH v2 0/3] New driver for UCSI (USB Type-C)

2017-06-09 Thread Heikki Krogerus
Hi Guenter, On Mon, Jun 05, 2017 at 05:30:22PM +0300, Heikki Krogerus wrote: > Hi, > > This moves the current ucsi driver from drivers/usb/misc/ucsi.c to the > new USB Type-C class (drivers/usb/typec/). That allows us to finally do > role swapping. > > The driver is now sp

Re: [PATCH v6 5/6] mfd: intel_soc_pmic_bxtwc: Use chained IRQs for second level IRQ chips

2017-06-06 Thread Heikki Krogerus
) > > In case of Whiskey Cove Type-C driver, Since USBC IRQ is moved under > charger level2 IRQ chip. We should use charger IRQ chip(irq_chip_data_chgr) > to get the USBC virtual IRQ number. > > Signed-off-by: Kuppuswamy Sathyanarayanan > > Acked-for-MFD-by: Lee Jones

[PATCH v2 2/2] usb: typec: ucsi: Add ACPI driver

2017-06-05 Thread Heikki Krogerus
Driver for ACPI UCSI interface method. This driver replaces the previous UCSI driver drivers/usb/misc/ucsi.c. Signed-off-by: Heikki Krogerus --- drivers/usb/misc/Kconfig | 26 -- drivers/usb/misc/Makefile | 1 - drivers/usb/misc/ucsi.c| 478

[PATCH v2 0/3] New driver for UCSI (USB Type-C)

2017-06-05 Thread Heikki Krogerus
in ucsi.h as suggested by Guenter. - In ucsi_acpi.c, explicitly pointing out in the comment that we can not use devm_ioremap_resource() as suggested by Guenter. Heikki Krogerus (2): usb: typec: Add support for UCSI interface usb: typec: ucsi: Add ACPI driver drivers/usb/misc/Kconfig

[PATCH v2 1/2] usb: typec: Add support for UCSI interface

2017-06-05 Thread Heikki Krogerus
f the optional UCSI features (alternate modes, power source capabilities, and cable capabilities). Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 2 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/ucsi/Kconfig | 22 ++ drivers/usb/typec/ucsi/Makefile | 7 + dr

Re: [PATCH v6] usb: typec: Add a sysfs node to manage port type

2017-06-05 Thread Heikki Krogerus
t setting the desired port type. Low level drivers can > however reject the request if the specific port type is not supported. > > Signed-off-by: Badhri Jagan Sridharan > Reviewed-by: Guenter Roeck It looks good to me. In case Greg has not yet picked this: Acked-by: Heik

Re: [PATCH 3/3] usb: typec: ucsi: Add ACPI driver

2017-05-29 Thread Heikki Krogerus
On Fri, May 26, 2017 at 06:30:38AM -0700, Guenter Roeck wrote: > On 05/26/2017 04:08 AM, Heikki Krogerus wrote: > > Hi, > > > > On Thu, May 25, 2017 at 06:23:30AM -0700, Guenter Roeck wrote: > > > > + /* > > > > +* NOTE: The memor

Re: [PATCH 2/3] usb: typec: Add support for UCSI interface

2017-05-29 Thread Heikki Krogerus
On Fri, May 26, 2017 at 06:26:01AM -0700, Guenter Roeck wrote: > > > What happens if trace is not enabled ? If I recall discussions around > > > CLANG > > > correctly, it complains about unused static inline functions. > > > > Nothing happens if trace is not enable. Everything continues to > > co

Re: [RFC PATCH] staging: typec: Intel WhiskeyCove PMIC USB Type-C PHY driver

2017-05-26 Thread Heikki Krogerus
Hi, My two cents. On Thu, May 25, 2017 at 10:12:27AM -0700, Guenter Roeck wrote: > > What is keeping this code in staging at the moment? Who isn't agreeing > > on the existing apis we have there? > > > > I don't think the APIs are at issue; I would not expect any substantial > (if any) changes

Re: [PATCH 3/3] usb: typec: ucsi: Add ACPI driver

2017-05-26 Thread Heikki Krogerus
Hi, On Thu, May 25, 2017 at 06:23:30AM -0700, Guenter Roeck wrote: > > + /* > > +* NOTE: The memory region for the data structures is used also in an > > +* operation region, which means ACPI has already reserved it. Therefore > > +* it can not be requested here. > > +*/ > > +

Re: [PATCH 2/3] usb: typec: Add support for UCSI interface

2017-05-26 Thread Heikki Krogerus
Hi, On Thu, May 25, 2017 at 06:20:16AM -0700, Guenter Roeck wrote: > On 05/16/2017 05:26 AM, Heikki Krogerus wrote: > > UCSI - USB Type-C Connector System Software Interface - is a > > specification that defines set of registers and data > > structures for controlling the U

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