Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3507980pxp; Tue, 8 Mar 2022 16:13:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyq5qERFae41J0fQTOjak1/9W1Fq+18dKm7iO2kzM61QxFndL19DrU49qAjSZUwsCyDJqd X-Received: by 2002:a17:903:1205:b0:151:8ae9:93ea with SMTP id l5-20020a170903120500b001518ae993eamr20157444plh.37.1646784807196; Tue, 08 Mar 2022 16:13:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646784807; cv=none; d=google.com; s=arc-20160816; b=NhiRmH+mw1VPWXnaHDoS/G85demELJyztyzLz1Z21fQLu+dnq5egf8JI2kDGi/Y31L iz0gIWPIf0sjl+odDN2tCbM6ZAKag7X6SblCRYux8ssH8LHVX4u+x0UqhgXAWQrM1sgz PnKOybTNvnPK825nPSJwy+mRE+3FQTX00TcLAP9hFAE4JlmYfD6t7ape3ZiJR91PJJdl R+KFkxIyvqL0X7S02RKa78qDkIYJ/bbtca4BazV66KkkaP8DIcbU33nBrKvTvIDNw25+ +BIF1s55O/5jWz4CnsHoSciaq7CvS12urc8piIUj6gq/nvg4GAVoLljaljyqm0HUXx61 QuVw== 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=mgM6+E/pJoiFXaOrS1HmI+n1D7IpUPCiy83yzF+ylmM=; b=ZYdHMPAjN7iu/87ZItmuFq03kvldrg3Zxwv2uXr+CxLlKqM4DW2YKe+lZ+qOvDu7by PViGZe7yhi32rmzm4WeD/SduwGNeuOG/eDOwqGm/naOcWu52d7NtyUTTNmXRtZlhtEP3 C2mN1AnG7z06ukjznrwvcUnkNRJfp8ONFdVz65A++0tM2H6SVgzeRR1YFuJDBN2n1Zh4 f/YH4ceUI15RFQY2gUVy2V3b+A8E7PPTaxoNU5/JA4ornN39DkOIIH7A0S6nWOcbXjbb 21jT1NwnKg1yqz6ve8RbcSC9RPuQDhzEVyuNQ2MHPHp4eNEK+NHaGQUsMRCRLJdTkY4M uMSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GwzXJMdS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u4-20020a17090a3fc400b001bd14e01f70si439387pjm.94.2022.03.08.16.13.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 16:13:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GwzXJMdS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8CED07C7B7; Tue, 8 Mar 2022 15:42:13 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345803AbiCHKMO (ORCPT + 99 others); Tue, 8 Mar 2022 05:12:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345852AbiCHKLz (ORCPT ); Tue, 8 Mar 2022 05:11:55 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42C1743AF5; Tue, 8 Mar 2022 02:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646734250; x=1678270250; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7ejrIRDi0eLEWqSUSsS80pzyQyiNB/5BCzaO1wi9Cco=; b=GwzXJMdSRjynlRZ0qhbw+W+QjBQr9Nj0VLSkvtPPsuwiHvvRL/37LfR+ jev5OHH3ucKBHj67VtNN64Xdixz/oQnkyJKNoOPw/HwZFgi0+z8/gB+Ho OeEAlJ+GhO70nWX5P18eB7Et/8NEKkFqYDXpdlT6ygOTy0RyswOeYQ0/t V51Z62Y+tp5qYhPwbQs9nnnCp1l3vmBAEyQCM4YJgo8w7BKeLx4Pzflf3 dgukn9SjkOohixlceSEOi+taBfo/J9oECvNVQUZoCmI+Jnhm4qacEoCZ3 wFZWej+8DFEGLnZYclzzBatFAVa96BJJA6vghowOP6owACbJi6WpFntgK w==; X-IronPort-AV: E=McAfee;i="6200,9189,10279"; a="254587409" X-IronPort-AV: E=Sophos;i="5.90,164,1643702400"; d="scan'208";a="254587409" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2022 02:10:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,164,1643702400"; d="scan'208";a="687874826" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 08 Mar 2022 02:10:46 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 08 Mar 2022 12:10:45 +0200 Date: Tue, 8 Mar 2022 12:10:45 +0200 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 v8 1/3] usb: typec: tcpci: move tcpci.h to include/linux/usb/ directory Message-ID: References: <20220308073431.1217890-1-xji@analogixsemi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220308073431.1217890-1-xji@analogixsemi.com> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Tue, Mar 08, 2022 at 03:34:28PM +0800, Xin Ji wrote: > As for convenience use TCPCI register definition, move tcpci.h to > include/linux/usb/ directory. To be honest, I was still hoping for a better explanation here. The reason why this header is made global is because some USB PD controllers - PD controllers 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. I was hoping that that was explained in the commit message somehow. > Signed-off-by: Xin Ji > > --- > 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 e07d26a3cd8e..9c907296596f 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 f1bd9e09bc87..9e0338bce7ef 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_VCONNCTRL1 0x8C > #define MT6360_REG_MODECTRL2 0x8F > #define MT6360_REG_SWRESET 0xA0 > 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