Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752722AbdIRKUO (ORCPT ); Mon, 18 Sep 2017 06:20:14 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39288 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbdIRKUN (ORCPT ); Mon, 18 Sep 2017 06:20:13 -0400 Date: Mon, 18 Sep 2017 12:20:24 +0200 From: Greg Kroah-Hartman To: Badhri Jagan Sridharan Cc: Guenter Roeck , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] staging: typec: tcpm: Validate source and sink caps Message-ID: <20170918102024.GA31341@kroah.com> References: <20170908012214.19047-1-Badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170908012214.19047-1-Badhri@google.com> User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1563 Lines: 39 On Thu, Sep 07, 2017 at 06:22:13PM -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 Sink > Capabilities message) shall have at least one Power > Data Object for vSafe5V. The Capabilities message shall also > contain the sending Port’s information followed by up to > 6 additional Power Data Objects. Power Data Objects in a > Capabilities message shall be sent in the following order: > > 1. The vSafe5V Fixed Supply Object shall always be the first object. > 2. The remaining Fixed Supply Objects, if present, shall be sent > in voltage order; lowest to highest. > 3. The Battery Supply Objects, if present shall be sent in Minimum > Voltage order; lowest to highest. > 4. The Variable Supply (non-battery) Objects, if present, shall be > sent in Minimum Voltage order; lowest to highest. > > Errors in source/sink_caps of the local port will prevent > the port registration. Whereas, errors in source caps of partner > device would only log them. > > Signed-off-by: Badhri Jagan Sridharan > --- > drivers/staging/typec/pd.h | 2 + > drivers/staging/typec/tcpm.c | 107 +++++++++++++++++++++++++++++++++++++++---- > drivers/staging/typec/tcpm.h | 16 +++---- > 3 files changed, 108 insertions(+), 17 deletions(-) Now that these files are moved in my usb tree, can you rebase and resend them? thanks, greg k-h