From patchwork Mon Mar 7 09:09:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Ji X-Patchwork-Id: 12771390 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 60641C433F5 for ; Mon, 7 Mar 2022 09:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235234AbiCGJKv (ORCPT ); Mon, 7 Mar 2022 04:10:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232692AbiCGJKu (ORCPT ); Mon, 7 Mar 2022 04:10:50 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2132.outbound.protection.outlook.com [40.107.223.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FA6E2180D; Mon, 7 Mar 2022 01:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WYAptrAT3xQszkx8u0Ul7GDXIV23tgi10/SHm13AJxZdWiNpTv2eVEiT6nJA1vTQnAI6Xmn4D+VSGkxSbcXagzIuCj5X9oaEgMIGH26qw80r/Am/4fAxd39GTRsenk4U8XgQQm9EdX0KR7+OvBBe8kS9ttFIlCNr5aPXn2V6G0nwJMoWXGfLyWUg6W3ozHuriqSFYNO5e/hGCCUzjSOZtFoAXepjb94761ctOyrDngl41b0ybxKFDSKBjlXy4GazeORW+UTNmQ3IKLWKX+QDSp6SmMnmUGUy/BZ6OYj8yP8VjYSX5DyrmGuR2RKD8bL8LPevD8EuY8qyt7s/42fBxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jdcf4eTpe1oL9d/yo3AuI1OmEljX/2vXFNg4Vm3U7Eo=; b=XXY2Lhd97TIleKxfEZ8SlmvKNdzOX3hC271L8qLxUi+GpPb7uFRaWFEFkywqjO0wGXPFZUdvxjr7uJxS0sQURAPegbv4nXV9HjnhYi0y/3JmXNfvPPTotdIbicvwLaLRg6gTERK/1l8p8ut7a47DZ4ggnMb1nvajHgQHWn/yt67S/dX1Ydik9YEotS3GWgKxZxsk3Mf58aK7E6wQAixVTMHEqHYmuLG5NW6sjKVRBP97hAe25Xizma14EdkTUYqFthLTs77bYTxVwch0BLCDKiqPXOxfV0mWxDm5YRJVBnhTFefZU/LKEXRIibvPnCN85LJEPfP0mWz0iHlXAqME4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=analogixsemi.com; dmarc=pass action=none header.from=analogixsemi.com; dkim=pass header.d=analogixsemi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Analogixsemi.onmicrosoft.com; s=selector2-Analogixsemi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jdcf4eTpe1oL9d/yo3AuI1OmEljX/2vXFNg4Vm3U7Eo=; b=0zHBBg0JFB41DF+RAqF50u7Js2P36brTJtW/d3Ig6RmkhGUY6i07mPq72JClkxJBRwZnUMAvv80ThA24POWlrNNrUejTPU9Gnikrde/bWXpXRGlSFF4Qt8z7hp3zbGQ5miIHpUD+l/LkS2nKvTYDOMjyz9duzmCWGXGtoh7zZSU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by DM5PR04MB0173.namprd04.prod.outlook.com (2603:10b6:3:75::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.15; Mon, 7 Mar 2022 09:09:53 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::a865:6d10:c4a9:1142]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::a865:6d10:c4a9:1142%9]) with mapi id 15.20.5038.027; Mon, 7 Mar 2022 09:09:53 +0000 From: Xin Ji To: Guenter Roeck , Heikki Krogerus , Greg Kroah-Hartman , Matthias Brugger Cc: bliang@analogixsemi.com, qwen@analogixsemi.com, jli@analogixsemi.com, Xin Ji , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v7 1/3] usb: typec: tcpci: move tcpci.h to include/linux/usb/ directory Date: Mon, 7 Mar 2022 17:09:26 +0800 Message-Id: <20220307090929.701137-1-xji@analogixsemi.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG2PR03CA0114.apcprd03.prod.outlook.com (2603:1096:4:91::18) To BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 368efba6-b5bc-4da2-540e-08da001a3d56 X-MS-TrafficTypeDiagnostic: DM5PR04MB0173:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TB+4iDWCtWsqwt0xVLE4RhYZrifpkCZljOpn3LmDOjYCvedkjiItv8qlS7Un+E9QW/t9eTo0VIGT7kdaLLsyrtAlbXTpNBqh9AAJYIyj2AqiJMFLYW+m68bq5Xd+m4p1+LfwyV1m+ttsnYfFsqMxgMvC6Ko/Dh/Z0e9sf6z0HW3SGVTgmwtBBy/NBXCycZeEJFOAjA7y90WaJU0czp5gj7DR34o+WLlPbluAWDca4KiAxIG04QKJr5707v85uIh55j9PvHy48HjFQWDxjrHS4B4UgSiacgWcSz6JwDCxfdEN4yJxKFypjfP+dSSNsD04MN4vo1+TDscapWG1YxlfopBcEbU/aW/2lzZI7nD4XsLejca76arcqiNYrlHOcNW6wogvEqA3g4/qeKema+lX07T6bNQhdrz6jsMFZ8epUfXSQmqk2T1Vgs+sxEya0B4yAa62LaxJX0dCHI9dKawT+dXNugmvArSvV/gRl6rWqMrU2GkpIh3MVYQahIafWCnJHn0FHBOuUz2S9lbe+8hQrivNzgCjxUpDeoag5XiZCDWqJB5Be5PRz/PD6kLKJC1pik8Q7NRHtYuOgbKWX2mIaOZKf4IgHps2zosDysN0ZxdWAauTfEbxE9/Q6IKPqGWn1zN+VWHJjM39OL/eZTVorAgdeLDOVrAzc5H69qUYPBmMGkWqfgRG1ltMWLqOaj74kI084BEjUJzh+7GDXXEboQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR04MB6739.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(110136005)(26005)(6506007)(6512007)(55236004)(52116002)(8936002)(66946007)(6486002)(2616005)(38350700002)(38100700002)(6666004)(83380400001)(86362001)(1076003)(36756003)(498600001)(4326008)(8676002)(5660300002)(66476007)(66556008)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Gd0zzXdA5X92K8G6f7YWeRXNs9N38GhRBRk4evgXP1V3tgAwV16FL5ZSMs+qnj5TEsQ3+g8H0zvFCsSoN9rtfjCt703/sxlznTDwTPrfQm+57sF+hQ2Ra3Dzr+zMQE8OQATOGY0NbC/tRP/30A83EK8sLo4Ffq5EQH1PpyH8lYBPkMJxTbeGmsfY1qVY5EDWJIeClIQ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/DouL9VmAO9KsxgKuYE72yX69w4psMn2MP/xgFFbbPg9EXILMhKNpFwde/RImtzYbXjYiy7uAnJRaP/i1+9IITWQjhSMoSJU1Z+LtjRIYpdBYSvPsoESZYQoBr+OYZm5mgGOwsrR96aMXe6219gvaBMAuayDHW6qgvLgIcx6Al8rkU8wWxWqjAXcgmhVMYAFc6wCjb4Cffmz7XaiiG+U/O5EkvQaJQxKiXN++buxv+rcnpriOgUkHpjuD3wunSHOhayp0FsyABUaeR6/U93GYQcwte6le7DG8ZJcj7qqsHV5eoM0fn5yssCCbKnDFfcfmfokjzehOQUmeKxAEbNYw7XmwK6hle8pbiHsu26lNmj3ClhKG00N80giCfqtxQ= X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 368efba6-b5bc-4da2-540e-08da001a3d56 X-MS-Exchange-CrossTenant-AuthSource: BY5PR04MB6739.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2022 09:09:52.7998 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b099b0b4-f26c-4cf5-9a0f-d5be9acab205 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IqiD3ZEudjHZSFpkol8T36tSRBKFjV+ikuoSoQM25VrKnhYHPITOYb9W+gdZoX+HqxbPq48Tl6XATun1KLNiCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR04MB0173 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Move tcpci.h as a global file, better for other USB Type-C driver access. Fix compiling error after moving tcpci.h to include/linux/usb/. 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