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: [RFC v8 0/7] SCU/PMC/PUNIT Inter-Processor Communication(IPC) driver cleanup

2017-11-23 Thread Heikki Krogerus
Hi, On Sun, Oct 29, 2017 at 02:49:53AM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > Currently intel_pmc_ipc.c, intel_punit_ipc.c, intel_scu_ipc.c drivers > implements the same IPC features. This code duplication could be avoided if we > implement the IPC driver as a generic library

Re: [RFC v8 4/7] platform: x86: Add generic Intel IPC driver

2017-11-23 Thread Heikki Krogerus
Hi, On Sun, Oct 29, 2017 at 02:49:57AM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > +/** > + * devm_intel_ipc_dev_create() - Create IPC device > + * @dev : IPC parent device. > + * @devname : Name of the IPC device. > + * @cfg : IPC device configuration. >

Re: [RFC v8 3/7] platform/x86: intel_pmc_ipc: Use regmap calls for GCR updates

2017-11-23 Thread Heikki Krogerus
On Sun, Oct 29, 2017 at 02:49:56AM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > This patch adds support for regmap based implementation for GCR > read/write/update APIs. > > Signed-off-by: Kuppuswamy Sathyanarayanan > > --- > drivers/platfor

Re: [RFC v8 2/7] platform/x86: intel_pmc_ipc: Use MFD framework to create dependent devices

2017-11-23 Thread Heikki Krogerus
Hi, On Sun, Oct 29, 2017 at 02:49:55AM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > Currently, we have lot of repetitive code in dependent device resource > allocation and device creation handling code. This logic can be improved if > we use MF

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: linux-next: Tree for Nov 15 (drivers/phy/ti/phy-tusb1210)

2017-11-16 Thread Heikki Krogerus
Hi Randy, On Wed, Nov 15, 2017 at 09:25:06AM -0800, Randy Dunlap wrote: > On 11/14/2017 09:47 PM, Stephen Rothwell wrote: > > Hi all, > > > > Please do not add any v4.16 material to your linux-next included trees > > until v4.15-rc1 has been released. > > > > Changes since 20171114: > > > > >

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/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: [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

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

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: [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

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

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 v1 1/3] mfd: Add new mfd device TPS68470

2017-06-06 Thread Heikki Krogerus
Hi Rajmohan, On Tue, Jun 06, 2017 at 04:55:16AM -0700, Rajmohan Mani wrote: > +/* > + * tps68470_reg_read: Read a single tps68470 register. > + * > + * @tps: Device to read from. > + * @reg: Register to read. > + * @val: Contains the value > + */ > +int tps68470_reg_read(struct tps68470 *tps, unsi

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 For the typec_wcove.c part: Revieved-by: Heikki Krogerus Thanks, -- heikki

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] 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: USB TYPE-C support and the power-supply subsys (was Re: [PATCH 2/5] extcon: Add FUSB302 USB TYPE-C controller support)

2017-05-22 Thread Heikki Krogerus
On Fri, May 19, 2017 at 10:12:14PM +0200, Hans de Goede wrote: > Hi, > > On 18-05-17 10:37, Heikki Krogerus wrote: > > On Wed, May 17, 2017 at 04:47:14PM +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 17-05-17 13:45, Heikki Krogerus wrote: &g

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: USB TYPE-C support and the power-supply subsys (was Re: [PATCH 2/5] extcon: Add FUSB302 USB TYPE-C controller support)

2017-05-18 Thread Heikki Krogerus
On Thu, May 18, 2017 at 11:37:56AM +0300, Heikki Krogerus wrote: > I'm mainly interested in just considering USB as a power supply with a > board like this, because really, that is what it is, but also by using > the power supply class properly (and possibly improving it a littl

Re: USB TYPE-C support and the power-supply subsys (was Re: [PATCH 2/5] extcon: Add FUSB302 USB TYPE-C controller support)

2017-05-18 Thread Heikki Krogerus
On Wed, May 17, 2017 at 04:47:14PM +0200, Hans de Goede wrote: > Hi, > > On 17-05-17 13:45, Heikki Krogerus wrote: > > Hi, > > > > On Wed, May 17, 2017 at 12:24:52AM +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 05/16/2017 02:07 PM,

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] 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 > > >

Re: [PATCH 2/5] extcon: Add FUSB302 USB TYPE-C controller support

2017-05-17 Thread Heikki Krogerus
Hi, On Wed, May 17, 2017 at 12:24:52AM +0200, Hans de Goede wrote: > Hi, > > On 05/16/2017 02:07 PM, Heikki Krogerus wrote: > > Hi Hans, > > > > On Fri, May 12, 2017 at 11:22:46PM +0200, Hans de Goede wrote: > > > > > > To me making the combinat

Re: [PATCH 2/5] extcon: Add FUSB302 USB TYPE-C controller support

2017-05-16 Thread Heikki Krogerus
Hi Hans, On Fri, May 12, 2017 at 11:22:46PM +0200, Hans de Goede wrote: > On 24-04-17 16:25, Heikki Krogerus wrote: > > > Doesn't this mean you have several extcon_dev registered for a > > single port? > > Yes this is unfortunate, but the primary consumer of extco

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: [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 5/5] extcon: intel-cht-wc: Add support for monitoring external USB Type-C controller

2017-04-24 Thread Heikki Krogerus
Hi Hans, On Fri, Apr 21, 2017 at 03:01:19PM +0200, Hans de Goede wrote: > On some boards the Whiskey Cove PMIC is combined with an external USB > Type-C controller, in this case extcon consumers should use the Type-C > extcon state, except when the USB Type-C controller detects a current > limit o

Re: [PATCH 2/5] extcon: Add FUSB302 USB TYPE-C controller support

2017-04-24 Thread Heikki Krogerus
+Guenter On Fri, Apr 21, 2017 at 09:51:50PM +0300, Andy Shevchenko wrote: > +Cc: Heikki. > > He might comment on this. Thanks Andy. > On Fri, Apr 21, 2017 at 4:01 PM, Hans de Goede wrote: > > Add support for USB TYPE-C cable detection on systems using a > > FUSB302 USB TYPE-C controller. > > >

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 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 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

[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 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

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] disable RTS override on LPSS UART with Auto Flow Control

2017-03-20 Thread Heikki Krogerus
37xx (Baytrail) say. The internal Lynxpoint PCH documentation I used describe the bit differently, but we should of course follow the public documentation. The LPSS block housing the UART is in any case the same in all these products. After addressing Andy's comments: Reviewed-by: Heikki Krogerus This should also go to stable. Thanks, -- heikki

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: [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: [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-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-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

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: Issues with irq handling in mfd/intel_soc_pmic_bxtwc.c

2017-02-28 Thread Heikki Krogerus
Hi, On Tue, Feb 28, 2017 at 12:26:03PM +0200, Andy Shevchenko wrote: > (Cc: Vincent, he might be interested in that since he is working on > Basin Cove ADC driver for the moment) > > On Mon, Feb 27, 2017 at 2:38 PM, Hans de Goede wrote: > > Hi All, > > > > While working on Whiskey Cove PMIC supp

[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 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 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

[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

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 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 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 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

[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

Re: [PATCH RESEND] pinctrl: intel: Turn Baytrail support to tristate

2017-01-26 Thread Heikki Krogerus
On Wed, Jan 25, 2017 at 04:26:08PM +0100, Jean Delvare wrote: > The pinctrl-baytrail driver builds just fine as a module so give > users this option. > > Signed-off-by: Jean Delvare > Cc: Mika Westerberg > Cc: Heikki Krogerus OK by me. FWIW. Reviewed-by: Heikki

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 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 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 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 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

[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 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

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