Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2981860iog; Mon, 27 Jun 2022 06:56:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t5/Tt2p4S9cxPnRPLh1Lk67XL7xBHKtNPPXZgjvORsBmGbUeJfEnWNUdK6xRZCX8l4yHFR X-Received: by 2002:a05:6402:398:b0:435:6df7:b7e4 with SMTP id o24-20020a056402039800b004356df7b7e4mr16816598edv.306.1656338204285; Mon, 27 Jun 2022 06:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656338204; cv=none; d=google.com; s=arc-20160816; b=pNSzHi5zq0AfuFJ6OL8b4cOS2XeUhnFpmoHwH0T+ZyIt3Js5zbExZLG69cS3WmBIo4 MfbsoUk2yXFAfkV4CGwZFRmxkIBiU3t7N7qvoqOGQ3r7YLUHX5xY/1pGbuNv2pyp8rsp jvaRBg9JIk0fI4q0byUOeNA4MyfOPjiGjP8CrBH0P1NY5Tv+mZUejrOKctntTqmN7xxM qszwgbKtZc6/hEXx5VgLwpmWYIdWJ/rGxU3MMPNKGUTo4DgNRh7xCBAM+qawQ8poVVPr aGhdleimReETLHVP5ZZdSP5e31mKBI6CLFpgS7P/DhFo12Ism3M1nfEL/SPGaDiRYvPV Q8cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BvXK7IjPr/dvxpOEs8Wgz5utHO2JpiAKUO7kvolbpGE=; b=nhTAhzqTVpbA4HoBF7RTHS7UIAyKCxLlVVemI46IEAmyIbyeHJIH1TGXadD0A6ofoh XE30GseYGDBNk0CmHKrZH73Dj/uG02nXcZwphB6a6HTMvueyERayxiY31UvX7Gy2uVC8 5TUb0pW7riMywMeskUHgfmmWFoDVvEBQIRn73pXlKqePxrpGpiUp8zePkUk+2/K3l8It LC3SzAQwPK7h4IFvmUdAGhyBylYD0GR47urriBVGD/y1Ge11ridCbm7pITeX2rkwWwNP 3Hk00vrPUzNDI7E1HDNgt1FsuruqxDc1vnJNrl71389ULu4ZLZ1Lmvr/jRVcsoBUfkC0 veYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gv1xeqni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs37-20020a1709072d2500b00726387a8967si4091924ejc.610.2022.06.27.06.56.19; Mon, 27 Jun 2022 06:56:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gv1xeqni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235452AbiF0NT7 (ORCPT + 99 others); Mon, 27 Jun 2022 09:19:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235438AbiF0NT6 (ORCPT ); Mon, 27 Jun 2022 09:19:58 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83F0710A3; Mon, 27 Jun 2022 06:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656335997; x=1687871997; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FSVsuowTJal0OK/kAa7GOJ1gXDKBsLcY9rOM056n4Mk=; b=gv1xeqniOy/SMlbXpns3x4ZyMrnwRYRImF7QlY1K2weJCUF9R5swa4p6 BgsmSSLtrrwZCDNRBjeQ07K7uAJNLLEfcx1he8ULkSoECXgjLi9N0PWXd qFCbIkeOhmQ+0nDK2FBVwnlNaQJhXTtASGEei/xbIegQuBxFiCsvmXwCb soRu5M2AqHf2G9LZDkaAOfPOZm/yZTXYW26ks0/Jb6Uxoa9AMlZZhTjgz IFeHmF56oxUyaPTWy16Jd3n1d84MYFerCj64mLDkaauBG5uOEKfDuOTQi Se/WQaO6K13nWLH4ewJy1OsyPjGv1pCQS+lmG49eidhppijbvFGiP32o1 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10390"; a="270191853" X-IronPort-AV: E=Sophos;i="5.92,226,1650956400"; d="scan'208";a="270191853" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 06:19:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,226,1650956400"; d="scan'208";a="732309491" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 27 Jun 2022 06:19:53 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 27 Jun 2022 16:19:52 +0300 Date: Mon, 27 Jun 2022 16:19:52 +0300 From: Heikki Krogerus To: Xin Ji Cc: Guenter Roeck , Greg Kroah-Hartman , Matthias Brugger , bliang@analogixsemi.com, qwen@analogixsemi.com, jli@analogixsemi.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v11 1/3] usb: typec: tcpci: move tcpci.h to include/linux/usb/ Message-ID: References: <20220627044331.2180641-1-xji@analogixsemi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220627044331.2180641-1-xji@analogixsemi.com> X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 27, 2022 at 12:43:29PM +0800, Xin Ji wrote: > USB PD controllers which consisting of a microcontroller (acting as the TCPM) > and a port controller (TCPC) - may require that the driver for the PD > controller accesses directly also the on-chip port controller in some cases. > > Move tcpci.h to include/linux/usb/ is convenience access TCPC registers. > > Signed-off-by: Xin Ji This one looks good to me. Reviewed-by: Heikki Krogerus > --- > V9 -> V10: Rebase on the latest code > V8 -> V9 : Add more commit message > V7 -> V8 : Fix Guanter's comment, remove unnecessary explain > --- > drivers/usb/typec/tcpm/tcpci.c | 3 +-- > drivers/usb/typec/tcpm/tcpci_maxim.c | 3 +-- > drivers/usb/typec/tcpm/tcpci_mt6360.c | 3 +-- > drivers/usb/typec/tcpm/tcpci_rt1711h.c | 2 +- > {drivers/usb/typec/tcpm => include/linux/usb}/tcpci.h | 1 + > 5 files changed, 5 insertions(+), 7 deletions(-) > rename {drivers/usb/typec/tcpm => include/linux/usb}/tcpci.h (99%) > > diff --git a/drivers/usb/typec/tcpm/tcpci.c b/drivers/usb/typec/tcpm/tcpci.c > index f33e08eb7670..812784702d53 100644 > --- a/drivers/usb/typec/tcpm/tcpci.c > +++ b/drivers/usb/typec/tcpm/tcpci.c > @@ -13,11 +13,10 @@ > #include > #include > #include > +#include > #include > #include > > -#include "tcpci.h" > - > #define PD_RETRY_COUNT_DEFAULT 3 > #define PD_RETRY_COUNT_3_0_OR_HIGHER 2 > #define AUTO_DISCHARGE_DEFAULT_THRESHOLD_MV 3500 > diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c > index df2505570f07..4b6705f3d7b7 100644 > --- a/drivers/usb/typec/tcpm/tcpci_maxim.c > +++ b/drivers/usb/typec/tcpm/tcpci_maxim.c > @@ -11,11 +11,10 @@ > #include > #include > #include > +#include > #include > #include > > -#include "tcpci.h" > - > #define PD_ACTIVITY_TIMEOUT_MS 10000 > > #define TCPC_VENDOR_ALERT 0x80 > diff --git a/drivers/usb/typec/tcpm/tcpci_mt6360.c b/drivers/usb/typec/tcpm/tcpci_mt6360.c > index 8a952eaf9016..1b7c31278ebb 100644 > --- a/drivers/usb/typec/tcpm/tcpci_mt6360.c > +++ b/drivers/usb/typec/tcpm/tcpci_mt6360.c > @@ -11,10 +11,9 @@ > #include > #include > #include > +#include > #include > > -#include "tcpci.h" > - > #define MT6360_REG_PHYCTRL1 0x80 > #define MT6360_REG_PHYCTRL3 0x82 > #define MT6360_REG_PHYCTRL7 0x86 > diff --git a/drivers/usb/typec/tcpm/tcpci_rt1711h.c b/drivers/usb/typec/tcpm/tcpci_rt1711h.c > index b56a0880a044..3291ca4948da 100644 > --- a/drivers/usb/typec/tcpm/tcpci_rt1711h.c > +++ b/drivers/usb/typec/tcpm/tcpci_rt1711h.c > @@ -10,9 +10,9 @@ > #include > #include > #include > +#include > #include > #include > -#include "tcpci.h" > > #define RT1711H_VID 0x29CF > #define RT1711H_PID 0x1711 > diff --git a/drivers/usb/typec/tcpm/tcpci.h b/include/linux/usb/tcpci.h > similarity index 99% > rename from drivers/usb/typec/tcpm/tcpci.h > rename to include/linux/usb/tcpci.h > index b2edd45f13c6..20c0bedb8ec8 100644 > --- a/drivers/usb/typec/tcpm/tcpci.h > +++ b/include/linux/usb/tcpci.h > @@ -9,6 +9,7 @@ > #define __LINUX_USB_TCPCI_H > > #include > +#include > > #define TCPC_VENDOR_ID 0x0 > #define TCPC_PRODUCT_ID 0x2 > -- > 2.25.1 -- heikki