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

2017-05-25 Thread Heikki Krogerus
On Wed, May 24, 2017 at 08:22:35AM -0700, Guenter Roeck wrote: > On Wed, May 24, 2017 at 05:08:10PM +0200, Greg Kroah-Hartman wrote: > > On Wed, May 24, 2017 at 03:54:23PM +0300, Heikki Krogerus wrote: > > > Driver for USB Type-C PHY on Intel WhiskeyCove PMIC that > >

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

2017-05-25 Thread Heikki Krogerus
On Wed, May 24, 2017 at 05:08:10PM +0200, Greg Kroah-Hartman wrote: > On Wed, May 24, 2017 at 03:54:23PM +0300, Heikki Krogerus wrote: > > Driver for USB Type-C PHY on Intel WhiskeyCove PMIC that > > works with Type-C Port Controller Manager to provide USB > > Power De

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

2017-05-24 Thread Heikki Krogerus
On Wed, May 24, 2017 at 06:11:20AM -0700, Guenter Roeck wrote: > Hello Heikki, > > On 05/24/2017 05:54 AM, Heikki Krogerus wrote: > > Driver for USB Type-C PHY on Intel WhiskeyCove PMIC that > > works with Type-C Port Controller Manager to provide USB > > Po

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

2017-05-24 Thread Heikki Krogerus
Driver for USB Type-C PHY on Intel WhiskeyCove PMIC that works with Type-C Port Controller Manager to provide USB Power Delivery and USB Type-C functionalities Signed-off-by: Heikki Krogerus --- drivers/staging/typec/Kconfig | 11 + drivers/staging/typec/Makefile | 1 + drivers

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

2017-05-23 Thread Heikki Krogerus
On Tue, May 23, 2017 at 06:16:28AM -0700, Guenter Roeck wrote: > On 05/23/2017 03:46 AM, Heikki Krogerus wrote: > > Hi, > > > > On Mon, May 22, 2017 at 01:05:42PM -0700, Badhri Jagan Sridharan wrote: > > > User space applications in some cases have the need to enfo

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

2017-05-23 Thread Heikki Krogerus
finished. > + > + Valid values: > + - DRP > + - DFP > + - UFP > > What: /sys/class/typec//supported_accessory_modes > Date:April 2017 > Contact: Heikki Krogerus > diff --git a/drivers/usb/typec/ty

Re: [PATCH] usb: typec: Defer checking of valid power role swap to low level drivers

2017-05-19 Thread Heikki Krogerus
On Thu, May 18, 2017 at 02:08:53PM -0700, Badhri Jagan Sridharan wrote: > On Thu, May 18, 2017 at 9:51 AM, Guenter Roeck wrote: > > On Thu, May 18, 2017 at 11:13:51AM +0200, Oliver Neukum wrote: > >> Am Mittwoch, den 17.05.2017, 02:36 -0700 schrieb Guenter Roeck: > >> > On 05/17/2017 12:34 AM, Oli

Re: [PATCH] usb: typec: Defer checking of valid power role swap to low level drivers

2017-05-17 Thread Heikki Krogerus
On Wed, May 17, 2017 at 06:02:47AM -0700, Guenter Roeck wrote: > On 05/17/2017 05:38 AM, Heikki Krogerus wrote: > > Hi guys, > > > > On Wed, May 17, 2017 at 02:36:44AM -0700, Guenter Roeck wrote: > > > On 05/17/2017 12:34 AM, Oliver Neukum wrote: > > > >

Re: [PATCH] doc-rst: fixed kernel-doc directives in usb/typec.rst

2017-05-17 Thread Heikki Krogerus
On Sat, May 13, 2017 at 03:49:17PM +0200, Markus Heiser wrote: > Even if this file is not yet included in any toctree, it is parsed by > Sphinx since it is named '.rst'. This patch fixes the following two > ERRORs from Sphinx build: > > Documentation/usb/typec.rst:116: ERROR: Error in "kernel-doc"

Re: [PATCH] usb: typec: Defer checking of valid power role swap to low level drivers

2017-05-17 Thread Heikki Krogerus
Hi guys, On Wed, May 17, 2017 at 02:36:44AM -0700, Guenter Roeck wrote: > On 05/17/2017 12:34 AM, Oliver Neukum wrote: > > Am Mittwoch, den 17.05.2017, 00:32 -0700 schrieb Badhri Jagan > > Sridharan: > > > > Hi, > > > > > "Two independent set of mechanisms are defined to allow a USB Type-C > > >

[PATCH 1/3] usb: typec: update partner power delivery support with opmode

2017-05-16 Thread Heikki Krogerus
If USB PD contract is established after creation of the partner, the power delivery support attribute of the partner needs to be updated separately. This can be done in typec_set_pwr_opmode() by checking if the port has already partner and updating the value if it does. Signed-off-by: Heikki

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

2017-05-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 --- drivers/usb/misc/Kconfig | 26 -- drivers/usb/misc/Makefile | 1 - drivers/usb/misc/ucsi.c| 478

[PATCH 0/3] usb: typec: Add proper UCSI support

2017-05-16 Thread Heikki Krogerus
for other interface methods later. Heikki Krogerus (3): usb: typec: update partner power delivery support with opmode usb: typec: Add support for UCSI interface usb: typec: ucsi: Add ACPI driver drivers/usb/misc/Kconfig| 26 -- drivers/usb/misc/Makefile | 1

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

2017-05-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 | 22 ++ drivers/usb/typec/ucsi/Makefile | 7 + dr

Re: [PATCH v5 2/3] phy: Move ULPI phy header out of drivers to include path

2017-05-11 Thread Heikki Krogerus
On Thu, May 11, 2017 at 12:17:41PM +0530, Vivek Gautam wrote: > Although ULPI phy is currently being used by tusb1210, > there can be other consumers too in future. So move this > to the includes path for phy. > > Signed-off-by: Vivek Gautam > Cc: Stephen Boyd > Cc:

Re: [PATCH] usb: misc: legousbtower: Fix memory leak

2017-05-05 Thread Heikki Krogerus
;Fixes" tag: Fixes: 942a48730faf ("usb: misc: legousbtower: Fix buffers on stack") Please check Documentation/process/submitting-patches.rst for more information. > Signed-off-by: Heikki Krogerus You are signing the patch for me which you should not be doing in this case. More

Re: [PATCH v3] usb: misc: legousbtower: Fix buffers on stack

2017-05-04 Thread Heikki Krogerus
Hi Maksim, Sorry for commenting this so late but.. On Tue, Apr 25, 2017 at 10:49:21PM +0300, Maksim Salau wrote: > @@ -806,7 +814,7 @@ static int tower_probe (struct usb_interface *interface, > const struct usb_device > struct device *idev = &interface->dev; > struct usb_device *udev

Re: [PATCH v1] ACPI: Switch to use generic UUID API

2017-05-04 Thread Heikki Krogerus
Amir Goldstein > Cc: Jarkko Sakkinen > Cc: Jani Nikula > Cc: Ben Skeggs > Cc: Benjamin Tissoires > Cc: Joerg Roedel > Cc: Adrian Hunter > Cc: Yisen Zhuang > Cc: Bjorn Helgaas > Cc: Zhang Rui > Cc: Felipe Balbi > Cc: Mathias Nyman > Cc: Heikki Kroger

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

2017-04-28 Thread Heikki Krogerus
On Thu, Apr 27, 2017 at 11:10:55AM -0700, Guenter Roeck wrote: > On Thu, Apr 27, 2017 at 11:50:12AM +0530, Rajaram R wrote: > > On Tue, Apr 25, 2017 at 7:40 PM, Guenter Roeck wrote: > > > On 04/25/2017 01:26 AM, Rajaram R wrote: > > >> > > >> On Mon, Apr 24, 2017 at 11:20 PM, Badhri Jagan Sridhara

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

2017-04-28 Thread Heikki Krogerus
On Fri, Apr 28, 2017 at 11:25:34AM +0200, Greg KH wrote: > On Wed, Apr 26, 2017 at 01:08:02PM +0300, Heikki Krogerus wrote: > > Hi Mats, > > > > On Tue, Apr 25, 2017 at 11:49:47PM +0200, Mats Karrman wrote: > > > In some situations, e.g. when registering a

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

2017-04-26 Thread Heikki Krogerus
r_altmode() > et.al. to using const pointers. > > Signed-off-by: Mats Karrman > Reviewed-by: Guenter Roeck This is OK by me. FWIW: Acked-by: Heikki Krogerus FYI, in case you guys are interested, I'm collecting all the typec stuff to my github tree [1] "typec" branch

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

2017-04-25 Thread Heikki Krogerus
Hi Guenter, On Fri, Apr 21, 2017 at 03:15:52PM -0700, Guenter Roeck wrote: > +/* > + * Logging > + */ > + > +#ifdef CONFIG_DEBUG_FS > + > +static bool tcpm_log_full(struct tcpm_port *port) > +{ > + return port->logbuffer_tail == > + (port->logbuffer_head + 1) % LOG_BUFFER_ENTRIES;

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

2017-04-21 Thread Heikki Krogerus
Hi, On Thu, Apr 20, 2017 at 12:46:59PM -0700, Badhri Jagan Sridharan wrote: > Thanks for the responses :) > > So seems like we have a plan. > > In Type-C connector class the checks for TYPEC_PWR_MODE_PD > and pd_revision for both the port and the partner will be removed in > power_role_store and

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

2017-04-20 Thread Heikki Krogerus
On Wed, Apr 19, 2017 at 10:22:47AM -0700, Badhri Jagan Sridharan wrote: > On Wed, Apr 19, 2017 at 8:14 AM, Guenter Roeck wrote: > > On Wed, Apr 19, 2017 at 07:45:00AM -0700, Badhri Jagan Sridharan wrote: > >> On Wed, Apr 19, 2017 at 4:23 AM, Heikki Krogerus >

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

2017-04-20 Thread Heikki Krogerus
Hi, On Wed, Apr 19, 2017 at 07:45:00AM -0700, Badhri Jagan Sridharan wrote: > >> What is the expected behavior when the userspace changes the > >> preferred_role node when the port is in connected state ? > >> > >> 1. the state machine re-resolves the port roles right away based on > >> the new s

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

2017-04-19 Thread Heikki Krogerus
Hi, On Tue, Apr 18, 2017 at 11:52:33AM -0700, Badhri Jagan Sridharan wrote: > Hi Heikki, > > I have a question regarding the preferred_role node. > > +What: /sys/class/typec//preferred_role > +Date: March 2017 > +Contact: Heikki Kro

Re: usb: typec: Missing link for altmode active store

2017-04-18 Thread Heikki Krogerus
Hi Mats, On Sun, Apr 16, 2017 at 09:28:01PM +0200, Mats Karrman wrote: > Hello Heikki, > > I'm working with the new typec class code and have run into a problem. > The struct typec_capability defines a callback function as: > > int (*activate_mode)(const struct typec_capability *, int mode, int

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

2017-03-23 Thread Heikki Krogerus
Hi Mats, On Wed, Mar 22, 2017 at 10:15:20PM +0100, Mats Karrman wrote: > On 03/21/2017 11:37 AM, Heikki Krogerus wrote: > > > > I'm lost in the long thread here, is this series still ready to be > > > merged in, or is there another version that is being worked on? &g

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

2017-03-21 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-and-Tested-by: Felipe Balbi Tested-by: Guenter Roeck --- Documentation/ABI/testing/sysfs-class-typec | 276 ++ Documentation/usb/typec.rst | 184 MAINTAINERS

[PATCH v18 0/3] USB Type-C Connector class

2017-03-21 Thread Heikki Krogerus
en when the partner type is not "Accessory". Changes since v2: - Notification on role and alternate mode changes - cleanups Changes since v1: - Completely rewrote alternate mode support - Patners, cables and cable plugs presented as devices. Heikki Krogerus (3): lib/string: add sysf

[PATCH v18 1/3] lib/string: add sysfs_match_string helper

2017-03-21 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus Reviewed-by

[PATCH v18 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-03-21 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-and-Tested-by: Felipe Balbi Tested-by: Guenter Roeck --- drivers/usb/typec/Kconfig

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

2017-03-21 Thread Heikki Krogerus
On Tue, Feb 21, 2017 at 05:42:35PM +0200, Felipe Balbi wrote: > Just to clarify one thing here: wherever it says "Reviewed-by: Felipe > Balbi..." you could also read "Reviewed-and-Tested-by: Felipe Balbi..." > as I have been running these patches for past few months to test code on > Intel Joule.

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

2017-03-21 Thread Heikki Krogerus
On Tue, Mar 21, 2017 at 11:23:37AM +0100, Greg KH wrote: > On Tue, Feb 21, 2017 at 05:24:02PM +0300, Heikki Krogerus wrote: > > The USB Type-C class is meant to provide unified interface to the > > userspace to present the USB Type-C ports in a system. > > > > Cha

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

2017-03-08 Thread Heikki Krogerus
On Tue, Mar 07, 2017 at 11:30:54PM +0100, Mats Karrman wrote: > > > So, both the DP controller and the USB PD phy are I2C devices, and now I > > > have to make them both > > > attach to the AM bus as well? > > The DP controller would provide the driver and the USB PD phy > > (actually, the typec c

Re: query on UCSI

2017-03-07 Thread Heikki Krogerus
Hi, On Tue, Mar 07, 2017 at 12:39:39AM +0530, Shah, Nehal-bakulchandra wrote: > Hi Heikki , > > > Thanks for the prompt reply. > If i understood correctly the current driver(drivers/usb/misc/ucsi.c) supports > the OPM and rest all is taken care by EC FW with BIOS . > In ucsi.c file i did not fi

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

2017-03-07 Thread Heikki Krogerus
On Tue, Mar 07, 2017 at 01:36:29AM +, Peter Chen wrote: > >On Mon, Mar 06, 2017 at 09:15:51AM +0800, Peter Chen wrote: > >> > > What interface you use when you receive this event to handle > >> > > dual-role switch? I am wonder if a common dual-role class is > >> > > needed, then we can have a

Re: query on UCSI

2017-03-06 Thread Heikki Krogerus
Hi, On Mon, Mar 06, 2017 at 02:41:17PM +0530, Shah, Nehal-bakulchandra wrote: > Hi Greg and Heikki, > > > I can see that ucsi acpi interface driver is available in kernel tree. I have > following queries on the same. Kindly pardon my ignorance as i am a novice to > this. > > - Is there any impl

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

2017-03-06 Thread Heikki Krogerus
Hi Peter, On Mon, Mar 06, 2017 at 09:15:51AM +0800, Peter Chen wrote: > > > What interface you use when you receive this event to handle > > > dual-role switch? I am wonder if a common dual-role class is > > > needed, then we can have a common user utility. > > > > > > Eg, if "data_role" has chan

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

2017-03-06 Thread Heikki Krogerus
Hi Mats, On Fri, Mar 03, 2017 at 08:27:08PM +0100, Mats Karrman wrote: > On 2017-03-03 13:59, Heikki Krogerus wrote: > > > On Fri, Mar 03, 2017 at 08:29:18AM +0100, Mats Karrman wrote: > > > > > How would something like that sound to you guys? > > Compli

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

2017-03-03 Thread Heikki Krogerus
Hi Peter, On Fri, Mar 03, 2017 at 11:35:29AM +0800, Peter Chen wrote: > On Tue, Feb 21, 2017 at 05:24:04PM +0300, Heikki Krogerus wrote: > > +/* --- */ > > +/* Driver callbacks to report role updates */ > > + > > +/** > > + *

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

2017-03-03 Thread Heikki Krogerus
Hi, On Fri, Mar 03, 2017 at 08:29:18AM +0100, Mats Karrman wrote: > On 2017-03-03 04:13, Guenter Roeck wrote: > > > On 03/02/2017 07:22 AM, Mats Karrman wrote: > > > > > > Looking forward, one thing I have run into is how to connect the typec > > > driver with a > > > driver for an alternat

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

2017-02-21 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-by: Felipe Balbi Tested-by: Guenter Roeck --- Documentation/ABI/testing/sysfs-class-typec | 276 ++ Documentation/usb/typec.rst | 185 MAINTAINERS

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

2017-02-21 Thread Heikki Krogerus
. Changes since v2: - Notification on role and alternate mode changes - cleanups Changes since v1: - Completely rewrote alternate mode support - Patners, cables and cable plugs presented as devices. Heikki Krogerus (3): lib/string: add sysfs_match_string helper usb: USB Type-C connector cla

[PATCH v17 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-02-21 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-by: Felipe Balbi Tested-by: Guenter Roeck --- drivers/usb/typec/Kconfig | 15

[PATCH v17 1/3] lib/string: add sysfs_match_string helper

2017-02-21 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus Reviewed-by

Re: [PATCH] usb: typec: fix ptr_ret.cocci warnings

2017-02-10 Thread Heikki Krogerus
On Tue, Jan 31, 2017 at 01:38:34AM +0800, kbuild test robot wrote: > drivers/usb/typec/typec.c:1249:1-3: WARNING: PTR_ERR_OR_ZERO can be used > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci >

[PATCH v16 1/3] lib/string: add sysfs_match_string helper

2017-01-30 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus Reviewed-by

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

2017-01-30 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-by: Felipe Balbi --- Documentation/ABI/testing/sysfs-class-typec | 276 ++ Documentation/usb/typec.rst | 185 MAINTAINERS |9 + drivers/usb/Kconfig

[PATCH v16 0/3] USB Type-C Connector class

2017-01-30 Thread Heikki Krogerus
hanges - cleanups Changes since v1: - Completely rewrote alternate mode support - Patners, cables and cable plugs presented as devices. Heikki Krogerus (3): lib/string: add sysfs_match_string helper usb: USB Type-C connector class usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PH

[PATCH v16 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-30 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg Reviewed-by: Felipe Balbi --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile

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

2017-01-26 Thread Heikki Krogerus
On Wed, Jan 25, 2017 at 10:39:17AM -0800, Guenter Roeck wrote: > On Mon, Jan 23, 2017 at 04:44:23PM +0200, Felipe Balbi wrote: > > > > Hi, > > > > Heikki Krogerus writes: > > > +static void typec_report_identity(struct device *dev) > > >

Re: [PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-25 Thread Heikki Krogerus
On Wed, Jan 25, 2017 at 12:27:28PM +0200, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus writes: > >> > +wcove->cap.prefer_role = TYPEC_NO_PREFERRED_ROLE; > >> > >> we have a slight problem here that affects users of this particular >

Re: [PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-25 Thread Heikki Krogerus
On Mon, Jan 23, 2017 at 04:20:08PM +0200, Felipe Balbi wrote: > Heikki Krogerus writes: > > +static int wcove_typec_probe(struct platform_device *pdev) > > +{ > > [snip] > > > + wcove->cap.prefer_role = TYPEC_NO_PREFERRED_ROLE; > > we have a slight

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

2017-01-25 Thread Heikki Krogerus
; > + &dev_attr_power_operation_mode.attr, > > + &dev_attr_power_role.attr, > > + &dev_attr_preferred_role.attr, > > + &dev_attr_supported_accessory_modes.attr, > > + &dev_attr_usb_power_delivery_revision.attr, > > + &dev_attr_usb_typec_revi

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

2017-01-25 Thread Heikki Krogerus
Hi, On Mon, Jan 23, 2017 at 04:44:23PM +0200, Felipe Balbi wrote: > Heikki Krogerus writes: > > +static void typec_report_identity(struct device *dev) > > +{ > > + sysfs_notify(&dev->kobj, "identity", "id_header"); > > + sysfs_notify(&

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

2017-01-17 Thread Heikki Krogerus
Hi Greg, On Mon, Jan 16, 2017 at 04:35:24PM +0100, Greg KH wrote: > On Mon, Jan 16, 2017 at 05:56:13PM +0300, Heikki Krogerus wrote: > > The purpose of USB Type-C connector class is to provide > > unified interface for the user space to get the status and > > basic informa

[PATCHv15 2/3] usb: USB Type-C connector class

2017-01-16 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg --- Documentation/ABI/testing/sysfs-class-typec | 289 ++ Documentation/usb/typec.rst | 185 MAINTAINERS |9 + drivers/usb/Kconfig

[PATCHv15 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-16 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus Reviewed-by: Mika Westerberg --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile | 1 + drivers/usb

[PATCHv15 1/3] lib/string: add sysfs_match_string helper

2017-01-16 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus Reviewed-by

[PATCHv15 0/3] USB Type-C Connector class

2017-01-16 Thread Heikki Krogerus
attribute "accessory" is hidden when the partner type is not "Accessory". Changes since v2: - Notification on role and alternate mode changes - cleanups Changes since v1: - Completely rewrote alternate mode support - Patners, cables and cable plugs presented as devices. Heikki Kroge

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

2017-01-11 Thread Heikki Krogerus
Hi Guenter, On Tue, Jan 10, 2017 at 09:35:42AM -0800, Guenter Roeck wrote: > > I guess we might as well then split the VDO into header, cert stat and > > product parts. What do you think? > > > > If it's OK, then should we change that file to "identity" and dump the > > whole response from Discov

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

2017-01-10 Thread Heikki Krogerus
On Tue, Jan 10, 2017 at 11:08:51AM +0100, Oliver Neukum wrote: > > And since we are talking about the ABI, can we also change the listing > > of the accessory mode back to just "audio" and "debug" like I > > originally had it? I don't remember who and why wanted it to be > > changed to "Audio Adapt

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

2017-01-10 Thread Heikki Krogerus
On Tue, Jan 10, 2017 at 05:50:04AM -0800, Guenter Roeck wrote: > On 01/10/2017 12:54 AM, Heikki Krogerus wrote: > > Hi Guenter, > > > > On Mon, Jan 09, 2017 at 08:59:32AM -0800, Guenter Roeck wrote: > > > > +/** > > > > + * typec_register_partner - Re

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

2017-01-10 Thread Heikki Krogerus
Hi Guenter, On Mon, Jan 09, 2017 at 08:59:32AM -0800, Guenter Roeck wrote: > > +/** > > + * typec_register_partner - Register a USB Type-C Partner > > + * @port: The USB Type-C Port the partner is connected to > > + * @desc: Description of the partner > > + * > > + * Registers a device for USB Typ

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

2017-01-06 Thread Heikki Krogerus
Hi guys, On Thu, Jan 05, 2017 at 05:54:02PM +0200, Mika Westerberg wrote: > > +static ssize_t > > +typec_altmode_roles_show(struct device *dev, struct device_attribute *attr, > > +char *buf) > > +{ > > + struct typec_mode *mode = container_of(attr, struct typec_mode, > > +

[PATCHv14 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2017-01-05 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile | 1 + drivers/usb/typec/typec_wcove.c | 377

[PATCHv14 1/3] lib/string: add sysfs_match_string helper

2017-01-05 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus --- include

[PATCHv14 2/3] usb: USB Type-C connector class

2017-01-05 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus --- Documentation/ABI/testing/sysfs-class-typec | 219 + Documentation/usb/typec.txt | 181 MAINTAINERS |9 + drivers/usb/Kconfig |2 + drivers/usb/Makefile

[PATCHv14 0/3] USB Type-C Connector class

2017-01-05 Thread Heikki Krogerus
wrote alternate mode support - Patners, cables and cable plugs presented as devices. Heikki Krogerus (3): lib/string: add sysfs_match_string helper usb: USB Type-C connector class usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY Documentation/ABI/testing/sysfs-cla

Re: [RFC PATCH] usb: USB Type-C connector class

2016-12-20 Thread Heikki Krogerus
On Mon, Dec 19, 2016 at 09:22:33AM -0800, Guenter Roeck wrote: > On 12/19/2016 06:45 AM, Heikki Krogerus wrote: > > The purpose of USB Type-C connector class is to provide > > unified interface for the user space to get the status and > > basic information about USB Type-C c

[RFC PATCH] usb: USB Type-C connector class

2016-12-19 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus --- Documentation/ABI/testing/sysfs-class-typec | 220 ++ Documentation/usb/typec.txt | 174 + MAINTAINERS |9 + drivers/usb/Kconfig |2 + drivers/usb/Makefile

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

2016-12-15 Thread Heikki Krogerus
On Wed, Dec 07, 2016 at 02:52:31PM +0200, Heikki Krogerus wrote: > Hi Oliver, > > On Wed, Dec 07, 2016 at 10:46:48AM +0100, Oliver Neukum wrote: > > On Fri, 2016-12-02 at 10:04 -0800, Guenter Roeck wrote: > > > > Hi, > > > > > At least for my part I

Re: [PATCHv13,1/3] lib/string: add sysfs_match_string helper

2016-12-07 Thread Heikki Krogerus
On Wed, Dec 07, 2016 at 03:54:45PM -0800, Guenter Roeck wrote: > > +int __sysfs_match_string(const char * const *array, size_t n, const char > > *str) > > +{ > > + const char *item; > > + int index; > > + > > + for (index = 0; index < n; index++) { > > + item = array[index]; > > +

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

2016-12-07 Thread Heikki Krogerus
Hi Oliver, On Wed, Dec 07, 2016 at 10:46:48AM +0100, Oliver Neukum wrote: > On Fri, 2016-12-02 at 10:04 -0800, Guenter Roeck wrote: > > Hi, > > > At least for my part I very much concentrated on making sure that > > the user space ABI as well as the port driver API are sane and usable. > > Righ

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

2016-12-07 Thread Heikki Krogerus
On Fri, Dec 02, 2016 at 10:04:39AM -0800, Guenter Roeck wrote: > At least for my part I very much concentrated on making sure that > the user space ABI as well as the port driver API are sane and usable. > > The driver interface is not my area of expertise. As such, my testing > and understanding

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

2016-11-30 Thread Heikki Krogerus
Hi Greg, On Tue, Nov 29, 2016 at 05:27:44PM +0100, Greg KH wrote: > > +struct typec_cable { > > + struct device dev; > > + enum typec_plug_typetype; > > + u32 vdo; > > + unsigned intusb_pd:1; > > + unsigned intactive:1; > > + un

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

2016-11-29 Thread Heikki Krogerus
Hi Guenter, On Mon, Nov 28, 2016 at 12:11:43PM -0800, Guenter Roeck wrote: > Personally I don't really care about a module parameter; as mentioned above, > I would expect the preference, if it needs to be selectable, to be configured > with devicetree or ACPI properties (or by a platform driver wh

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

2016-11-28 Thread Heikki Krogerus
On Mon, Nov 28, 2016 at 11:19:32AM +0100, Oliver Neukum wrote: > On Thu, 2016-11-24 at 11:57 +0200, Heikki Krogerus wrote: > > On Wed, Nov 23, 2016 at 09:12:04PM -0800, Guenter Roeck wrote: > > > > In our implementation, the default preferred role is determined by the >

[PATCHv13 2/3] usb: USB Type-C connector class

2016-11-24 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck --- Documentation/ABI/testing/sysfs-class-typec | 220 ++ Documentation/usb/typec.txt | 110 +++ MAINTAINERS |9 + drivers/usb/Kconfig

[PATCHv13 1/3] lib/string: add sysfs_match_string helper

2016-11-24 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus Reviewed-by

[PATCHv13 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2016-11-24 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile | 1 + drivers/usb

[PATCHv13 0/3] USB Type-C Connector class

2016-11-24 Thread Heikki Krogerus
unication. - Partner attribute "accessory" is hidden when the partner type is not "Accessory". Changes since v2: - Notification on role and alternate mode changes - cleanups Changes since v1: - Completely rewrote alternate mode support - Patners, cables and cable plugs present

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

2016-11-24 Thread Heikki Krogerus
On Wed, Nov 23, 2016 at 09:12:04PM -0800, Guenter Roeck wrote: > Hello Heikki, > > On 11/22/2016 06:11 AM, Heikki Krogerus wrote: > [ ... ] > > + > > +struct typec_port *typec_register_port(struct device *dev, > > + cons

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

2016-11-23 Thread Heikki Krogerus
Hi Guenter, On Tue, Nov 22, 2016 at 04:11:44PM +0200, Heikki Krogerus wrote: > The USB Type-C class is meant to provide unified interface to the > userspace to present the USB Type-C ports in a system. > > Changes since v11: > - The port drivers are responsible of removin

[PATCHv12 0/3] USB Type-C Connector class

2016-11-22 Thread Heikki Krogerus
essory". Changes since v2: - Notification on role and alternate mode changes - cleanups Changes since v1: - Completely rewrote alternate mode support - Patners, cables and cable plugs presented as devices. Heikki Krogerus (3): lib/string: add sysfs_match_string helper usb: USB Type-C

[PATCHv12 1/3] lib/string: add sysfs_match_string helper

2016-11-22 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus --- include

[PATCHv12 2/3] usb: USB Type-C connector class

2016-11-22 Thread Heikki Krogerus
Alternate Modes. Signed-off-by: Heikki Krogerus --- Documentation/ABI/testing/sysfs-class-typec | 222 ++ Documentation/usb/typec.txt | 103 +++ MAINTAINERS |9 + drivers/usb/Kconfig |2 + drivers/usb/Makefile

[PATCHv12 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2016-11-22 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile | 1 + drivers/usb/typec/typec_wcove.c | 372

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

2016-11-22 Thread Heikki Krogerus
On Mon, Nov 21, 2016 at 03:45:06PM +0100, Greg KH wrote: > Again, free the device for which this release function is being called > for, that is why it is there. I will. Thanks, -- heikki -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord.

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

2016-11-22 Thread Heikki Krogerus
On Tue, Nov 22, 2016 at 12:51:11PM +0200, Heikki Krogerus wrote: > Hi Greg, > > On Mon, Nov 21, 2016 at 03:45:06PM +0100, Greg KH wrote: > > > We could allocate an extra structure for the partner when > > > typec_connect() is called, but we would do that just f

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

2016-11-22 Thread Heikki Krogerus
Hi Greg, On Mon, Nov 21, 2016 at 03:45:06PM +0100, Greg KH wrote: > > We could allocate an extra structure for the partner when > > typec_connect() is called, but we would do that just for the sake of > > having something to free in the release hook. It would not be useful > > for anything. It wou

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

2016-11-22 Thread Heikki Krogerus
On Mon, Nov 21, 2016 at 07:33:45AM -0800, Guenter Roeck wrote: > On 11/21/2016 06:23 AM, Heikki Krogerus wrote: > > On Mon, Nov 21, 2016 at 03:11:03PM +0200, Heikki Krogerus wrote: > > > Hi Greg, > > > > > > On Mon, Nov 21, 2016 at 11:35:28AM +0100, G

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

2016-11-22 Thread Heikki Krogerus
Hi Greg, On Mon, Nov 21, 2016 at 03:46:08PM +0100, Greg KH wrote: > > > > + > > > > +config TYPEC > > > > + tristate > > > > > > Hah, that says NOTHING about what this code is at all. > > > > Alone the class driver does nothing. Why would the user need to be > > aware of if it when selecti

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

2016-11-21 Thread Heikki Krogerus
On Mon, Nov 21, 2016 at 03:11:03PM +0200, Heikki Krogerus wrote: > Hi Greg, > > On Mon, Nov 21, 2016 at 11:35:28AM +0100, Greg KH wrote: > > > +static void typec_partner_release(struct device *dev) > > > +{ > > > + struct typec_po

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

2016-11-21 Thread Heikki Krogerus
On Mon, Nov 21, 2016 at 11:33:11AM +0100, Greg KH wrote: > On Thu, Nov 17, 2016 at 12:50:35PM +0200, Heikki Krogerus wrote: > > The purpose of USB Type-C connector class is to provide > > unified interface for the user space to get the status and > > basic information about

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

2016-11-21 Thread Heikki Krogerus
Hi Greg, On Mon, Nov 21, 2016 at 11:35:28AM +0100, Greg KH wrote: > > +static void typec_partner_release(struct device *dev) > > +{ > > + struct typec_port *port = to_typec_port(dev->parent); > > + > > + typec_unregister_altmodes(dev); > > + port->partner = NULL; > > +} > > This doesn't fee

[PATCHv11 1/3] lib/string: add sysfs_match_string helper

2016-11-17 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus --- include

[PATCHv11 0/3] USB Type-C Connector class

2016-11-17 Thread Heikki Krogerus
wrote alternate mode support - Patners, cables and cable plugs presented as devices. Heikki Krogerus (3): lib/string: add sysfs_match_string helper usb: USB Type-C connector class usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY Documentation/ABI/testing/sysfs-clas

[PATCHv11 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2016-11-17 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile | 1 + drivers/usb/typec/typec_wcove.c | 372

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