From patchwork Mon Oct 21 12:19:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjian Song X-Patchwork-Id: 13844062 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 D5C63D15D88 for ; Mon, 21 Oct 2024 12:34:37 +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=t+WQ+FqP4/Uda8y41wT7Eu+mzy9im0bjP4dL6q41EZc=; b=pk0CvuW8sYja9s4Nx7utAmNb16 pzZdGLoZfgossJdgeS8mYfOOqLtd1JKWSpzGqroa6e0EhGdOCKmQSkFD0vhHjBR1Eim2o/hBrqO+R DdUAT/nBxVRg+ga0WBA7PrjZwNkVMTKJm7N3bwn/BGlVA4YOAomdhHcgBUC9Mnoc1uywQOO1ORihZ 9WwhKKrmm76uCPzu5zLNGGcoc2zcssN2gFh9Dc3Y/Vumh7IoRndxfBR6o4vFKTGI9mOILjG9BGDhd 8xSZtAIHvAp+1+8eD3sMq5LtxVXAEFoqed2OJfEbKnVD6gnFS3AkVVtEzCAlt7pk3Ne3os06rD4vg zX8J6z8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2rcA-00000007GSg-0II6; Mon, 21 Oct 2024 12:34:26 +0000 Received: from mail-koreacentralazlp170130007.outbound.protection.outlook.com ([2a01:111:f403:c40f::7] helo=SEYPR02CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2rOI-00000007D0l-1SBm; Mon, 21 Oct 2024 12:20:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HZ+nl9LstLygqZ7dzqg8tpiHKjBZkw+CnWAnaC4fLGihDLcrskNR5sE2QTVmV8QMdbfIJYIwHTwFnY7b9DGu45BIciiXIcKqgqp5sK7XJuNV/4JaAewLwpAsVEFsFZvCkc6/Ee2N+HzlrTv5r631Hksi1glb6XeH/J4EN6GObGqm8bL/S+vvM7i8vHKF++Xmnx064RDXnjD53lW7D+hSm4L09vsxMB7uKmM4bPXyRyn4q0RztLlp9GayH672HTNOC5aSe1l5/ABGpovZ5eEgIfhv0sUMdy6HpyHMvK2VWBkuSbu7p3FCY8iMNkng8pOB4t76Uh19buGzXqOdVEA2JQ== 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=t+WQ+FqP4/Uda8y41wT7Eu+mzy9im0bjP4dL6q41EZc=; b=tQIbJSrH5NQ5fr05Dj6oTe8BzsHJnxUvHat9A6Usjx+cAjWaj3JlwdBOJ3k1kXYd/TczENbX7w/UsP7hMqtUYJrCa7NrnnU1ai+zCRGktqbOKOxiEXxp+v1yUK37jOweZkS+Wp4dSx4Bq5k1B4gix6Lrgb7cAMSU8yZTP+G3LqWGo/GXjvzLIhInqRq3Dny8w63gFbWExNjiHYP2uzHz0Bg9hLMkAtNxbyng4TC0xweFaUDARUNLJW2IrWxPs3PwaHSp6X4Kkd4Yo6AqSPQvnauWMr6fUN0qpDcbHA+UUxZcYestE6Z7SN/c1EoQRLQ4T2PTyqU0Pd6/WgMrnSNFgQ== 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=t+WQ+FqP4/Uda8y41wT7Eu+mzy9im0bjP4dL6q41EZc=; b=UDlGGXeTrZa4/tlp+Ymn0PCIqcoGBrSx6vSXcs2Vw4YuMJD9+muQNAUKrzIh/KvxKNpShYvgt5fdIj62wmtQkQnWQD40pZhcYILS8hmIyo/iHCuMTPc0HZMy1sVAtAcK7aE73cxCz1p+QzuObKSWJ3Ezp7RfLNu6dyXAD4z0WRk= 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 SEYPR02MB6268.apcprd02.prod.outlook.com (2603:1096:101:d1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 12:19:57 +0000 Received: from TY0PR02MB5766.apcprd02.prod.outlook.com ([fe80::f53d:47b:3b04:9a8b]) by TY0PR02MB5766.apcprd02.prod.outlook.com ([fe80::f53d:47b:3b04:9a8b%4]) with mapi id 15.20.8069.027; Mon, 21 Oct 2024 12:19:57 +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, Jinjian Song , Jinjian Song Subject: [net-next,RESEND v6 1/2] wwan: core: Add WWAN ADB and MIPC port type Date: Mon, 21 Oct 2024 20:19:33 +0800 Message-Id: <20241021121934.16317-2-jinjian.song@fibocom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021121934.16317-1-jinjian.song@fibocom.com> References: <20241021121934.16317-1-jinjian.song@fibocom.com> X-ClientProxiedBy: TYCP286CA0139.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31b::7) To TY0PR02MB5766.apcprd02.prod.outlook.com (2603:1096:400:1b5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY0PR02MB5766:EE_|SEYPR02MB6268:EE_ X-MS-Office365-Filtering-Correlation-Id: 778ead96-72f5-4f2c-d286-08dcf1caad28 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: cfty1H/+MAzGkXp0wvR/XJwXn+8KT/KlH9twSoIMb2eHC8Jn77vDp/mKN+5M+wxoB8R/KrEshjLvW4mWNKapDVTzNI9edFTu+vWXXf/Qf1LdRNDY6fiT2fjIc6dB6gy5L/a9QJpZe+dLXCS3N38jaINDtTM0CD2/pbuHVg0FE/x0b0q+Dq2hlV40tZD0PER3nY5h61J7YHjdIBcwux+kLtJvJFJEobsvUc5dcTMSSVIgw+KIS8TwrHLwNc2rSs/WUB8X4ITiwf1fT0G84oTlKY+Pvbhba4Rz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2e33VkVR5QewV0M+Zl7/F4Xrh/12nPvDm 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)(366016)(376014)(7416014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ChYKAvkG2zQ94CfMwYDRig/eoYAG7me4azYwjZlqrpkQtvKaOMShXIzn//P4gToJgv6kh67impTQYElfV28dAygexzDDoxnhJiLx31wsdpMotq1ZI6xrKEmAGArNRcryo4mE249ypHJtkNqqsibt+6OelRa5tkEtE+mFtHQZMzadEIMN+dQIBPTjP5tPNY56EuUupjxL4zFGyViOgeuT1HpBNw/xbYn4vnrpDl+MeXRDlU+v4AFnamKgiakgmxAzgQ5d5fMXN3YQADdiRbklJ+sGeqMfzHwFvilAlFNqHm/bfY2dN/PSiBrOrbQIYzZmyVSBxp5Ljt5ppz3vY9R/qVmIkW/Ilb15x3SGxfyC5nxZFetxWg/WmMJ6AsYXFU3kZvxwf0jmgLBCf+tgits/AeipT+u+TE+R2Zzg+bGHUZ0Rs4ZEaZB26wqIsFfh3J5K37H27BbDPQkVEwfBXztdItzbULRTyaw8LlqcZw1vNmYUjsd70f2Ulu1Cx9Ayj/Msgg48t3gpsJNOa+pz+kaWiFLWgBy1ESABhUVH3s3tXMk1cXphY127L2C8x1QXrjp8AnHYyg4pkXDuKxMP7DkEYsugP05W5tWGObx1px8zhKv0EgeMvTWIMG42E8pJw35MRkqCDWZIl22/sBiwMWOGCjE3WaJZZpztuFI/XYx/tXWi0trkpXfC1GNgEN154a/S0ITxVa2dQpdkdhE7uQDvNqamOIPKy2j/iFDDbl9gDBqRQfgj64HDiiw8dVMCuiVsj0K4cH/X/jzqDmzeLQvOK7lfI7DTYzoIg40S+LPlOFJZtnwP00Na5qlBv7eGSzlw0OKK5hDnxC5J7O2hwwrQG+zGrpBuUp2sn713xZKIF6DEggZMJEo3RxB3MDwA5Z3hXLJGSNeKFaFalLDyYpeUMfHUDZIue0ejAE+cshxwLcMv5EGe38y6d94XVEBtIwjzJq2PYQjW2GmYybde7ozZl4KlmfRycITSdeRR2g15+Vrq3cKNqq1NU4X4eCUaIp+4UUyDOd+d8R2rlR3xW+G80hwzpq6Xc2y6lkgq/9c/Z8Nwiq5vdyMsqv2jFee9H1Im1X90moFB4N6PAB+oeUj6qdL9S8vhnePWvhx9STWx5Tn8BilGljVP/PHUSaihAWHXiyNITEnRkU7HnfiaElXAHMB+WRW7Z/n0hchvwYuRi/pMLXtqU9DLXTU1lKR66euVE/rQ6tb6OyvzEARIUSOIqDaFdOkIg9hx+JynF4xiYiYhdXVv8KngPnf30Q6wHtAC2KiZ0FtxorZqGk8OPKdmhnimb1PJo8ONwY/7WU7ZuFrD+dXtwNOcjpsJLf5HdBk6dFSbWUqEdWlEqzllVIJoEGS7GlEompKFWnn+TVvwntcXfUDnfmN8E7blMH52R0htymZU5tJcSDPdOceXMn8yQKdDgbKyaPjjLAeE5Z9eJsH+kpx5oFLxwvx3Kwv4ok+y2rDfvfjm0SAd2KvteaQ1D8sD8r8emphK+Y2YFvdB5gXrVz/GnYZ7wWizzk12JJ+f/XCoII5uovabEGICeXQ0KvX/tzBI5rjiRGNGBn39EXRGRyYHSnP5iXsLTgxpETgCLbQ17iEzAwMvnXznSr0r7w== X-OriginatorOrg: fibocom.com X-MS-Exchange-CrossTenant-Network-Message-Id: 778ead96-72f5-4f2c-d286-08dcf1caad28 X-MS-Exchange-CrossTenant-AuthSource: TY0PR02MB5766.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 12:19:57.4472 (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: B+oHvZjiv/vB6WHPNYwXRY2GhwIxfTV995rY9E1EE0V7zdrcSWi2ThN8WjKEj6koHRxmLfDjdcC1z5qwWwyuX8EgEpDcp6fGXeD6PYapE0E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR02MB6268 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241021_052006_419366_94DADD30 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Jinjian Song 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 */