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 A2E96C433EF for ; Mon, 7 Mar 2022 15:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242883AbiCGPMn (ORCPT ); Mon, 7 Mar 2022 10:12:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236295AbiCGPMl (ORCPT ); Mon, 7 Mar 2022 10:12:41 -0500 X-Greylist: delayed 1360 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Mar 2022 07:11:47 PST Received: from gateway30.websitewelcome.com (gateway30.websitewelcome.com [192.185.184.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2B3489CC5 for ; Mon, 7 Mar 2022 07:11:47 -0800 (PST) Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway30.websitewelcome.com (Postfix) with ESMTP id EB8D116231 for ; Mon, 7 Mar 2022 08:49:06 -0600 (CST) Received: from 162-215-252-75.unifiedlayer.com ([208.91.199.152]) by cmsmtp with SMTP id REfanWOPpb6UBREfanAC3a; Mon, 07 Mar 2022 08:49:06 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:Subject:From:References:Cc:To:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ffdy6z+jLWtdsYT/cAqK0cKmbp/7CaFfPazFLQ9MlP4=; b=mwhYzltTsMKEaWhoQ519z8wv1I zbpB0D48oE9bMgRLfOFycU/Dc2898RIRKoK1cdDpCzGtK3QxZygcj2gr/OUsmF1cHoTBkb8ckwGRy JtMlijix34aDR6Rw1NrOzdd2Zm+6CQdMGt9UzLuYn5Hon7yylQaIMtLxsWJzufkN3x1dyZkjA8jF0 P+2B+bCIqh+5gaixxah86BojuqcHAEUPAdf0p/WXRzzwQeUGCrs5qQOyYPu1AQmt2hbPJqre5vsAt 6z1IMAOb45XtS1wBFZr2ZyFfvgGj/5DP+W1ABA3G7HAiDWaA06oH4iTz7rz0Yp/UTRgzpZapvY+Ts +OwNnEUQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:38094) by bh-25.webhostbox.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nREfa-002KX7-2w; Mon, 07 Mar 2022 14:49:06 +0000 Message-ID: <4252cd9d-a761-e064-58cf-eebc3b9d0bb7@roeck-us.net> Date: Mon, 7 Mar 2022 06:49:03 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Xin Ji , Heikki Krogerus , Greg Kroah-Hartman , Matthias Brugger Cc: 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 References: <20220307090929.701137-1-xji@analogixsemi.com> From: Guenter Roeck Subject: Re: [PATCH v7 1/3] usb: typec: tcpci: move tcpci.h to include/linux/usb/ directory In-Reply-To: <20220307090929.701137-1-xji@analogixsemi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-BWhitelist: no X-Source-IP: 108.223.40.66 X-Source-L: No X-Exim-ID: 1nREfa-002KX7-2w X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 108-223-40-66.lightspeed.sntcca.sbcglobal.net [108.223.40.66]:38094 X-Source-Auth: linux@roeck-us.net X-Email-Count: 31 X-Source-Cap: cm9lY2s7YWN0aXZzdG07YmgtMjUud2ViaG9zdGJveC5uZXQ= X-Local-Domain: yes Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/7/22 01:09, Xin Ji wrote: > Move tcpci.h as a global file, better for other USB Type-C driver > access. > The idea was to have tcpci compliant drivers in the tcpm/ subdirectory. If I recall correctly, the reason for having this driver elsewhere is that it doesn't support tcpm. That should be explained here. "better for other USB Type-C driver" is not a reason for moving a header file. > Fix compiling error after moving tcpci.h to include/linux/usb/. > I don't think this should be part of the commit description. Guenter > Signed-off-by: Xin Ji > --- > 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