From patchwork Thu Nov 30 22:44:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 749773 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Hzn/b4xQ" Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2077.outbound.protection.outlook.com [40.107.104.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9349133; Thu, 30 Nov 2023 14:44:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eKYnUGV5bFWYmO4cny2IUagZliHJ+W6weCz6ekDevp7SsynRze60mmc3ROfeRw37F6e+YRjfI/U0r/yN5fmQlr+32oKM1u6FVVmgfO6dVRbl+sRw6hjFS3rnNUQNNa6Ym44bbIACw9f6tWZzWtUfslsB2ZYgHsm87DSQISH6Loz/tgOQa+14iCNsXRAQi/x+GvczZBoPcwl3AEuNG6htTqQ86vG0N8/8WUyAAEclEr7q96XmqvnAH4E4fkHzZfBCKy1Sb4+sYjo+9TsyAWXuubJJB4w6m1ab8AdnFmY9RceOQNM4dyh2yZSYQF8Ya9161T1VjdCgHkNqnOEWehKZWg== 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=auhEZvg2cwSUCUZ37pMz5e1rjA0vnD1O945l29ni3DI=; b=NN6DjVDIXtW0TC2qdld7IC28Tc7klZqsidk+3XDfBHw/x/tGSTRJqEQQwkr5g4lYfF+EYF5HkQ3REpcuJcOnhzCSVqkRoqrrE1MKtz98JaBWAr22JPXK00Yd9Ht9GWp+JorvrKBP0BAwPAC+lXAxtF23LjPvduLffrU5rUb0EJ/5j2KVIo8XkMgzzmPMCuuH9Ls3vmAk+n/Z/CctqAyYObmYSnR5+QD2Awg83DkC1fpQGjeOtE1Na/uuZRaEGL49vvAf3LXc3cBAM9WnRXUZ7tOYsm5Ip2G8/AGK9GdmbY5de1XhunsCSmQH099i/NBRMzXl12hgTGgWoWvjqgrZnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=auhEZvg2cwSUCUZ37pMz5e1rjA0vnD1O945l29ni3DI=; b=Hzn/b4xQow/TWb1MawUY4koqOkyRNPbRvvIU1unYIQh5tr42DIoEFHyaIBhF12Zbk2DU1t/RLrH09bd/ZFvc2BvE2NDvPO4YUSJjyVlO4vgwXvw5FWDOWWN5EvB4j0/8SEAF8Esnz2TafxW3NqfYCJXtGJUdC2L2paSRahkVVdk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by AS8PR04MB8851.eurprd04.prod.outlook.com (2603:10a6:20b:42e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.13; Thu, 30 Nov 2023 22:44:28 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::95f5:5118:258f:ee40]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::95f5:5118:258f:ee40%6]) with mapi id 15.20.7046.015; Thu, 30 Nov 2023 22:44:28 +0000 From: Frank Li To: miquel.raynal@bootlin.com Cc: Frank.li@nxp.com, alexandre.belloni@bootlin.com, conor.culhane@silvaco.com, imx@lists.linux.dev, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, zbigniew.lukwinski@linux.intel.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v5 0/7] i3c: master: some improvment for i3c master Date: Thu, 30 Nov 2023 17:44:01 -0500 Message-Id: <20231130224408.3591288-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SJ0PR03CA0212.namprd03.prod.outlook.com (2603:10b6:a03:39f::7) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS8PR04MB8851:EE_ X-MS-Office365-Filtering-Correlation-Id: 149b4219-11b3-41cd-9354-08dbf1f5e916 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VspzinlyJNj8oyTcqQgimLwNv9muQLujhUQUHHIpwRc6lc0BI+bYhWX0GWeGPe30cHrDlpMt9afvEQuw7n9UzjpNwsAHRd2LydN21jxf8tL/3l5Ut+fYzCaB+O7ByTpM4vGJAy/9zbSIKEV1UKbtfuI3asQx3i0kxk5zgk4rgLhpIWejx/TwqmoLrWYfEss5sTf9Geqxu1Ru2XJ9nQaaMbD/yc+kVn4Csfx+Henu2axHgNV3W4vQ8lkUN6Iq3jYTAoxMHqm4YTH2UaLBGnVCz6gTSqF1dDQrPeFz0kjVyH8V+ZncraIOR5veccxAK6eMOmRlA7f/yFkO+zuX3LH33qgze/Pm5LVXwk1nM/Rgj+YYGT0unJ36qLCCBdu11tFfpnm18BCjz6teO7Ml7B86n8AOr7QvCRHGOc4mrzUs82dN79bTp/kDR6SlrX4/VaD3CZUtMX4TCnY6L75/TjUbGn/eSw8U9VImHOmhY6ogYgtbxKh+uluigCi2Bghgjp13S0o4gJMDrJN2jS/Zjm3WEfqJ6AHAAjYBgq4KXH02IS1PPTuJNdL8Sk0hEeVuyFi4LWNOjZCW4aLbxYXDCQz0tSz31WLOjk6cCOwmkZpM0L26Bk7tQtLPGB9cH1if1sCkzLSym7l4IlhEjrjaXjn96NIdqXCyQCjDKc4V0W/Hlr4qZIXvLswQy49XzOwi55Cr X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(39860400002)(396003)(136003)(366004)(376002)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(86362001)(6512007)(5660300002)(36756003)(41300700001)(6506007)(38350700005)(8676002)(52116002)(478600001)(2906002)(6486002)(6666004)(26005)(83380400001)(7416002)(2616005)(1076003)(4326008)(8936002)(66946007)(6916009)(66476007)(66556008)(38100700002)(316002)(42413004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?F9cjjejqQzNGLJTY8fs1sRsXyPao?= =?utf-8?q?fwxPCgjIsSjxjLztDc52cBW0w74nuqaftbmu/ctVBtl0RFxLfcukpKJR41DaWOr8M?= =?utf-8?q?fsARt+kEzcxze+u2oKz5/GGBNGk92jNkdkwUkbqg7sRyTC6NjIKpis+w0bem6/hni?= =?utf-8?q?c3+mIK386jj3wG1rBCUNrKSGGuEuAE/dHxXsWiB27ucs0UVBbsE58UY+QeWDtJHxx?= =?utf-8?q?KPOVCz5UYXinzTTgRrhvwGSDVGymOVbReHcypHzFaiwDCiYxofwrfNxsObPd7L5wb?= =?utf-8?q?wl0duTOE9lTp1JonDBzcGlZLTrr3KMZK1Cb6poOvMic4JX/o2PrqADm7kCscfs9KS?= =?utf-8?q?aHN5rsH+z8gUY7krGWEHA7oH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KFivDdfw8q9SPYMO7xwb/WUV+UxhC1ZnhULo6Yh?= =?utf-8?q?XuqOduu8lt6wnIa8EES5ACy6ngZoOLSPtK9slb3P4Xr+syAb/5Px19BVpsLCVY34I?= =?utf-8?q?uoOvteL7wwwSQEnINzQgvyQlFiwfspBEDoKA/Q+Xw7uBs22DjhtmCVrpri9DfASj9?= =?utf-8?q?I9p22EMZ6fziTe8DP/K0YE20aRDKKpsELBBNswlmGilpxREnQMtPfQ73vqtyShjzE?= =?utf-8?q?Sf6XXtbw+AG/9q0WBPbU73HE7mO9X0DO9gng4NA4R9w1bgHlqfZtoW4w8TZ0GOqIX?= =?utf-8?q?Ivq67YHarT3S?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 149b4219-11b3-41cd-9354-08dbf1f5e916 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2023 22:44:28.5323 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2yH9YLZA1ZWg+446iSxw/o+Z7LMlU+Dkb3OudbAwaHg9ZryTq3b6ASrpFpogJ9JrD8DLojlZG10XGxDQ9aW71w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8851 There are three major improvement 1. Add actual size in i3c_transfer because i3c allow target early termiate transfer. 2. Add API for i3c_dev_gettstatus_format1 for i3c comand GET_STATUS. 3. svc master add hotjoin support. 4. Add tty over i3c support. change log see each patches. Frank Li (7): i3c: master: add enable(disable) hot join in sys entry i3c: master: svc: add hot join support i3c: add actual_len in i3c_priv_xfer i3c: master: svc: rename read_len as actual_len i3c: master: svc: return actual transfer data len i3c: add API i3c_dev_gettstatus_format1() to get target device status tty: i3c: add TTY over I3C master support drivers/i3c/device.c | 24 ++ drivers/i3c/internals.h | 1 + drivers/i3c/master.c | 109 +++++++ drivers/i3c/master/svc-i3c-master.c | 95 ++++-- drivers/tty/Kconfig | 13 + drivers/tty/Makefile | 1 + drivers/tty/i3c_tty.c | 443 ++++++++++++++++++++++++++++ include/linux/i3c/device.h | 3 + include/linux/i3c/master.h | 5 + 9 files changed, 677 insertions(+), 17 deletions(-) create mode 100644 drivers/tty/i3c_tty.c