Message ID | 20231201222532.2431484-4-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1451683vqy; Fri, 1 Dec 2023 14:26:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBclN+6OSVIAHAPMNQCvCx77JKu6d3Y0qWDkzrg+B9MXm3iWzXxX/l/xMZH4rG5J0iyxCu X-Received: by 2002:a05:6870:1654:b0:1fb:75a:6d21 with SMTP id c20-20020a056870165400b001fb075a6d21mr285409oae.72.1701469603003; Fri, 01 Dec 2023 14:26:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701469602; cv=pass; d=google.com; s=arc-20160816; b=MFOaqCQkciMMJeA3SOS/Ei+bZ3WGiJ80qiGMgAIObkoMprg9Qj04Wjhwc2ZL2GaqWh j5eV1SXTJahv1KMpmtzdMwpNitRCa5/Pchkkwjg1b6qEg56ZfOf7sAG5L35lqHLvGKAM JfPmdC4cxmXUnoeIEec1bf4emaWgeWFZwzUrldNzaELkmju0LiauYzkY+H49z9x2MKE9 bERF8JLc7J0NGFiJa0s9C27HQ7FPuW5R4TsYCRGQb0hEduyjKQNBIavWeIuCt7JK0zCf 9e495iNVozamEWiIwZL19VYq0Uj+esJyg7NczQeN5idAmrQxRF1q2Jmd1jIy5uIiu2AZ nZ3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ytSmslj5oOfXj/kvlZ0mw3AYP7VbssW1sje4uneG+bA=; fh=8vb2sIoRRli+I3w8E7N4FdlSO9YGnQodShlscRtis2o=; b=PqgKv/z+Fj97fqnnhbffwa1+mupQ+SqSpfJdIOkMWW5+zhWHlOuBhEKkJpJ8hpIf8b lgnFwQQXJwV6XGX3BvVSuhIAOe5FZhKRzsiQ2kdyrC3Fn5gCS4mmiDc6FvTd9Ni5JzyS 5vOOOiuI9J3BNU4E48KYmG2UbCTRjLWZilvKqfsEyA/N/TkGg9MJyhaWn9h0eW9n0hNG OQHWSqze8yR5kFZqGKZvoxm0+0NnVqqy/osO9wAtBGw2TNk2YHGbty7gxi8GHZXE5/77 B5cSpyPX2OosHygNIumdkwPzpB1VWtY69PQZba9U/+rtGy9d51hk2VeozfFa4raLhl6Z UQEw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=JOunq7Hb; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e11-20020a63ee0b000000b005b918d9a3c2si3955577pgi.868.2023.12.01.14.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 14:26:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=JOunq7Hb; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D44B08056496; Fri, 1 Dec 2023 14:26:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441839AbjLAW0E (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Fri, 1 Dec 2023 17:26:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441843AbjLAWZ6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 1 Dec 2023 17:25:58 -0500 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2088.outbound.protection.outlook.com [40.107.22.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20556D54 for <linux-kernel@vger.kernel.org>; Fri, 1 Dec 2023 14:26:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gI7dXhz+mYKhvnBa3ybrOW3r+AYM4CJIEfDUfaB2FdkdzJQparT5uepCVsTvOeQi76ZKEqlKcSYDJhO6nLsFYLPT2Ui307k0H292HYsv3E423koDQSTtMciPfCNFGpQcia2JCvTARfjCwTAEM/53EpXc7vbT0cip6i11C9zDSmbj3dw/n/Aigu9g25w8X/RknflevVynsqe7nmrEGRW1THmA8DhwAbgDutbrjugrS7Qi3p6z5aSkeqUY/oTyQeO0UjSg2nl4s2wcHH6Bfj/iTEpywGkZbfl9cPfTWwFV9BmsBYbhxLppjLBmCxWzWmA8pNIUGHGJUfyBSxMnKEOyFg== 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=ytSmslj5oOfXj/kvlZ0mw3AYP7VbssW1sje4uneG+bA=; b=OOu7NicjXo4y4sfIACOBfyQ9K18eeIXJmF6Gn21M92G1L22u/e23kPXT1VSy37Lq3/OpBY53XgbXVaSOd7HFikztr6DgacLArCUd2uqQhxws01efNcPll7FUhX/PL9wtWdZRPuc1TOd+6HaoP4L9drdMiPx1+VBJux++gz/jFbUweGMgfn20zTjzSty2sg9CFYhPLabOkczCqgCIpzdDWSDhwIDnfjkm9eYeBZCQnMWPxG8SF4I72UtTc2VFAhqfrt6oeeCpqq2zUAYlj70cPeDrV9YvKUYeVe4P5o/rfMVtaYWewCwcHEMwBC5+og0E7L1Jpl+cPRU9Zj7uF4JO8w== 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=ytSmslj5oOfXj/kvlZ0mw3AYP7VbssW1sje4uneG+bA=; b=JOunq7HbhLZHE+jT2FjBvJBXU8XQmL6FcuzAAtaNuJk1NgJMykpNoWKpj7DafQZ8vB982rtRWNwmXdW3XcKxJ/ZVx11Yo6Dv3SSmJ5m73KtyauzRwJNrOtgidbFy2Z1bR1qlCneWLIhyK2bUKIFire7aURyG82h2a6eVI41l2qo= 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 AS4PR04MB9573.eurprd04.prod.outlook.com (2603:10a6:20b:4fb::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.13; Fri, 1 Dec 2023 22:26:03 +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.7068.016; Fri, 1 Dec 2023 22:26:02 +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, zbigniew.lukwinski@linux.intel.com Subject: [v5 resend 3/6] i3c: add actual_len in i3c_priv_xfer Date: Fri, 1 Dec 2023 17:25:29 -0500 Message-Id: <20231201222532.2431484-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231201222532.2431484-1-Frank.Li@nxp.com> References: <20231201222532.2431484-1-Frank.Li@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BY5PR17CA0022.namprd17.prod.outlook.com (2603:10b6:a03:1b8::35) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|AS4PR04MB9573:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ad3cd6b-5a01-4d9c-85fd-08dbf2bc808c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vKP/NnJ07gyG4MTJe2TvXhceAzuQsoxkj80mFiMAnF8jJu3dq1mXdNfEDMvnwBHZSJVNUGZAIwMajlKheXIN7dbRjhJ73S8RzPvolTceunNFOhWdsjlmJA8BgOLtnvNv1lUdcLtUoeJ8ZHaJ4MfurJ3viwnIF3g8pRjHe00TVBVXNv4WXYz4PB20LrFa6Ew6EQaMv03/N2ASke5I905P1+G08izwV/FpOCqRZ35mZ/xiUn5oBwZi8ZeksSs79ClcJuCnF7HxNvZf2JbnxylJ3Jo3ji9HRGQIk2EQj+2IPMDC6vmOe4gxGIxOMZU825xa3Asgq4cqlurTSwVWZRw2meETwbhsxEn6U4n6KKpNdeHcgCDgI7woK9u6z9mdyUF4PxiY3zMlg3BtU2F1GdGsGdAndNMOgudecJNklqffDk7Hu3twF/goyykqimkgKIpVljLoFqoA9M6LlipjNUY3uKKNuHcoGnfb/Y5Gqjp1SNdF5BTRClYGjtG5gck/cJhraXLYzFPqeeCWqvrhmDYaTPdkPw5E+sepz2Rp7eHl4zht6Vxa/2TbCbYdkRt3tOfbI1tQsZTRJx7vsfvkObIU1mqXtoBeZFkpDJUtym2T67yp5elfOFgH6g8CMw56f90s 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)(39860400002)(366004)(346002)(376002)(136003)(396003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(86362001)(6506007)(26005)(1076003)(6666004)(52116002)(2616005)(6512007)(41300700001)(5660300002)(8936002)(8676002)(6486002)(478600001)(2906002)(4326008)(316002)(66556008)(6916009)(66476007)(36756003)(38100700002)(66946007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xyD1ZsRH2UM37hHcIj294gaRDhVI?= =?utf-8?q?UtSSHLk1eu4Fc3YotYhxNkpBkxyYmUZ1T+wtK509LhT2nl9+1YjJom75zPc2mv9gy?= =?utf-8?q?0GxskZJsFlYw1ch1H0Mv4BJXEmSDaeGYTQvC96BD/qgHLhSqdn2qOnFt7RTo7Bgnb?= =?utf-8?q?JVsV//hTgdDzkvo0DzqgQBoe3aZ4HLyzFDGrc/oyIgiVeI/OPn68QjZZkr9y0JtRK?= =?utf-8?q?pYw+AC1yLTzQvc1FrmUIhKHtrUXxldqojnc0BY4mNx2p0Tk3Byi2FGYLZlTky9zFp?= =?utf-8?q?EM2chG2G0hXxLX+OQzzWXjjkUWeO8/n8v0oiAepy1yLmggq0JMPqRlxpUfzVKwwX9?= =?utf-8?q?6Tj56CA67O4ObmHrepnDQOflHedpeEdBqVlvAQ+oE8WO9qS4wPJxJcWU3IGASSo70?= =?utf-8?q?bwGoUclTd8V3t8FxlrZM/3GDtNm9y8yXp/dOJTvIBlN/60NqubrUEJwUsXMtjAcPj?= =?utf-8?q?qwFPejeqM5QE5CUEHQetMjVK8SSG5HBpwTfsja3ASlLvptfBkHt6ihca5RjUDZU69?= =?utf-8?q?FM7AHj0KDm8frOu9Q0U3zDtb97kvc0WjlUvhhaKtt+NyHbekPqfmufj8Wm5GNIFfE?= =?utf-8?q?5w1iPLlMwOazsLg1xebeMF5QmHmAafOtfXyOwUOodp3ArwgVVWwzfhbJz4K0AjOAx?= =?utf-8?q?7r+vJddQEUwZ4OV7uK6VzRBhWTcEN186md7ssV7w3wT0lEGFxUTqCRe8z41wikuD0?= =?utf-8?q?R1j+xue3xddF+LYiAiXl35bky+hd1RACm4BJb0MZ9R6t8tmx2hY5UTiNIWqYnmDEN?= =?utf-8?q?tluHPGMhjxBGf1dBeyn2l4f00GiyZC07IEK4pMXHg4LK3nzGECOqfKNNp7zjj/tTJ?= =?utf-8?q?cZYtpxP3WXoARPD7KUw6VJWpFe8hv1g6XSvdM5iWM1cucdDzptdFjQss/6YlV76O7?= =?utf-8?q?U+oSv7WdKoAr8rkigJitDav/JWj5iIixCXvKWvEsbcto/cg1J6SQGfB606vbEsr/h?= =?utf-8?q?d6EdGSH7zYoE3EXLxwzeLCiLnU1E2eWidzg7EGbYh+1O56CegVcOn1V+IwFEnMRA4?= =?utf-8?q?08ogmhKVAVreJRDxSvLDULzc4V1+99jJh2oVzvk1WT7LPl8ltiqio/hBvJzdc9WdG?= =?utf-8?q?+vw+NKSUtYXFcwy0JXVlG/Ft/e4zaWZyonI4TsOqbRnhyxcX/r83KwgEY19aM5eG6?= =?utf-8?q?MKuYs9gJo4gzDwbPwoBhI+b9+nYXVwj0nkKfUyza6zADZSY6AbZ0V5qdEgMSgxQdO?= =?utf-8?q?mLMwhghFLdCqf3L2Vsf1QzRT2Tje6QlePbTUL6HfybxEOoe4mdk2D50V5HAgschtW?= =?utf-8?q?kZmyPWytHAM1DuL5ltxLFtx5FWrG0oO8OEzRZBBzmKFsxUrgLVKJ3s7P4xcdUFy1Z?= =?utf-8?q?wxRVfS3rqsxcfB57iyha87AaWPmWDLrXtU2Utq4UDlerQxt1AlBNFF5oe33SqYBOK?= =?utf-8?q?xcfZ0bHT6pSwKXwiY/jgwz/I9y2Nx1M0GV+RdjtGvQNx9aEVPA8rRox6Gr78QWwGT?= =?utf-8?q?A4izkVFfjvXWH+4fmgcikljE057+ryKsyBf/06A2cDCRUq72OSmjYsa/mhk1aQpPO?= =?utf-8?q?fceX7qCQxfo8?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ad3cd6b-5a01-4d9c-85fd-08dbf2bc808c X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2023 22:26:02.9291 (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: 7m/GcAvMDmJACM0jynTnXT43VoZZzdffftkZpGQ1NZrlIVHGLynb+jb92++UVN9jXtJtcE4m7n+h1zXPl7qOAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9573 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 01 Dec 2023 14:26:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784120190673811612 X-GMAIL-MSGID: 1784120190673811612 |
Series |
i3c: master: some improvment for i3c master
|
|
Commit Message
Frank Li
Dec. 1, 2023, 10:25 p.m. UTC
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. Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> --- Notes: change from v4 to v5 - Add Miquel review tag include/linux/i3c/device.h | 2 ++ 1 file changed, 2 insertions(+)
Comments
On 02/12/2023 6:25 AM, Frank Li wrote: > 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. > > Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > > Notes: > change from v4 to v5 > - Add Miquel review tag > > include/linux/i3c/device.h | 2 ++ > 1 file changed, 2 insertions(+) > > 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; What happens if I3C device does not terminate the T-Bit because it expects extra length from master? > + u16 actual_len; > union { > void *in; > const void *out;
On Wed, Dec 20, 2023 at 09:55:26AM +0800, Joshua Yeong wrote: > > On 02/12/2023 6:25 AM, Frank Li wrote: > > 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. > > > > Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > > --- > > > > Notes: > > change from v4 to v5 > > - Add Miquel review tag > > > > include/linux/i3c/device.h | 2 ++ > > 1 file changed, 2 insertions(+) > > > > 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; > What happens if I3C device does not terminate the T-Bit because it expects > extra length from master? If devices don't terminate T, there are two cases. 1. Master send STOP, then START new transfer. I3C Devices can decide start new transfer, or continue transfer left data, which is totally up to how I3C device and devices' driver implementation. 2. Master continue toggle SCL to get extra data. Just like a low frequency at short period. Frank > > + u16 actual_len; > > union { > > void *in; > > const void *out;
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;