From patchwork Wed Sep 11 10:38:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikanta Guntupalli X-Patchwork-Id: 13800192 Return-Path: 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 AEFE6EE4990 for ; Wed, 11 Sep 2024 10:41:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version: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:In-Reply-To:References:List-Owner; bh=VSPf9jhgQnPcnvpgHkcUphtoF8OTjkrbYrfKLtbTFhU=; b=vzUzEc/6zuUh9aOdC28RxT/UBC WKE1ze5zkqQywVRwfTpUV0WuHhbeOULQPh044Nwwb8pp+L6kcvdpOcOOSwy4AwJr2KXwE5xxUA80z 5MmZk7yagEyTHGKvnfKv/QWa+ReW/C/8NxflG6LZ+B63EVHkC5NK+2GJMpRez8LjG9eAHctT+cK7Y wQNKW1hEhiFjAoUmb0fAjlFeEvpxg0dvflC3mbtttwQvvB+9OCxDL5Aoy81R9+6cWYff1Vv3w3Hgg OtGtJvORTtNRIFmAXk/Tr3DfWaJxCLD17O6BUgHBzT9biuZBie5JOgZFprd5c07uOavMGq9qw7UVC Z/XPESaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soKmo-000000098TC-0Rhf; Wed, 11 Sep 2024 10:41:22 +0000 Received: from mail-mw2nam10on2062b.outbound.protection.outlook.com ([2a01:111:f403:2412::62b] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soKkm-000000097QN-1eeM for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 10:39:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lPbXvOr27m8bYHjzjctCVyEmwZ78xbSH59HF0sWXbqTe40/xMcECp8adzoyygI99SZa/X4XNXI/gyugbNRzWXAQOnwdHvZ6Vf9ylwfeI70bcSYHg4mxJkI1wCt3Dp7hjRQFNQ/aGmfvLEg6QsOXw4ZzMgPH/CbKGJFUjvZGWF6oZv/d2P1pVAKSIEKV+kG96aehX5PQPkC5oFrAsc1z84jq9xwekifNeoLDw5yfPGZhdErreljarT+/YOh5+tKUSOxpaqyaa1G0jzXcTKR4NCLLDEu7mzExukUDtOJyt1xnWq/AQtMnSuRnhoFG2Ye1Bv/48pmGE1aRf+Gzn1Vu/9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=VSPf9jhgQnPcnvpgHkcUphtoF8OTjkrbYrfKLtbTFhU=; b=rqzV8DvmlfiTLXeSK5U/i7u8xBg6eKqfsheqmathV0Td/rdVoLEAmuuDj2YLdI/3gfLnrPNJS/IPWyZVyvxJbP2P8Dv5Nr1hKLNxlWKPDz0j/rnWarTr9LDL+Mux1Axy1sqJuytFf29VQZuEQIJGNekVJqsNtGblaNxctwxuvdiADERjSykDXYRFAXFab+2MKiXC9scC1Ke/li+poO1co7bK57oSIF0/9AjJwdmDkaUj3mxPLdO/Qk6Y4dwUm/jxWQpRJDbtamm+9o8ino0/ulPdUm+Lopa6Xbc7rG9nCtdjUl7YKP6MVT5161ghzWxRZQ7DdtukAig3SmAgpM2BaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VSPf9jhgQnPcnvpgHkcUphtoF8OTjkrbYrfKLtbTFhU=; b=CpdOaDIDsalLNsY877uCgD8KNx9YRRChqS2Crveqx4VxSzz9kQ5ImjyBQgH6Ss7eRuzbWx+FYeO/0l9O9wdoq9GD6S5SZvmc3/LgrdbTtUo/vbY97u0k90yWDmX5Ii75K2dLi/apO7bNwL6xBxWc0WB1SGSM7/QTEFnyQT8JpdE= Received: from BYAPR08CA0066.namprd08.prod.outlook.com (2603:10b6:a03:117::43) by SJ2PR12MB9238.namprd12.prod.outlook.com (2603:10b6:a03:55d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.17; Wed, 11 Sep 2024 10:39:00 +0000 Received: from SJ1PEPF00002324.namprd03.prod.outlook.com (2603:10b6:a03:117:cafe::20) by BYAPR08CA0066.outlook.office365.com (2603:10b6:a03:117::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.25 via Frontend Transport; Wed, 11 Sep 2024 10:39:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00002324.mail.protection.outlook.com (10.167.242.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 11 Sep 2024 10:39:00 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 11 Sep 2024 05:38:58 -0500 Received: from xhdsneeli40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 11 Sep 2024 05:38:55 -0500 From: Manikanta Guntupalli To: , , , , , CC: , , , , Manikanta Guntupalli Subject: [PATCH V2 0/3] Add atomic transfer support to i2c-cadence Date: Wed, 11 Sep 2024 16:08:49 +0530 Message-ID: <20240911103852.162234-1-manikanta.guntupalli@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: manikanta.guntupalli@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002324:EE_|SJ2PR12MB9238:EE_ X-MS-Office365-Filtering-Correlation-Id: ee440d12-9448-43fd-9d5e-08dcd24df294 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: eZy3DRpmp066vYMB0CxhtzmgeUVKbLWEJaPY7MtiacCngQpgR+myQajAM2tRswcSJV5VVPKePxMkUNSk9Uga8NH0xF8H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6OH/PZAzAiqR0euPzsfH+uPd793Oavg/6Ilteh96a2/S3kspUExTKrzm8Zzq5TRCo98wzPrgwKq9UVUyQ6+MWzHwGBUzvOf3D08UoQ2Wf4R/pFef+ptYgJCzpPRsSVbQCWfJ/yZo10MhjU3ZICcoKqK5mgEZii+HcvD70JYd3Q+s40EInZOmC+F+eiU2EHYicW8wNyzzvma3wRsPNY02/0ji3bRiKzpl3S9mNg5oGcNOIcE03oX1cjTe3XnTAiatWxbRtz2FwVgmCsVZLVbrQs+WW1ySo/FFo X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2024 10:39:00.2345 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee440d12-9448-43fd-9d5e-08dcd24df294 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00002324.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9238 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_033916_560336_06C47149 X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series adds atomic transfer support to the i2c-cadence controller version 1.4. --- Changes for V2: Added review signature for PATCH 1/3 and PATCH 2/3. Simplify the return statement of cdns_i2c_error_check(). Update description. Remove unnecessary typecast. Update if-else to reduce a level of indentation. Expand *id->p_recv_buf++ to have clear operation precedence. Move variables to inside while block in cdns_i2c_mrecv_atomic() and cdns_i2c_msend_rem_atomic(). Manikanta Guntupalli (3): i2c: cadence: Relocate cdns_i2c_runtime_suspend and cdns_i2c_runtime_resume to facilitate atomic mode i2c: cadence: Split cdns_i2c_master_xfer for Atomic Mode i2c: cadence: Add atomic transfer support for controller version 1.4 drivers/i2c/busses/i2c-cadence.c | 423 ++++++++++++++++++++++--------- 1 file changed, 303 insertions(+), 120 deletions(-)