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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3FDCC433EF for ; Mon, 27 Jun 2022 13:20:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235453AbiF0NUA (ORCPT ); Mon, 27 Jun 2022 09:20:00 -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> 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