From patchwork Thu Jul 11 02:34:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjian Song X-Patchwork-Id: 13729937 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 EDEDBC3DA41 for ; Thu, 11 Jul 2024 02:36:28 +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=duN7N9TURc9wnKlLcQJnw5LloNUvtgiA3EKnROioOoY=; b=AUHokzyKxQRu7/DeAWJW7EknF2 jdR22E0F3DqnyAmq/yJhwJ4xskVTwi+j1ZcTIKvT+5f+v1lrUdnOW5dmQQE3Z+mXfViabfxlX+Mpw iq5Le6EpGCIaRBrcLedrYhF1T4v+FFvHvsawHLR54lyjwp1T2skldjfUOpxNoIihGpSGdsKCYuwV4 KZkJpzICTHyOSBnP3ebNexVtyTUbixGR2NMBq5W/Afudy0+mmip7N08BCntQY5A/jJxLm2jyFhxYy saw30A+vgqyNshwMzjdB7eQ/9uWQEAdR7iurK/wEVwIt7joFRBPcV4Umi06s8Ps+KVspVSM2/j4w8 2ZHSr6Eg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRjfY-0000000CS88-2mzB; Thu, 11 Jul 2024 02:36:28 +0000 Received: from mail-tyzapc01on20701.outbound.protection.outlook.com ([2a01:111:f403:2011::701] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRjel-0000000CRmQ-0vXW; Thu, 11 Jul 2024 02:35:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JG8NT/m1VwWuRrn51nkNtIyCfpOaD6ApxRxMkYQ5T5KNF4BVP7ethK/+es/avLWyx2CavLlMiQBZ7mHGosqZaTTXqIKQHjgBuqGi+Pyh7SiO0W0DLiTiodxzQ1ziolHh15ezgGKVkvxnNfKkmDXl0Dcu810RBNkaoS+PkM9nrpakm+sc4CTkss1FP/gLr/N+6DkAc9jdHPr88Cf49AC1uUvAjZQxeYoUuQPKiLdrrk8HTyCw7RM/4lt7cZ0LUmUVj4E9IIf4zI1G4CQRfMosBJpRlcPweuZDjt108VPlh3tPFOktljNyqHmTIpaqvZGOod+JACJETewWfc67F60/Ew== 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=duN7N9TURc9wnKlLcQJnw5LloNUvtgiA3EKnROioOoY=; b=OCxtlg45k0iPYZ/91Nxor8tKFfVYgJvobxyvPdgZKEQg6IoospXVpY4i46qlIHSerJm/cO2iOlWJdBQSRSLF59IVVijDxgn2UQweO1rt082vjXUYjExj7Bk+sF8Hfg4trT1C6P8zI/KkuyMm+kGellR/MvqJrlIHw+oUJBsxW64UU0+O3M/hio0R0eNj2Px0NO5Q45YAH9Jm0J10viPaHOxjPxPV4ucGVzy0oVSCluuANcJ05ExmLm3EhPzwqIPpS+s+jEtzP+UTdSDdfITDLelU8TfNYKVaiYP6xdniZmPp/0+Wqwst5POwJZV8sJKsrawhjNf7OQ9mCCfwlXBKWQ== 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=duN7N9TURc9wnKlLcQJnw5LloNUvtgiA3EKnROioOoY=; b=Qt11Nua2/f9XTaZROnHG+FKxHukIavYPax8mOTKS6xGE/9uMK7c/UZLewxH6D6Yc0p3JEBy/tP6pIK3qiZ2See1zvVHhQOJtoVRY9PlaO9O+0Zu3/W5eZEEcrwEIcN9HOuYGuCHWAdClFKnkGa0FCrkRxPZZDi8eiYhnZF5fgQ0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fibocom.com; Received: from TY0PR02MB5766.apcprd02.prod.outlook.com (2603:1096:400:1b5::6) by TYZPR02MB5713.apcprd02.prod.outlook.com (2603:1096:400:1c2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Thu, 11 Jul 2024 02:35:20 +0000 Received: from TY0PR02MB5766.apcprd02.prod.outlook.com ([fe80::f53d:47b:3b04:9a8b]) by TY0PR02MB5766.apcprd02.prod.outlook.com ([fe80::f53d:47b:3b04:9a8b%7]) with mapi id 15.20.7741.033; Thu, 11 Jul 2024 02:35:20 +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, Jinjian Song Subject: [net-next v5 1/2] wwan: core: Add WWAN ADB and MIPC port type Date: Thu, 11 Jul 2024 10:34:59 +0800 Message-Id: <20240711023500.6972-2-jinjian.song@fibocom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240711023500.6972-1-jinjian.song@fibocom.com> References: <20240711023500.6972-1-jinjian.song@fibocom.com> X-ClientProxiedBy: TYAPR01CA0175.jpnprd01.prod.outlook.com (2603:1096:404:ba::19) To TY0PR02MB5766.apcprd02.prod.outlook.com (2603:1096:400:1b5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY0PR02MB5766:EE_|TYZPR02MB5713:EE_ X-MS-Office365-Filtering-Correlation-Id: e46f98dd-39b5-4c2c-9cce-08dca1521b48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|52116014|366016|7416014|38350700014|921020; X-Microsoft-Antispam-Message-Info: uBspYi6uWrFVVWCQ5y/3RG1FqFgO6+OgthiQG2wWbe3tTKeO+nkbXa6gGVBVFogMkJiITucwiacQqGct5ic4mYlUinZJxaODJo9jT/mEY6amBHzkA+fiShIBDTS6ksc8C+7nHeW9W4F1oC7PnuQj8BAA4FjGSWsVLYQ70ZsmrXw0KKbgzfzumPVjmIslh7GFbChoIHkN6ITF7R1A7dr5FVkKxKiXjMZv7NkCGQ1phqkj3FXLGY58jPQIRASV9VP6mGxz0DfqYXdDHXErfFRQcOlvtLCyVKEE7rmU6UTzOiQfkEIuTXG69ZCTvwnA7C/+c7KhkAdG/5Um5sb1jQj8+nQbuQKPe2FiTjAy4HsudkQXfdf/U0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4iOq8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY0PR02MB5766.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(52116014)(366016)(7416014)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: I0S9Y0RiCeFLFbiFZCoIrWpuOVVxGmavmoVsNTnviY20bAVeMVWztDSX4QD1s5nr2ohtXx520GQ2UIEyWi89eqD9jaS35wsu4T1hjTed1WwOrBLejGHgkYhlewY4kGI+yo21fN97VFhxvLj7kYUkvpzqieDmMJHx7NisWGamrjqb1yDQZsTOQbeJCq3lL+YGjJ4HfEiBzve/ArN6/mnhOBA6jGIdbQrptoedTHO3NaJVldaOej9U55gj3+wB+C3ugg93IZ2vy/UCycoEnzyP0QTaTgTWDCLAiShIBwGYzOMM0WifyvrnRPRNnAlaHjNliOONeZMAtegxMVhIZAthtap65ejCwiP981AFjDItOfBJn9hbrjvqozFXwGo7/lzuhZSehhJqT40I7Enovx3VyQCZGBQ1gAlo2B24P/AL9YK7ej7FNgF6j8FZfUjcTdHMg6g9dRskb/sn0pDSgiJGDd4Q4vGynq9ZVuA2ya78/ITVWwlJqEdCQTroFL+ZOrrWI9xy5EhHmAblHO/I7TceIS/n/Mm0Gw01B+n3ajkjCu8E26UFYtDWewJy1CBBM8/Eqm9JL0WNX70GFpJO0yc7RIsSZUj3gM2DtvOVUD/zt/vDKfNc4pfuZRF2h6IVD0W9hbYxrWBkeNW5RawiPPA2Ke2Qmt8g/CYGNfgT7q9l1OWTwHM0cKrM3IBzdmMPagscLv9FTZ0yHRGpeWSKhVWROYeWOFS9V+rf1BGZYGe1ACZvX/rShe+XHHDyjWvzSiFj0rRr4OO9OL4RjqywBbYK6siv4m9R/gRz1ABRQl47ObVHuaoHRYMbBEiCrUWHXS8NWGKuN2TaLJSmb0YIsUQQttBCJugoZ/lPeE49ibxr01ixHkXHRnGb8v9RC20TdtFFCVq8VoPTYGJ/dKigNR61V2WvIjzSk2oiKwaG1z5JF/pBEyUAtkjVBMDDQXkxiRMvhWRvMpn3rbs4jzYiSk1Vr8js11fExOnpXgLlv1q/ZjbriPIOGsY2JPqL7MevcTtH+3WlrPqVE75vG3IJ+9gKHlJJWfvHO+iMkRzlvJ7RaYBDFb7By422pF1CXct8WnL82GohxGKkBZlO5jMXbS9DkA3LENapWGtIDgqzOQDGW54Be31jp6zTITTT74Vp1x7w437Fx9Cal+EdeyGPa56MSliYuEhxEZumfqcyCu3MNuFR+T/opERxwvQasY7naAROYwZzDVQTO8E6PaHT2aHEyGL+HjG3MRQXdXeB5WbkKbRZ0x1Mhw8dyaQ4IFqrGTIQCdsUeOBIc3MW4ih0c5xYJo8p85dqLLWQp2gj9LPsLYVInqNJb9N/DcyComBIY6EIaTRUVXW1gFsZQ5z1aW3eChkI+iRnxMydq01rjhC3Io96my6FAR+B00ebKbG071/UZYw+3sl7Q8qVAlu6rb4BmsXDrX8wDU/rwLv2K8MxjipN9fQJntkCX9Wz4nrRoxiSRDA37qrpkb++qpjI+bPwP+aygr2ko7dn6k7pc3sVDPJYBdS2BMQ/1hI14mG3DdT9XmdfX9QcLHolMgII47nH/nZfJHDJn8uwODRVADpuLIAil/TMz+xuI5aAaFmbLmmuiOjkWr5FtkT3dqEJyTTYqA== X-OriginatorOrg: fibocom.com X-MS-Exchange-CrossTenant-Network-Message-Id: e46f98dd-39b5-4c2c-9cce-08dca1521b48 X-MS-Exchange-CrossTenant-AuthSource: TY0PR02MB5766.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2024 02:35:19.9249 (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: oIwJnHREVZKxdK0co6+z18VJKoNp0wCgrlgW25Y2lNjCtm0qbEn0FnX/MCvP1dVt/dOSVhJJLm9qr4kcTq81tLyR9g5qMG0+5QkwBtw3klE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR02MB5713 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240710_193539_379499_EC7F3D23 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. 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 */