From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 327AAC433DB for ; Tue, 2 Feb 2021 08:38:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2DF164F57 for ; Tue, 2 Feb 2021 08:38:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbhBBIiD (ORCPT ); Tue, 2 Feb 2021 03:38:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbhBBIh5 (ORCPT ); Tue, 2 Feb 2021 03:37:57 -0500 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 831DAC061573 for ; Tue, 2 Feb 2021 00:37:17 -0800 (PST) Received: by mail-qv1-xf35.google.com with SMTP id l11so9529321qvt.1 for ; Tue, 02 Feb 2021 00:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DW6qKjgDaZfg9tmH9Lbh2Y15xJjTza3J0FSZQyXe7e8=; b=TqAUGL6T55G7V7o1ORKbs2CEC5wdY4D9EZvFInzXpo/wwv3c6nrrELMmnPm0RLynnn tgIgB+DfgoH7mli2DcK4HPsKKrlUK2GMpplKwR3a0Espw6sevr+2kbjDgvJUYcUj8tZj Rzynk74eJvVIJkipx2kKDjcj7CeEAsHd/Z21XyhqXb1GIS0ekg3QH+gg2upVpd0OWqJS nepT2AIKgJKezKQNE5vgF+L7samPiae5iwI5E9m497LrmokRG/I8kYLmlSG7Vho3QWXc NdkE/IuB0llrINfMXUKAs/Yy0L6kqp8uJHs2SAFf/eY4CVZb5RMXYGoWydXeBXcrt/ep MUYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DW6qKjgDaZfg9tmH9Lbh2Y15xJjTza3J0FSZQyXe7e8=; b=nKqSzhcEQw59UQeft0ya22A+W2oOilvHOgUeAdqjdzCE6Gn4LicSqvwake2UC534rj grI1rLhSPDpRkvHH4p3Bk84J5VX888BRD6jXrUFDUKN3dfjNBEZw9qP7tqdhcu7R4Rj6 ZsXTHc8g1fj/GTwUOycs76NU9hzkckAYn+gSGGryTEDEFH5YBEn6x0HEwL/uV3GNqh7E xhNfjwU9TnuSdAOKEJwm1aAceG8EyOXTHHgknnq2DQIpk2v6lQsOIyymBLdz0SplXd13 cIPXeDatDUAhi91DY73DVFC/9fThWNdE4dTmNY/H9WnKkF3X+EPSqwE0WdxiH8TwX0s/ 5AoQ== X-Gm-Message-State: AOAM530xoUKpSDv2zXF0ow9kY3wgqPgsfo5I4kL4/QTe/rb2vZD7q72T JLRNjvC6eRvaNQE3UgVubwlDAbNrAEm+S96S2k+POw== X-Google-Smtp-Source: ABdhPJwUb8I/lvLDswXeoeVEnGbBA93DzVcPkMUHyw6Q+mT793xolcnIgTOrdmfsFpDsX8LgZL7vNHpLVmUoy41t7Mg= X-Received: by 2002:a0c:b990:: with SMTP id v16mr18963995qvf.16.1612255036209; Tue, 02 Feb 2021 00:37:16 -0800 (PST) MIME-Version: 1.0 References: <20210201133421.408508-1-kyletso@google.com> <20210201133421.408508-2-kyletso@google.com> <20210201153542.GH2465@kuha.fi.intel.com> In-Reply-To: <20210201153542.GH2465@kuha.fi.intel.com> From: Kyle Tso Date: Tue, 2 Feb 2021 16:37:00 +0800 Message-ID: Subject: Re: [PATCH v3 1/3] usb: typec: Determine common SVDM Versions To: Heikki Krogerus Cc: Guenter Roeck , Greg KH , Hans de Goede , robh+dt@kernel.org, Badhri Jagan Sridharan , USB , LKML , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Feb 1, 2021 at 11:35 PM Heikki Krogerus wrote: > > On Mon, Feb 01, 2021 at 09:34:19PM +0800, Kyle Tso wrote: > > PD Spec Revision 3.0 Version 2.0 + ECNs 2020-12-10 > > 6.4.4.2.3 Structured VDM Version > > "The Structured VDM Version field of the Discover Identity Command > > sent and received during VDM discovery Shall be used to determine the > > lowest common Structured VDM Version supported by the Port Partners or > > Cable Plug and Shall continue to operate using this Specification > > Revision until they are Detached." > > > > Also clear the fields newly defined in SVDM version 2.0 for > > compatibilities. And fix some VDO definitions changed in the Spec. > > > > Signed-off-by: Kyle Tso > > --- > > Changes since v2: > > - rename the variable and the functions (remove the text "common") > > - remove the macro > > > > drivers/usb/typec/altmodes/displayport.c | 8 +- > > drivers/usb/typec/class.c | 21 +- > > drivers/usb/typec/tcpm/tcpm.c | 47 +++- > > drivers/usb/typec/ucsi/displayport.c | 12 +- > > drivers/usb/typec/ucsi/ucsi.c | 2 + > > include/linux/usb/pd_vdo.h | 315 +++++++++++++++++------ > > include/linux/usb/typec.h | 10 + > > 7 files changed, 326 insertions(+), 89 deletions(-) > > I think there is some room to split this one at least a little. The > changes to the class (so drivers/usb/typec/class.c and > include/linux/usb/typec.h) could be introduced separately at least. > > So I see there are two changes in this patch. You are modifying the > class, and then there are the updated PD definitions. Both should be > introduced in separate patches IMO. I think also each driver (so > ucsi.c and tcpm.c) can handle the changes to the class in its own > patch. The modifications to the PD definitions and updated VDO() and > so on can be handled in a single patch I guess. > I will separate this patch to different ones. thanks, Kyle > > thanks, > > -- > heikki