Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1427081AbdDVDc4 (ORCPT ); Fri, 21 Apr 2017 23:32:56 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:50394 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423888AbdDVDan (ORCPT ); Fri, 21 Apr 2017 23:30:43 -0400 Subject: Re: [RFC PATCH v5 1/2] usb: typec: USB Type-C Port Manager (tcpm) To: Felipe Balbi References: <1492812953-30434-1-git-send-email-linux@roeck-us.net> Cc: Heikki Krogerus , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Mats Karrman , Badhri Jagan Sridharan , Oliver Neukum , Guenter Roeck From: Guenter Roeck Message-ID: <589acb06-8090-6f61-1b46-a1748535c165@roeck-us.net> Date: Fri, 21 Apr 2017 20:30:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1492812953-30434-1-git-send-email-linux@roeck-us.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2171 Lines: 70 On 04/21/2017 03:15 PM, Guenter Roeck wrote: > From: Guenter Roeck > > This driver implements the USB Type-C Power Delivery state machine > for both source and sink ports. Alternate mode support is not > fully implemented. > > The driver attaches to the USB Type-C class code implemented in > the following patches. > > usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY > usb: USB Type-C connector class > > This driver only implements the state machine. Lower level drivers are > responsible for > - Reporting VBUS status and activating VBUS > - Setting CC lines and providing CC line status > - Setting line polarity > - Activating and deactivating VCONN > - Setting the current limit > - Activating and deactivating PD message transfers > - Sending and receiving PD messages > > The driver provides both a functional API as well as callbacks for > lower level drivers. > Open question, since this still requires some work: Would the code, in its current form, be acceptable in -staging ? [ ... ] > diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c > new file mode 100644 > index 000000000000..1a82dddb243d > --- /dev/null > +++ b/drivers/usb/typec/tcpm.c > @@ -0,0 +1,3443 @@ > +/* > + * Copyright 2015-2016 Google, Inc > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * USB Power Delivery protocol stack. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include Missing #include to actually build in on top of -next. Guenter