Message ID | 20231018205929.3435110-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:8089:b0:164:83eb:24d7 with SMTP id re9csp5081915rwb; Wed, 18 Oct 2023 14:12:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIRK7NDFki2tWCUhgut0pt8Sjgu7zJU/0s2gYJ74vf5bZcaLodnr63I906ZBMF1ZPQxSCY X-Received: by 2002:a17:90a:bd90:b0:27d:3be:8e13 with SMTP id z16-20020a17090abd9000b0027d03be8e13mr378790pjr.12.1697663529197; Wed, 18 Oct 2023 14:12:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697663529; cv=pass; d=google.com; s=arc-20160816; b=QDRq4Kb6ZP023g9t2aYlp6hL0FPwRQy6CHeCQhUPkCKxmdDNrovwfZdphj3wSroTHQ XV+gJkfY0mBY+HocRYEmNVJi8/1NnhoNyswKBq+YsppEl/IPiLY4kRY15AEcLWBPeE2h 3RjR5Jd8UrURIcQgrLR3DfUIAVWuOxuq+NUwRxKwd+/sMNSkFrMxnESZ54illkk7DfSo QTe2H5vCIj4pW61BNPpEy4rRuD9V+tc54wGsgPH7sne9KOh19BwxyVJWaoNYGlPfjxuf wO3PH1AvXSNafKIMe7G3d4yRJ4rCwFOLAqiP/C55zc2ub8zS4ELMRZcf7t+HpMpirotr jFlA== 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=sDe3TG6/b46JEOvF2xh0f1K4oYWCH8cpxTVfh1/w/G8=; b=SCRLVyazrXbAGBFmvckVAEv8G5V0Xf8UB3xsxCHyv2PkH0Y9WsAlpwDpj+/B4TAuSM S7NGIAoKjgducNda1Sl2Wn0GmlQrJjbxaIMxkobgML6E+z7dp/Gq2QwSF2gfxFT8dtqP FBufKXt9xyaW4/JVKyzlGxMK3I9nHP8BUkI/AlkDlQueu2T1usF15qkG9SAEkXOKpkL9 varm8xrlsRqMcrSCMjc/yK3UDSoGA2d6+PRY0reDYTYaS+b4v6uYkSB55qjYDVN7Sa2A d9yo/eh3PjEDEqWOIZXs5xZMid7GaCg0o/g/jeRrmUfxHLb2iPqKm1K9YmDLp3FSCsuP 4oTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=M8Hv1gNK; 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.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id l3-20020a17090aaa8300b00274ac850fbbsi647251pjq.132.2023.10.18.14.11.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 14:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=M8Hv1gNK; 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.32 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 agentk.vger.email (Postfix) with ESMTP id 9FC3581049B6; Wed, 18 Oct 2023 14:11:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231847AbjJRVLT (ORCPT <rfc822;zwp10758@gmail.com> + 24 others); Wed, 18 Oct 2023 17:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233089AbjJRVLG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Oct 2023 17:11:06 -0400 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2050.outbound.protection.outlook.com [40.107.8.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36B6C19A2 for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 14:01:18 -0700 (PDT) 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> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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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UpQ3PDPmRA4X229GhMY7PfznyWx7ehZtkdJXMvlkNop/lCVWwlvScJtYKB4AQXIu6?= =?utf-8?q?uPeWQIBe9H/0gbh4ObtRJYrHzOGoBmteZkZGQi9bS7CyJcv0PiIRNwhfH+8nzLHbz?= =?utf-8?q?+uMH1jGLfkr+JICy8EtOp+8q034p4PNNf3KUcF0vjaREr+QSZRVv5/Tj1aYAnAeH/?= =?utf-8?q?mJxrw6V1rYNLHg9ofzrVvrM3Syi0J6XHamD7VSsxYtxDM2fIt+SDLNsONQdeYWasW?= =?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-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Wed, 18 Oct 2023 14:11:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780129232632816660 X-GMAIL-MSGID: 1780129232632816660 |
Series |
i3c: master: some improvment for i3c master
|
|
Commit Message
Frank Li
Oct. 18, 2023, 8:59 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(+)
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;