Message ID | 20231018205929.3435110-4-Frank.Li@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org> 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 E2213CDB47E for <linux-i3c@archiver.kernel.org>; Wed, 18 Oct 2023 21:00:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=zvmrYfWb6Jyzx5plF9p56RaSdTLBSS5cqyyLPh7MCJk=; b=HfLVSQ7jEvNucr +QGVAf/XmiIC45vNzcNNO6xcxCNjuRv6/5hlknBeCj/FrQgiUEcDJ8F/wlV35BZk26+8+4aj/s8Lb RZA2fibO+ioNsxdjIUwGjcHhfLsMqmRTyNuPBpVl1gO/E0GsMgCd9esYd6E2dUaQ3JEwR6BpXozZ0 zhHvZZ83dPK6d19Eq2SSRVv6v4CBSzuSTh4RTL1rnSL9LjmlcRG/5OigkK+fG25m+EFm8w4Kx8x1o 3qfcmEtyY5pnhFHNKbW5x23D+/nVHeqrGdFQpuGgiBl9gRuBgrxkVBtDdgiNLflEyhmn0SsLXQr5V ijDc1S8npyEFgNJpJTow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtDe9-00Fgo6-1p; Wed, 18 Oct 2023 21:00:05 +0000 Received: from mail-vi1eur04on062e.outbound.protection.outlook.com ([2a01:111:f400:fe0e::62e] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtDe6-00Fgk7-2j for linux-i3c@lists.infradead.org; Wed, 18 Oct 2023 21:00:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gGgbfbSncd8p2bDrHLNik5lueWy8SbNxHYWAqL+uoru4wyoCmWS+u4TfX5YVwDQ7hf4NCHe1Vks751atTVmsiHU5MpIcsYDniQZ4cnGNAgjKr6kTLO2GVna1gSYvnHOFBHAVr4xU6hZ+RzsCjOvyyy5o1kJ2YcYkVl+PmhFQuwS33da/V/q1GrbvBAdjnLgsMwg4rYNDRBFsPt7Wts2mdmiwhniQYwsc/H4WPC4C+Ue8wLf5zyOoy/Sx32lECo4ZtYsH7FrN05SfrwD2iFMd2z2E1woxyPiq8gc8FYrir0loPlp7CNT+KOzoW4/Qav83FLcvwCTnhcL7N2hPPs+QFg== 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=++WWKqxHPtPOuShZ9C+n6tM8dcE6BdIrF96tSwG9XqE=; b=jY/hTIw/hGqG5Pb/8e5ruRaKvaHE47YflqAHgqfXfvBCgrFiPH7TZ/VA9Gtc4bjzLGT4ZMyHm/A6cBj5v46/qgwZRSpzE309lW7E5GPOD1o9MwZZfE7aXmodxUhra71152lL+kCAnu3bmzGAjN19XS0oAXZRvQ1N/t+YnrClmTJp7iBEL159rpM0fKzayKpdFwvUOREWdH8AMIYM9+ycbM+vNzqu63ib7svqo2lgElDJOLysrllx3aRyAXWK8aFB7CquFzkDPPIGETp1EX++I4+33k+P+lfL+kEAMwpPGa3lZk/1M5X8kTD4CGnOfhoCGgBoSxhbeN7rdLqTB4sLpA== 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=++WWKqxHPtPOuShZ9C+n6tM8dcE6BdIrF96tSwG9XqE=; b=M8Hv1gNKjOSb/AdUxOrgoV3OfRHashw3lq3tM0oBR8AGcsrknSpJH4RIfGWqa4BBFkJDXllS1V7/IHUlDXwWVN6vlU+4bi0iSDjyJmY8/0y5v02WCEymqxwp9qoBD7y577qQGHznXbPIN9WK6klxzyh7tpQls3h/26vWoN2S56E= 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 PAXPR04MB8653.eurprd04.prod.outlook.com (2603:10a6:102:21c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Wed, 18 Oct 2023 20:59:53 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::1774:e25f:f99:aca2%4]) with mapi id 15.20.6907.022; Wed, 18 Oct 2023 20:59:52 +0000 From: Frank Li <Frank.Li@nxp.com> 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 Subject: [PATCH v2 3/6] i3c: add actual_len in i3c_priv_xfer Date: Wed, 18 Oct 2023 16:59:26 -0400 Message-Id: <20231018205929.3435110-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018205929.3435110-1-Frank.Li@nxp.com> References: <20231018205929.3435110-1-Frank.Li@nxp.com> X-ClientProxiedBy: BY3PR10CA0027.namprd10.prod.outlook.com (2603:10b6:a03:255::32) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|PAXPR04MB8653:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e53ad2d-fdd7-4bbd-780d-08dbd01d2cd2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a8QNzJRvOtNz5fh7/7kTG7y8nBigabHT4b3YaTA6IFQ2DzRMdPMby72LLsfyv+TuXRuc5EKDwnXZbQFNPTw0kC8cbBnSR0OQ+UvaHdKRb5kEBABBNoP9y59aOatA5o0zBobUGUbCXXzrQoFHCjOY/bJufTrCSqCEi9TdtIZIeQ+b0QJTrKHHQyyz51d7/g3uX5xg01qGpGsBGzxvCefJ8zt75n+Xux6auch7gJ5jfj9gfPXplQi2f8bNS89IiXIpeeyLKL+G7kUPzSvMZh6trawOIgoIF0+nO0UBqwMgFvuJ7RuxrJk2H+f19Y2u64tgD2bMgjFBT9qbiUjKSw/vsZsJPTk4z94prNhVIU7gYAA84eMcqxS9ydSOMZrGIioGjKQNQ/H+NABZfuLa8Y6HxIjNleLZ8oioNEMUfs38Jhf1Hmz1T4oSGUxH+xUHYR71eKLT4wwBVoiqTim1E3WND89KUcBhXD0CyO1+dqWzxoJG5n49Ofa+CMNKHk6yMhoNdldyUnegfEmF3KkLfQrNFm3y+oKk5i/k6qZpYmOwl3HRxYj1xy9q2j8xJXme/B4SokvyoLt4CNSNyy4CX0fJMyRnU3G3B27DKFdhk1Yni11nkq7XpGNxyia6HjvqVHBA 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)(136003)(346002)(366004)(376002)(396003)(39860400002)(230922051799003)(1800799009)(186009)(451199024)(64100799003)(6512007)(6666004)(6506007)(52116002)(2906002)(4326008)(41300700001)(478600001)(38350700005)(6486002)(1076003)(26005)(2616005)(36756003)(66476007)(66946007)(6916009)(316002)(66556008)(86362001)(8936002)(8676002)(38100700002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?kkTbY4Clfrh0W+tSr2T09f8rSnoa?= =?utf-8?q?+7fkEzRu8W3sHIEUpK2wSACQIU/Z38ceV+PeNNHnyefTF99brEEA7CyD9nfpsp2mE?= =?utf-8?q?oBqUvx/uxU6LI6dxfTRn/F/IPymbvoFwn1A1nH9nx5H396JP+Sv5EMw1XFHkjYtZi?= =?utf-8?q?s4An60eB/YfshvFSa5E8Tn9A+CkEDjrmVFGAvY5mrEkZTTvcw4vIk4d47zb/XH8G9?= =?utf-8?q?d45+el6SVuqa4HT3MRQupJQnLoqTEKfWp7SmvdPjfcRDDWjyClbVeVJ1eHHUxpa6X?= =?utf-8?q?SFk7iPDV/RfpCmTPYTsdBIjgjGRi0AdqHi18vpzx9lwbjEBhx2/d5Aak3eNuS/Rod?= =?utf-8?q?85SlAyg4zHduHmGDrcST4WL5iTfPwugBMJs2I4YtUHnY1Yk/0qyQ5y7qdi1bhAMPB?= =?utf-8?q?Y8mjQ5PR37pJRnAP5YJY55DmTqv+Po3l3b5vh/bj5ADnuIBVuXeYQ441dPriT21pP?= =?utf-8?q?gXy5W21FCPPE1SFHTKBEuFJcmD7zWjv3txtP1v5yoI2e1chVMAMdl6tJX+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asW?= =?utf-8?q?Urna6sXII4N9h+a5ne+IAnPUuc5cF0a1X45lMbekumJ/GhYvoZog2dlL1Xw3Ybtge?= =?utf-8?q?l9UqFFSbcVDQ41DGB5/vY3PhcTXn3M7rRXV7CPCcVZttnJ3vSODWezBI=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e53ad2d-fdd7-4bbd-780d-08dbd01d2cd2 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 20:59:52.9226 (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: l7t3pknfqVKU8dle9k9zzGg9Gs5dAAs22cI6t5PYcWucNBmZ03wSXWhWCCPLkV5b/80bopHkg/aipAXdi6uwtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8653 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231018_140002_892585_9A657AB6 X-CRM114-Status: GOOD ( 10.71 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-i3c.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-i3c/> List-Post: <mailto:linux-i3c@lists.infradead.org> List-Help: <mailto:linux-i3c-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-i3c" <linux-i3c-bounces@lists.infradead.org> Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org |
Series |
i3c: master: some improvment for i3c master
|
expand
|
diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h index 90fa83464f003..ef6217da8253b 100644 --- a/include/linux/i3c/device.h +++ b/include/linux/i3c/device.h @@ -54,6 +54,7 @@ enum i3c_hdr_mode { * struct i3c_priv_xfer - I3C SDR private transfer * @rnw: encodes the transfer direction. true for a read, false for a write * @len: transfer length in bytes of the transfer + * @actual_len: actual length in bytes are transferred by the controller * @data: input/output buffer * @data.in: input buffer. Must point to a DMA-able buffer * @data.out: output buffer. Must point to a DMA-able buffer @@ -62,6 +63,7 @@ enum i3c_hdr_mode { struct i3c_priv_xfer { u8 rnw; u16 len; + u16 actual_len; union { void *in; const void *out;
In MIPI I3C Specification: "Ninth Bit of SDR Target Returned (Read) Data as End-of-Data: In I2C, the ninth Data bit from Target to Controller is an ACK by the Controller. By contrast, in I3C this bit allows the Target to end a Read, and allows the Controller to Abort a Read. In SDR terms, the ninth bit of Read data is referred to as the T-Bit (for ‘Transition’)" I3C allow devices early terminate data transfer. So need "actual_len" field to indicate how much get by i3c_priv_xfer. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- include/linux/i3c/device.h | 2 ++ 1 file changed, 2 insertions(+)