Message ID | 20231016154632.2851957-3-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3552109vqb; Mon, 16 Oct 2023 08:47:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvyMWAD14IJT6MqftM36YH0eXmRpmQ1nQUtFiH+HilGKAvaHcbJbxMWtXWkzTnmaWdKznH X-Received: by 2002:a92:dc02:0:b0:34f:36ae:e8d2 with SMTP id t2-20020a92dc02000000b0034f36aee8d2mr33277359iln.3.1697471244680; Mon, 16 Oct 2023 08:47:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697471244; cv=pass; d=google.com; s=arc-20160816; b=Oj5MQHaRnDX68O2neM5OY7hZxMgm5Bga2LFT8Ln2TqKnw0nVSgu8clo5GM2taRe6ow jw+hQtkWKifp6Z8oF3JijhrLzTbKM2H7JWDJb6SDT19O3z+11aJvSEpxlNow6exxCf8B FBFTkS+P9KNu9kM2FJT4tTO3x4sNhYzm/jtU3/f9rYxr5v9A7CPJglgLhsCjhPQU64FU 8g5VsF4+v+M/EQOuRNPU3+DBlv9Wly0iaqjELMoQ4w5V2vqzc2jO/bNrWoZlVynrXpoq u2r9xcKdpfQHanabhdmLnkNaud9c5cnoc4fyFqhvfhfFCryNubP9B/ChuxsfSgAf35UQ aFrQ== 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:to:from :dkim-signature; bh=y6wYLxGqIqDAdgK8VtmcvwBleY7Zkme71O6KK0sSUG8=; fh=Ti0qdvZV/i089alSarny0opSonFaCxJFklfGvdi8roA=; b=0XP1xFAOA8G238tK7B/U707Ez4Jcrc//mFZtdgh9U2TBc2/fJfHb7Xu0QoOlmHBDed OQ+zftOR63OSTKMUatKwgLtaQK/nkT3fRtXWnTVHKs8kTcPgVO94ARVdInmp12JB4BV1 ZPTCpSfsSRTR7p/UDquGZsDitDJlcRRkonL0nLCxAzjIgieg+0YT6N/4UwE6nAEj/kRr 4PGKPLpWStjDLFaCkMedj4xNRDlBr/ouXp5SOOoQRQ+O4e8REMHEcnjbY3pKRPlg+6z5 t81kWGLNptV9uYdf4x6PTJQvUFGJvgy3UtEtWfjx2SdR29UVJt4Lx7vxQoOJKMurBMkT 1edg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=quZ3tJ87; 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.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y193-20020a638aca000000b005653e3f6d58si6253756pgd.748.2023.10.16.08.47.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 08:47:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=quZ3tJ87; 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.36 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 pete.vger.email (Postfix) with ESMTP id A21978047543; Mon, 16 Oct 2023 08:47:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232802AbjJPPrC (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 11:47:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233826AbjJPPrA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 11:47:00 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2068.outbound.protection.outlook.com [40.107.105.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E675D9 for <linux-kernel@vger.kernel.org>; Mon, 16 Oct 2023 08:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MHcAIEyeVxYH9ZG/l2Vet2h6x7UeTlmTQWI2hdeSlzCjhuHnlGNFiIrIfMjlSPtjWFWdpwT9L08SLGWn0AHBYdr2ePboZfckPIHwyoj7xmLv+ag0p5uxfrFKXhDfRYXlL3r/aFL9GLaH4TlrhGT4Ym23wMVZ3gAcJkFAIpbj2h4Cyve/vgLKPp6jMwF5wU7ao53tFMFEuvLK+sjZ9o12jwLSaS86kgwp3suMbj8jMaFYYepZDR9yeCbIjjkvSaTxQf2S+VYf3OwWi43M6YTLtZ5Oo3/V4d1sttA6F+1nHg2PjvIdSGg9+vzuIZ4AfZ1TASsBzxHF9oGB5Jjj+AbQ9A== 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=y6wYLxGqIqDAdgK8VtmcvwBleY7Zkme71O6KK0sSUG8=; b=DeuvMWkjWa6gYQq7wPu77jzPiDPUah6LiE2wog1N+tiptqa8vzXr28qBaLSfsWuzeXsP3bmLKX3edDIT3rPxMJpVMBH9fjde/DQwh57z5nHAj5i1qhTFQIkV6dB31OetAUSf4nWXfG/d7XEoY3aep1amLMhaAYhjPCilj2MQcwSbDNiQuZ58RPWVDlGAR17zMrGUEstxns599mrcEYzj2KFB6tC6hCBc/q9X7gnqFza/Yl99QQdUijeTEYy6+Ry4DTOnvv1nJyHJVqQpbth+oC1up36frxIkCiUHkDFh/34flcHmLDm6Q5OgckzO8ZdYD0URUuVpKEIbAqH29Xsu7A== 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=y6wYLxGqIqDAdgK8VtmcvwBleY7Zkme71O6KK0sSUG8=; b=quZ3tJ87J2E1Xeb9FiNoUY0SJV73FIiNO1C4CZOo/VqR5Rj0GYxSqX3DJ0XSAM2hOU7xCwJTFEAdZ8yXYGVOQW9aOT7OI0xUvnEYhuW+BNPgg+Ps+r8q/bt3rlB58HJIHRf9zkgAfCURbsN8EFJanEbi2Fj+ELQ2GR3rdIj+MeY= 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 DB9PR04MB8329.eurprd04.prod.outlook.com (2603:10a6:10:24c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.47; Mon, 16 Oct 2023 15:46:52 +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.6886.034; Mon, 16 Oct 2023 15:46:52 +0000 From: Frank Li <Frank.Li@nxp.com> To: alexandre.belloni@bootlin.com, miquel.raynal@bootlin.com, conor.culhane@silvaco.com, joe@perches.com, linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH 2/5] i3c: add actual in i3c_priv_xfer Date: Mon, 16 Oct 2023 11:46:29 -0400 Message-Id: <20231016154632.2851957-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231016154632.2851957-1-Frank.Li@nxp.com> References: <20231016154632.2851957-1-Frank.Li@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR03CA0089.namprd03.prod.outlook.com (2603:10b6:a03:331::34) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DB9PR04MB8329:EE_ X-MS-Office365-Filtering-Correlation-Id: 034fbd37-0c12-40bf-625f-08dbce5f1dd4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JgTpxcQQEV/sVhOP2G79UuNaFe24g3ryy5V8MTpQJ/2z7qbevjA5IDqYkbbC0iM1iv+bq/0j6LsFKjqClwFAn/+NuFtdJ5yfAc/9/93p9SVkwKx0fCbGfEd4NuDh6GR0Cn++ffmbndfpPjk0ycQ5kBUvUwV+Q+me0fWiuGugNlV1cZchbpPgsjyhRIviTAn1lpmJ7IMITpVL+9LuWZawVorBOGLVavjGuwcCKC1ExpniRTjaF978joyvrMx1Z+lx7N+XtIJjVXNoyuN1M2BmvtcNBTNcDbPjxBB6mOfEjGcN8Zcd0BNUdHvjCudDBOJbCz4SnsIuAn/9rRMBxFGHE9txT71ymPNrZIpxGoD8cgObSk4SwiolgwT0po4blOgTBLY9PZ1x5BKTDbBm7UTqKTU4ESQF8FCQ0g5kZZBehjJRTNknrikh0glBMm9Lejtb5CN0CBZPgmVTEDQf20FDfqjNZruz8TGpVSTxmUgjLnAon8iahlJH3JrMRa1evo/T8UyZnatgDs8FYl2kYhw9e7OsUGw5XejJuQdAgSWpt6SZziV6MqiDILqn8k5JwMTaUClkUWfEDqb8QfEwhDU0ZVVfs4rhWG6nAJ7k295LQvbWGk0Z+/IU1bxMG6lVt0hf 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)(136003)(346002)(376002)(396003)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6666004)(6512007)(6506007)(52116002)(5660300002)(8936002)(8676002)(38350700005)(478600001)(6486002)(1076003)(2616005)(26005)(66476007)(66556008)(66946007)(316002)(41300700001)(86362001)(4744005)(38100700002)(2906002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/sshdKD2AKBO07XeQUOD7Btqg5AD?= =?utf-8?q?znfo6cwvJcmD9xjEGNZ8K8Iv6+PLQykMYOSKcEjVo6yMlHAc7praBBHXIeheD2Tm5?= =?utf-8?q?cY4uVXO8l0VWNVMhdHp4UmkrbKU94H7qSD+BYgKvqChrxm8mQVY0Jg8SZDXO7fY1d?= =?utf-8?q?li+Y78AryJ8oxyyGmjuGKTXRzCpsWNFoGZ7lQ/9NdvyA6E9yN/mVcU6GtziV5Dob6?= =?utf-8?q?/+t1xAXxSqGUtY+kCa9C3HEs8MLfJtbyQU5KLp1mWtdV9XLPO9EgKxTcZ5Nn7FS0F?= =?utf-8?q?v7wJcfJtH1lYjjwF8p5Rig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N6pQOeIza6eGzV1yDiQqzSiJI6PBBqNK1FgT6Laxi5fINQCBBX5X?= =?utf-8?q?GSOF2slfMrB8UQgNiVz0A8K+gQEBHg+5zmgU8ZqeY1JeB+Uk1l0/R4btJLyJLvAzu?= =?utf-8?q?Ko9Xru9ZZyqHBKwxEKgsUVmMd/R88Q+U2/pljbFdRvD8rMpzwYIdZ+bRg/5QS+jOn?= =?utf-8?q?WutxU1UV2D5fyN+CVisomhnP2h4XQP9QXoLssqxqBCPGOO4t897p8dID1Y5dWrKXo?= =?utf-8?q?N77ZDQzMFyXrM6hK9jvhuUIY4fdhJsjOtuaqPtZu1xyGazEkC8J0QwbnxdfP4n0xL?= =?utf-8?q?v0U+Da8666sWACzozCQ1LIoSz2u93H8A7KKjqppchA4zlDT4m42umz0M=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 034fbd37-0c12-40bf-625f-08dbce5f1dd4 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 15:46:52.3691 (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: qHK+GOFjTtmnVvDxP7agUGS5rSS5ak5mlYcnxQsr506ZReVVfQv74W8H+zKDWByTmzSOpPLFThk67OXSgNvdiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8329 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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 08:47:20 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779927607580500518 X-GMAIL-MSGID: 1779927607580500518 |
Series |
i3c: master: some improvment for i3c master
|
|
Commit Message
Frank Li
Oct. 16, 2023, 3:46 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" field to
indicate how much get by i3c_priv_xfer.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
include/linux/i3c/device.h | 1 +
1 file changed, 1 insertion(+)
Comments
Hi On 10/16/23 18:46, 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" field to > indicate how much get by i3c_priv_xfer. > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > include/linux/i3c/device.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h > index 90fa83464f00..f2fa7ee5d96d 100644 > --- a/include/linux/i3c/device.h > +++ b/include/linux/i3c/device.h > @@ -66,6 +66,7 @@ struct i3c_priv_xfer { > void *in; > const void *out; > } data; > + u16 actual; > enum i3c_error_code err; > }; > Would this be more clear if named as "actual_len" and put next after "len" field in this structure? Also kerneldoc comment is missing.
diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h index 90fa83464f00..f2fa7ee5d96d 100644 --- a/include/linux/i3c/device.h +++ b/include/linux/i3c/device.h @@ -66,6 +66,7 @@ struct i3c_priv_xfer { void *in; const void *out; } data; + u16 actual; enum i3c_error_code err; };