Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2351745pxp; Mon, 7 Mar 2022 13:34:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiHDWkm1788WdOF0L2SgUMohGkJNQCsPgFaHpJn0Ddgw90ZA8CUdhuN5RS0t8oK1SuftmA X-Received: by 2002:a17:906:a213:b0:6b5:b0f9:7567 with SMTP id r19-20020a170906a21300b006b5b0f97567mr10796893ejy.129.1646688889925; Mon, 07 Mar 2022 13:34:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646688889; cv=none; d=google.com; s=arc-20160816; b=cD0a7/U0NEho7I2nSwuwCEKdumRfXMvVomVyPWtGcowK4uTm2G7t2o6ml7TSTCDUWG TLlFQhTACkYp46yJLqU3qagz+umUDaZzuMAQ5L8pOzj00iCCdr491up5BLAsfsNqgWt0 X4dZkCoyoVk/+glEd3/mAzmderNplOtZruxTNhTY3uNrEbpwdm0s29zXUF9fmaT63KyQ 1BdEout07Ug9o8OIXk+kXsW5SsNTDlrTIJf7CnhzfSCpoMCvEhVjEU4FoF2g16pRELwZ PW7dJ27oE+/R0+/ZNKda+Md0OUuSBYcrsxRw03V2G6gQa36XAPs8TJVYPda6JxuDS8eT MaRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=Ffdy6z+jLWtdsYT/cAqK0cKmbp/7CaFfPazFLQ9MlP4=; b=nb1SqgiVu+yjRx1jbwK1FvFHTBMwo419DO3Y+qAbv+qtf9Dh4wn4v6Fc4eeHnB7FKm KdgvIb/BJzKIxP/DNx4wtmfG+WYQZ6Vn3zbnkNdidwsRjHLwJzCmD3j9SNwVSHSMP00E 9nWzpYLF/BjoR6Si6ZgumwNxr3bLj1lT13YwWTeATW8F/OFGIUGOm690bn/Rw8nByhrt rpaUn12qgd6BztYQOQiPS+vRArt3mvaZMuCmnYaeR7XlNs6aGBt9dBJ8KXlobhk7e1xu eBVW/ys23bop+9AZGyKgz0Ez6Qr6AcpSqALdE7hE+rZ3XwaRe4rlrOCTK1293tNSzsed UG3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=mwhYzltT; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw18-20020a170906479200b006da7d823fbcsi9959417ejc.558.2022.03.07.13.34.27; Mon, 07 Mar 2022 13:34:49 -0800 (PST) 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=fail header.i=@roeck-us.net header.s=default header.b=mwhYzltT; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241050AbiCGPMn (ORCPT + 99 others); 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 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 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