Message ID | 20231129221225.387952-4-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:296:b0:164:83eb:24d7 with SMTP id ek22csp11736rwb; Wed, 29 Nov 2023 14:13:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6NVm457tv6q9lINyjjsAwNsTiGn5iDzb2JX4/3tXNnd+ZZiH9TJucTt50YEdvaYIchrSN X-Received: by 2002:a05:6a00:2410:b0:6cb:903a:b064 with SMTP id z16-20020a056a00241000b006cb903ab064mr21887410pfh.22.1701295986488; Wed, 29 Nov 2023 14:13:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701295986; cv=pass; d=google.com; s=arc-20160816; b=fa6bl2wcgQeSu64b8QvMvpBKPitR9aHS1RFiZFKePyAHPi/KD5NYYv029ES/7DnTbI LMUuiGjXg2uoB7P0WbWabg2z6f7Oafv49lZVNJhBQ9Pb+DZZeBsD6B2hqRwQsRk9O1yk IL4qw7fSEgcC5Fh/YwaWgsXiQNfwKgNBApg/v1tUcavICF8lVoFUEjMKZcdYG2lpavFy dQ5W/TUDY9b70XLSHCmjUZKx3YiRSUu2IqB53tnU1xzRrHxosQLdfr9/m3kzSA++9Us4 YeX+QuE3OAoAc+JfGzpFji3DfqGjISaBR694Fd31S8eTyCR5vnrYu+gl//6Gzx5fyOBC XtXQ== 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=++WWKqxHPtPOuShZ9C+n6tM8dcE6BdIrF96tSwG9XqE=; fh=PdbvvRYRJ8Q0x2Lw0CjA1nrMatMLWmexk8+z0DwTFq4=; b=0idJpoUPS7fT6jxhQXlzKmeZOCVj6/OYuWd3Gbi5VOZec9ySakuA6nd6PEVem75eOs s2jMPGlV4Bns3IvJgcwFYcnrTd9lCxsnfWs36YHFGjoRzfHmvxELSlOA+FoxiYghKBaF G/LYhZgpet63ozcFVb8RWZi6ce5/O5K3GF/Apo7HTPrOqdaOlajI8Hewu2ICwieODb0/ dbES/KaPaAUBMm6evNORr9Snh9nZiWmLgfJsvn7CthGENkDqyk9y/xCNibuJWtGxN/QJ C45aqRxyUY6Vq/FssloA6Z2bVX3AIzBUdMfHPlkx05evDRuGHSK5RdJyWQbvL3wFuZ0e q9Hg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=OmtZJzw0; 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 q3-20020a056a00088300b006c4a78a81a5si15328039pfj.88.2023.11.29.14.13.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 14:13:06 -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=OmtZJzw0; 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 9589880BC511; Wed, 29 Nov 2023 14:13:04 -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 S234837AbjK2WMw (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Wed, 29 Nov 2023 17:12:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234683AbjK2WMt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Nov 2023 17:12:49 -0500 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2081.outbound.protection.outlook.com [40.107.14.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0B05D1 for <linux-kernel@vger.kernel.org>; Wed, 29 Nov 2023 14:12:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EDsQ2KcAuz0d8mg2XG882N4R69w2/0MdK1pXwB0+3F5g/OdIYJD4WqNZSiIo9RUACqgsSOM0q6O5/Mg1mt+fxI8n8Jhc+xqzLF2G3ObsyW5jOVwncvRaZcYb7uqz05PSx9nQgu9xR7T9gqsGBCH8FfO61ZgNSIiSlUuKRKMmqWCx+Rqd1xFsWNvzgiDLwceDwXXDEly6e7GDBLe12ssRc8KRg0dI4y14znO7ou3PRwjVOZT2Hw3p2iStn9vyj5sdLhC+zSDYRFGqI3eB2HGaRt/1YeityntyD3N1OildUV8wz9WbNnldkMNZdrIyuSzww6yvdcprW3UwAlSkv75Kvg== 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=nf7a5rgOv+UPOHZTadyLE+anwpzul7VX5pgl7FvBAksfwGOIgg4C2ONXcEvrm63sJGgeqzd3/fgwk+P7IISgPo2mPMBXqAjY8Qi8lDD1up2b0N1JPQtP35CQvg3RwiaM0tjsnE6lXhPLrAqZ2gkUr9ZgzX7g/4pgNtgiCW6TXuq8e9E3fMwwbMPYvCNNAuzhkv8v0o5silQz8DkQmEc+3yF3clzGe3G4Z3LwRMFoFOEX/ztYs4aRQ+13jB8HEs7DkLPpqTso3S7D/REFu8tGWT6Ux/g9pw1EHRUJwYpl9POJV9n7UV/Rty2IF9HgPYx8KdlusiZ7VW4U/88UcpRshA== 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=OmtZJzw0E+IRJfBDs/uBI9vKMDzYcCMcwdOdyw9UA25l1FxYNAD1tcoiKngu8SVepfALNU6DIa3ALik8yHfhQE1zbK9iaR9Ejy5ez0zrRUL+ns8G+FfMRiHqe0AgpMYi416bFi/buVI52B51hwyfve70zWf4iSqfhgBCmgrUWv4= 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 DB9PR04MB9578.eurprd04.prod.outlook.com (2603:10a6:10:305::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.21; Wed, 29 Nov 2023 22:12:52 +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; Wed, 29 Nov 2023 22:12:52 +0000 From: Frank Li <Frank.Li@nxp.com> To: alexandre.belloni@bootlin.com Cc: Frank.li@nxp.com, conor.culhane@silvaco.com, imx@lists.linux.dev, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, miquel.raynal@bootlin.com, zbigniew.lukwinski@linux.intel.com Subject: [PATCH v4 3/6] i3c: add actual_len in i3c_priv_xfer Date: Wed, 29 Nov 2023 17:12:22 -0500 Message-Id: <20231129221225.387952-4-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231129221225.387952-1-Frank.Li@nxp.com> References: <20231129221225.387952-1-Frank.Li@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BYAPR04CA0003.namprd04.prod.outlook.com (2603:10b6:a03:40::16) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DB9PR04MB9578:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b0a95dc-92c5-4ba6-89fc-08dbf128545a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LU9ldm+8pEXiKI5yIpulC0Za5ZMpklP4GoQ0jnVdV4KmKgBco9ckwHKqCI843WF7e3Ptvn/aH5PvsfGQbQCrPmv0yz4hoT/5SUZgy7nvqH8bombV3map6TQ4JGR70w+QSAcdeY4gmq1RAqxcymJtMMSz4hFCnpH1TUGsJ9PdKYA/2O3K01qUOYyRg5UT8B22SJe6f/QpnHkOIQWZ3Gcect0/BLGn+vS4t+ZLIWbeUWwXDzxxqQLbXwyMCLPk77kqd972R4mMhd7Oe+E3a5cLhYfboHDSVnw8qJ5xEt+rZiBX9Aj2aQ1Owi8PhUrKXBX3kYBd25RpaJdOhjBOT/k+TOMbViWYKul40fh8jDiDUz/Jn0DsfEj59hMt/yKPuqyr4Fg9H9dmybq7yZpuMhilmeGr2s0gAJwIZN2IcWk5gj6jawg0lFG/P1mue6+RsyWzuIiLEpz3A0IubCx7zeckRsOH+Mb9gk3qeI6KJOT2t91nH8TzFYJZBUPnNLAZsXVMstf8UgqCwP/LxiqQp1jav1eDdUW83uMED38f5eVso/go17TuacEaG0MSGaFEIS8NcOfxGHZSyk2Zs/u3M0vbt+uDQL8jrh/UzzFcYSsI3Nwy0GQ/rWBZJO95CPQyXOHzWoQyApQini0gPpQuAMxyow2fzn/oiuHvTvOMky39eyg= 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)(366004)(39860400002)(136003)(346002)(376002)(396003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(202311291699003)(38350700005)(36756003)(2906002)(41300700001)(5660300002)(86362001)(6666004)(6512007)(52116002)(2616005)(1076003)(38100700002)(6506007)(26005)(316002)(66476007)(478600001)(6486002)(8936002)(66946007)(8676002)(66556008)(4326008)(6916009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TMME2RyQfrhkR/ayBTqJFyfFBE9o?= =?utf-8?q?s8hGR2VnT6HqsFpQXOVeDS33vxrmsxfRc8CVHZGZ92nGpi9Rb7EvqeRwZrhK8kZnk?= =?utf-8?q?EnXGzc4aPDAanmxMnS151Sj/uW4RjXc2V3QW/aw28/dtlyCvuXYn1/U1zJrWxNXam?= =?utf-8?q?L3JYjQZ2bMpJ4SQM9XZTHYjjj9jlGlqFF0lQwe7QDndMqy+Oi7EUcv/+aEtcEI18w?= =?utf-8?q?ibbgGftbgCo8AjxivhSBUdF+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qMeUd44lSnl/nP8rlgXfWk6ISW+1FPOTnZTquxuQ16o?= =?utf-8?q?NwEhAvUKf7KpgSCaeB3NTC5tu71J7k5Vq6dOLm/GAWC8LhctD+XS9MSvDa8e6BOAg?= =?utf-8?q?fq4oZBGM0ZxBeY3M94gdQ8bzhu9di63XgH9RALbgyPWxkQoht9VWJAgtrMzYn27e8?= =?utf-8?q?IQjtJqmp7WmLzH37mUlRWD0Pl4febdMtuq8r5yaB7nJsZx7gT5QG9KgCDQ35A5dCG?= =?utf-8?q?SXG7XPC6mBSp0OpfV/PUAR80sp3eaD1bZFJy7qidXNPuOE896mndN9EoSblLPd/4H?= =?utf-8?q?qID1SCc4rAHOqyc4ghOlA1Has6tV4l9JCDh9pyC1dr76wD8vmb2s+bL+Xg2A2n7TB?= =?utf-8?q?zO4QN2tvAn10XtM1TNvXXCD0Hdl9HXwayvbuTddcDYpaGzGoBFKDcyZ3QNSwZclYM?= =?utf-8?q?YdO5xRSq97gC?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b0a95dc-92c5-4ba6-89fc-08dbf128545a X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2023 22:12:52.0818 (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: GqW7yc0q+PBmiRvVU9wojR9eEHastHvAeMhzhrSM4YuvLvhV5ROZUhkpXIA1IZ6M2QCPNYoMhWY5IAi68aHvAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9578 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]); Wed, 29 Nov 2023 14:13:04 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783938140473996137 X-GMAIL-MSGID: 1783938140473996137 |
Series |
i3c: master: some improvment for i3c master
|
|
Commit Message
Frank Li
Nov. 29, 2023, 10:12 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.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
include/linux/i3c/device.h | 2 ++
1 file changed, 2 insertions(+)
Comments
Hi Frank, Frank.Li@nxp.com wrote on Wed, 29 Nov 2023 17:12:22 -0500: > 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> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Thanks, Miquèl
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;