From patchwork Mon Nov 4 09:44:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjian Song X-Patchwork-Id: 13861154 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83B44D132A3 for ; Mon, 4 Nov 2024 09:52:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2CVB7DGPsHwnsQCoXB7SBZjklEmEnihl9vo2LqNcsog=; b=CDeIg6LBSixyv4knz9u+iq7Ayy KfKln+M3qCqfC0RgH7hw1/G8MeMRLC2747vSIh02MJojjbYYL2YuofIMYVEfDQEdpWMdEFEv1qVLp fdaaLjrSo6L2k8YOVJCdrFSGDHkp21zjOBZhzw4AVJq/bCBTwuZSVJ3SoaqhF0YEVi101wj5lJIeM bqJjm7wDKIJPrUowN96GdKhCWJvZPQewkOXG43SmTJy5UYmId6Z0DgS3SM30XLUkPL2qhOZjW8knM /6AFW09sXE26kb0DqgIciX81pyJ2F20MexWQO6I45TaCNdt7uS88IaQ5W+NP/hRks9K2wBuJvi0/L HqkPDcWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t7tkm-0000000DDnl-2Y8Q; Mon, 04 Nov 2024 09:52:08 +0000 Received: from mail-psaapc01on2070f.outbound.protection.outlook.com ([2a01:111:f403:200e::70f] helo=APC01-PSA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t7teF-0000000DCKz-1tuG; Mon, 04 Nov 2024 09:45:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QP6rOYxolem7QrnrNN2W5lvpEA1kKxhdR1csOxH8UpWmTHixFzGXFsy75nyztSSEMMUJleGuzCtvgrPZDsMaH45kBFUOmybdwszVuGucb0Gs45R22tk6Tf6gBo55dG0FCh8aIBfflC/YNUyDJmQLpI+pka1TZ/rzcgJu2hkhNG4I1aF+dDtunSm5A0NEZtPcrP67qziaYsLm4YRFyQSVbLDtcHy+sRAu/OBURLbRE6OWCwhQ2uL3fwl5l3MF3vRoFGqic+0VaBP/sNtaF5R96SCwRT9it+isoE0mJ70+7L2QYjq2TQM1EUZECJj0ZZ09jBmhU6ZqftW6bqBfYifbJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2CVB7DGPsHwnsQCoXB7SBZjklEmEnihl9vo2LqNcsog=; b=vn4H09n8pOdvaWmFV3bnyNs+QVLMb4V4ItkhghMxKkpQ8Wm0We640VYW6enQOFy+eT599QWqGQg9UpEtlsqs+j+rGMMrBHAfqRMoiZ4YfJOs9UpY7PqNbEIQTghVeStDcGtt317YNNzZrctTDGC2BkNsHZfg9STvRBhDB7trtJG5e3qHaa5VPpyWYzNgpYnvG2+KWxvearVwtEZKtZeBGbzzRpGgdJAmPmGdZFHIWk5CwEnc0J90/NXXPzYJdNH2t1RcFuAUhflspQeEpztEmBWb9Z/iNJDG20X30BRM5hWJMRsaeS74y8fyakVfuVErPkigK35OxQ/P8x50YfNkVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fibocom.com; dmarc=pass action=none header.from=fibocom.com; dkim=pass header.d=fibocom.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fibocomcorp.onmicrosoft.com; s=selector1-fibocomcorp-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2CVB7DGPsHwnsQCoXB7SBZjklEmEnihl9vo2LqNcsog=; b=JVTkm9mUoN1ZdlET3miYA2r3NSboO8nVbV4+xkcDOe2Rzu+1OzfrnDrqbSaYzHTh7dtPuLHVqtO4aXWq6ihnNB67O9cK/61QZRwSSMo2/hiZpBdTTOIUuG9uJyFP+D+c46BHZkEUe/Drl7nxrPImELZQSSZffJwLuxavMhpLVPQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fibocom.com; Received: from SEZPR02MB5782.apcprd02.prod.outlook.com (2603:1096:101:4f::8) by TYZPR02MB5764.apcprd02.prod.outlook.com (2603:1096:400:1d0::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.28; Mon, 4 Nov 2024 09:45:13 +0000 Received: from SEZPR02MB5782.apcprd02.prod.outlook.com ([fe80::4843:bf84:bd17:827e]) by SEZPR02MB5782.apcprd02.prod.outlook.com ([fe80::4843:bf84:bd17:827e%5]) with mapi id 15.20.8114.020; Mon, 4 Nov 2024 09:45:12 +0000 From: Jinjian Song To: chandrashekar.devegowda@intel.com, chiranjeevi.rapolu@linux.intel.com, haijun.liu@mediatek.com, m.chetan.kumar@linux.intel.com, ricardo.martinez@linux.intel.com, loic.poulain@linaro.org, ryazanov.s.a@gmail.com, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, angelogioacchino.delregno@collabora.com, linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com, corbet@lwn.net, linux-mediatek@lists.infradead.org, helgaas@kernel.org, danielwinkler@google.com, korneld@google.com, andrew+netdev@lunn.ch, horms@kernel.org, Jinjian Song Subject: [net-next v8 1/3] wwan: core: Add WWAN ADB and MIPC port type Date: Mon, 4 Nov 2024 17:44:34 +0800 Message-Id: <20241104094436.466861-2-jinjian.song@fibocom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104094436.466861-1-jinjian.song@fibocom.com> References: <20241104094436.466861-1-jinjian.song@fibocom.com> X-ClientProxiedBy: SI2PR01CA0008.apcprd01.prod.exchangelabs.com (2603:1096:4:191::10) To SEZPR02MB5782.apcprd02.prod.outlook.com (2603:1096:101:4f::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR02MB5782:EE_|TYZPR02MB5764:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b8d4c42-9943-4689-13f8-08dcfcb560ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|52116014|1800799024|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: /zaCN5Vplyu1GS6pbNDgqPbvIkdXkYVSX76iRBnq06HVm5Hm7FFL0wW2y1IHkF6yyZEII69GkQOtYamQI8J7f2LDntU5eMKkI1oI0uMck0/6hhsMaeyOTTcziovdxMeLc+HYWotw89Wqw81mzuliilx2lz3tORafQMC3/Hb6W6vqnYnKfFeECDL7aSftmfKQUyMbUOmizYFXQ/92qf39+LIe2JQ5/4ekxUmDX+nAX4nCM0c9MRP0SfHZ1CM2WoxWm2vn33VAjkwCvaZf3MF+InT+eFTbzbqekZlKAtO/bSHsxi8AXbGO4GLD8MUL28uLksw0sKy7hAU7X+6vOO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UAIeosvQ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR02MB5782.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(1800799024)(366016)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oLMH44oJ3YGzh7xTv3i7p8yPibrULzZWZ7u8w1usebdfkWHJcdmpD/m17BSFv3xA4gA0fnqAB39bCC8fUXXYrtHe20cw5/KgOf10Za9grwYI6OiC5jRll2BGYi2T/06rAsgnx8ZeG1H18jtxivbRSu/PzOVeg91cqxZIsamQgfSrzL9R2HxEG7nHs6whcTWmBTI7SzmnuptHCnPTcQkpNeJXHbueWrlVq77jQyAU/kggCWBMhLrK2gF0EeT86LJkWWevyihJP04ZHvlSERgCeIpxNUeKmxlxDd4bNmxJfNOSSZ3wqPlkSJ582JDAy/wQ0AbexI/EHqH6ca2jOP48szCvwg90QOonbjEXiAYIUcf/om3UNp3PZMho8izDsyCMb7oigKi4IHSvWmEUzU3fMvMSFng/OIoHuGpHE6HtZJ+Hrj4F4gORMpqa5oYU494qTnPgktXzeC0LYe1/D+Huf2lJ/uql7tKGjqds2c7pXbpo7A97YW1EjGSu9nf7tYULI80Cj+I+fWYZXiWOcQWY7JGw0Y7UfIXnmd9sY5DO93WqZtZawGo41u4/oF6Lhgxk4GUOnN2k0uhf9tX4oiIeT7TxvZMQ2qfhjGCdTUsvXI70JFtObXvYYlGSLGsRnfWDdYv892573zsBC9i7bRBdA3miclqPxx8k0CZWtakwoOkmRr+D9F5oS+w7oqPwc7NokB8Ht/OFmANESCXBnrpQ74PCdBIckCVKlBZGX6mRnvLMCf6jnT/v0u52dibkSis1YdzWHDrENvnXw4sO9eyAo2y5KxKpIck9YJGsxvy4p51Y44x1eXo2EEvqEXOHFfq8to7cPoN2kMSG3CI2rLqc7roRu/Kd347usbkQc60up73fFXnkwmtwzmuI4WpX364CKm4+6YJbDCZ84Q9FiEgI/ZJUv62CBF4FlepQkQEtxF0Rbs4B6A8aAoLUgK1dQPO0L/o2GzEl+zlGs+AgHwMWL0a6fqoy95yy9uAt0Nbj0G3sRBzal7hx4w9W72A9ukEon3p1Io+J99LgNc5P/+XS5n9LfV2lRTTPtG/JNUVl6sz4uAMCcQ5D9TqgchbD7A8aBGHeD1G66fsPFDZ+Qx0tc9Nkgy0IaYy63oXyNL8GDvq2CVUjgPMnIHCxQ/+yAp2K/nwM067UXhGi9JyVGQqgZotNKH6toTbbqrBdL4tuod0rxtCYm/ddFpi17vGv9/veDBPiUfbsfC9V34fxreID3DMWqRe89YK3tZ79h2oS6VX0Q7rhJ8u6gOp81r7Qnu4jlWKt1TlDt3tMv2c4yAuL4Ibcuv+P73Op0td6jY8QzeX9qSMVFC3KWA+1SdSfilCQiVOtKGgrxTbROLxadUsNJBEEWvvcgQE85MHpuOM+xNzQCVwv69qb1aHIg2fhQf5sHU5uATCQpFrkWJiPzDMC5Sd+v1PvdIaK13s60YdzXlDfoepsU72tEj8bKPbfjIbsBw1Tns3zs0eKPs675/Z7NaAxgtckBA41XozbQYymXC1neEjqYDW4GSOdl7WbTLOg9M5vVgL89yIvbfHeXJI5npuC+ZWl3jMub5mOmVPP/B5Et3t1FbFSdF49vRwFzNY/j6YFaoRs3TYKRZkLFm8jQQ== X-OriginatorOrg: fibocom.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b8d4c42-9943-4689-13f8-08dcfcb560ee X-MS-Exchange-CrossTenant-AuthSource: SEZPR02MB5782.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 09:45:12.7409 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 889bfe61-8c21-436b-bc07-3908050c8236 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w0k3TlZpNU6g1AtAu5F53RRqTOy9bqGNX/6NHTRs0VTM+pM5ng0zoZJ8m39svQWhy/KRQKh41/u0R+v/rlOFtd8Zl0RmB6B2rfDc1vpsYw4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR02MB5764 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241104_014523_542291_2EF3C1EE X-CRM114-Status: GOOD ( 10.31 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add new WWAN ports that connect to the device's ADB protocol interface and MTK MIPC diagnostic interface. Signed-off-by: Jinjian Song Reviewed-by: Sergey Ryazanov --- drivers/net/wwan/wwan_core.c | 8 ++++++++ include/linux/wwan.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c index 17431f1b1a0c..5ffa70d5de85 100644 --- a/drivers/net/wwan/wwan_core.c +++ b/drivers/net/wwan/wwan_core.c @@ -334,6 +334,14 @@ static const struct { .name = "FASTBOOT", .devsuf = "fastboot", }, + [WWAN_PORT_ADB] = { + .name = "ADB", + .devsuf = "adb", + }, + [WWAN_PORT_MIPC] = { + .name = "MIPC", + .devsuf = "mipc", + }, }; static ssize_t type_show(struct device *dev, struct device_attribute *attr, diff --git a/include/linux/wwan.h b/include/linux/wwan.h index 170fdee6339c..79c781875c09 100644 --- a/include/linux/wwan.h +++ b/include/linux/wwan.h @@ -17,6 +17,8 @@ * @WWAN_PORT_FIREHOSE: XML based command protocol * @WWAN_PORT_XMMRPC: Control protocol for Intel XMM modems * @WWAN_PORT_FASTBOOT: Fastboot protocol control + * @WWAN_PORT_ADB: ADB protocol control + * @WWAN_PORT_MIPC: MTK MIPC diagnostic interface * * @WWAN_PORT_MAX: Highest supported port types * @WWAN_PORT_UNKNOWN: Special value to indicate an unknown port type @@ -30,6 +32,8 @@ enum wwan_port_type { WWAN_PORT_FIREHOSE, WWAN_PORT_XMMRPC, WWAN_PORT_FASTBOOT, + WWAN_PORT_ADB, + WWAN_PORT_MIPC, /* Add new port types above this line */