Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4361763imw; Tue, 12 Jul 2022 06:45:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1seIR/b27WPtK8mUAueq9LqUiSWvK1UX4a3HmQmgH9JZ2lKduz0rcJDArSwugl4z4EGyS3l X-Received: by 2002:a17:903:120c:b0:167:8847:21f2 with SMTP id l12-20020a170903120c00b00167884721f2mr23745972plh.11.1657633515432; Tue, 12 Jul 2022 06:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657633515; cv=none; d=google.com; s=arc-20160816; b=0cMB7nm3AryQYqQThyo8J78RWXSabY+x05oGLptsW8hdAfS/7nWa6K8t0GHadryFzh DAIjz1ao3Rrt9wuOfRJYKCpCs9jq0+6vTlj7OlOLs5AFef6sA1VDcLzGcFknKgNpUlqe 1ukY8NxLRK3d6VXVIPixXL4N7mCgrMixt4MnZl61/TO59aSI8DBXXVdPKUwCpiBoylK4 CELsLKXKR+SnhoNyJJTq92gdwpm6FrmBDfl9e/KLEJ2WhOE1e+L83OoBQVRVH+ZKvF+W k7uzqh4cE0dEeaiaqbKyVcgPhIYbrwYHtp6Wu0FvwNkI8y9WgGuJ0k8//X9rFiKZ98pL VGzQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:dkim-signature; bh=B3aaFPCS7vGOHjN5dK09gzi8+XKJwlcyQXccy2uYk8o=; b=zMpfAe0cydC0fA4Or2MTXjSBzaDNyG9acGhs7wuY73u8Thn2++wH1E39LAIjW5559w ray+MRHIma4wzEi+xkDTuTIifAMUzHnFmoUDUJAOTx7KUE9vPd7xgFlt1f4/cVzyzP/Y uaP/LVpKY7gd2+GAgznhqjlgTSitOBLtAox2mI/FfaBNNwwte1PoGkmmfLyq2C3BXZdE /1194qZHnhBuxeTwmkTUeCEA9blyHXK7Te84vVUbZlZU/4QABpc6eWmTw2nm9YrxNVTP JDG7sxHAg3o05iBpXXW2TOG34XkjCVRsiEbo/XLcTh4ISgyzPKbgPuUlGdIFUSC1pYZU wLUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZCXktgbe; 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 f3-20020a170902ce8300b0016a16419961si18887341plg.55.2022.07.12.06.45.01; Tue, 12 Jul 2022 06:45:15 -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=@gmail.com header.s=20210112 header.b=ZCXktgbe; 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 S232585AbiGLNb1 (ORCPT + 99 others); Tue, 12 Jul 2022 09:31:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231881AbiGLNbZ (ORCPT ); Tue, 12 Jul 2022 09:31:25 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0893B5D08; Tue, 12 Jul 2022 06:31:24 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id 5so7249041plk.9; Tue, 12 Jul 2022 06:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=B3aaFPCS7vGOHjN5dK09gzi8+XKJwlcyQXccy2uYk8o=; b=ZCXktgbeDUwYBalguqqfZgziscEy8VsThdXbtTHirW6covpv2JWFMPBq+F3C2G+FoQ qtye4zLPApS0xJHWJiC7J7ml9RRNIVGwBDLY17IAcR9bgzk0iemU3KZ1hxb3wbgEnnFu tHzlGBkNWUIxWWMF7IbRnWDdX+wAuq62BmfUEwFVfRVjvESRQIInTguaIeO/ymRMDwb+ tB0uwlWyB6kjjf5/PX7y/RIP9iTxEKKDgu8bvB1kOq6UdGdZW92OpyYWaNW6XRRrtZDc 1R8Zf3qxHSJTWYoNxdM7n5CQGNMFe/PDxo4yL+i+0UBteTxYBCaAoCfX+Nc3iP9fapPr RUNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=B3aaFPCS7vGOHjN5dK09gzi8+XKJwlcyQXccy2uYk8o=; b=a9x/tKiDU3l2VpgdWeLDBjVupriG2dXL2nMUEkzFJcRXc+HKIjQWtTwy2zCIfub6Hn t2dJcMloOxaxG6dOD69PlSBndjBUku801i1AqUOvVzzAzhplt3BMUqeJvj8V9yF0BSn7 eHp1UHXi7/P2Fg07JVPZCFwpbx8PAVwqRJKWonJyhzcp/HmNywcj/PmN8tFIvaqdkY4Y dUhq77lkBEy1dNbT65bQUnG9KWufIj7QZZNL9ZKjmGiMsqqirw2jqVJmCveoUCKjGhjT YpD2/mFh0gx2Qx5sHWooF03Akca6Q5KQ3wGlxGwpKPBlU03J0sXPCD5JqxFhcYCw+5pl 3+xg== X-Gm-Message-State: AJIora/geYgLvRTK+9k2R/U74o0lK1Ec4khUNqkLFTh0GxAf6Kq3LBF4 OzBSfwYO8bbirWasv139bTg= X-Received: by 2002:a17:902:e841:b0:16c:3053:c7e6 with SMTP id t1-20020a170902e84100b0016c3053c7e6mr18781277plg.163.1657632684220; Tue, 12 Jul 2022 06:31:24 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id c204-20020a624ed5000000b00528c4c770c5sm6757058pfb.77.2022.07.12.06.31.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jul 2022 06:31:23 -0700 (PDT) Sender: Guenter Roeck Message-ID: <0bd85140-f006-8b29-0a43-500733f1654c@roeck-us.net> Date: Tue, 12 Jul 2022 06:31:22 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v16 1/3] usb: typec: tcpci: move tcpci.h to include/linux/usb/ 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: <20220712090534.2783494-1-xji@analogixsemi.com> From: Guenter Roeck In-Reply-To: <20220712090534.2783494-1-xji@analogixsemi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 7/12/22 02:05, 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. > > Reviewed-by: Guenter Roeck > Reviewed-by: Heikki Krogerus > Signed-off-by: Xin Ji > > --- > V9 -> V10: Rebase on the latest code > V8 -> V9 : Add more commit message > V7 -> V8 : Fix Guanter's comment, remove unnecessary explain We are now at v16. The change log has not been updated since v10, making it all but worthless. Guenter > --- > 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