Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2228606rdb; Thu, 21 Sep 2023 12:09:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGPbLx4GKbBvTFglfwpYsoUXXgmgnqwsXsojsnEqT6d8gTM1jbW3dkUOA80vRkISNL2k54t X-Received: by 2002:a05:6e02:1bed:b0:34f:203c:242b with SMTP id y13-20020a056e021bed00b0034f203c242bmr7872699ilv.10.1695323358133; Thu, 21 Sep 2023 12:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695323358; cv=none; d=google.com; s=arc-20160816; b=OzJJ5h3FKX7GRXdFK5bkpXbhpSnnqlu5RrS70Wc9P5USQxf3v1SU92q1jnzARIBeA2 heHb9pMPYK/1fkxdHICQDO5WppdPox//DcyEVRLvJcWC2TitPiU4q8hxnwhp1MsIcEpO Y8Tu8zbAUZq8G47GzvObtMNcrA+ibG89oQF50BULtCHIGBBSeI9UFRDcz39u3szvZZ8g QfQVXU1DP1h+cfAO8O7WKKLl9GIGJRVvTwS2N0YzP+W29uWen0NZYtZDHkpzg58WCyKt E+shZDM7EbA2cqej1J7ci+ZyRPtUM/CTuyFCybVhJaT2FUchQssurtAZ/mgFigoXUOnT tlCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=z6G4DqkUZO8hQbbfnhw+lIeG07LxAo5ykfRlVN8jc30=; fh=ZqJ3xrq0DGyvWtPBQo5VWOM7gaftcxyjM72UWd4YoC8=; b=rvlPq8Bz/mJsOhoMXGgGpEeTZqnaL2C6mm9tZj9EIXpNS+pJweKlT+znAMsj+gp7QS sn35VHeWYKF7epHdscu4n8MPNpBzn/GhimxbYypqmAgXjPmKrL9fwMcnvnrdU9C6ufAn 2Mn87GjPXi81eDxgdDTf5/g4in0uO0MVJbfvK1eo+G4unsOSkBqj3411GwyJSRUnxKfD Mldbn9E7UarV70sti9muG3GhA+f4jy1yc5yKUnkaVEdtaJy0aAYgzro6aTfZmlF2HdPu igYqL4L80QZvMjuWKGHbZLhZ+7s6UGiBXTduHMt/xzG+Zy9O4Hs45Q2tu5ElhPE4fu9H vMxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id v190-20020a6389c7000000b0054fd947f66dsi1938262pgd.210.2023.09.21.12.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 12:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6B89A819DFFE; Thu, 21 Sep 2023 10:50:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229589AbjIURud (ORCPT + 99 others); Thu, 21 Sep 2023 13:50:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbjIURuD (ORCPT ); Thu, 21 Sep 2023 13:50:03 -0400 Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FCD156D24; Thu, 21 Sep 2023 10:18:21 -0700 (PDT) Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 38L8vCrj047522; Thu, 21 Sep 2023 16:57:12 +0800 (+08) (envelope-from Huangzheng.Lai@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 38L8tSbb040500; Thu, 21 Sep 2023 16:55:28 +0800 (+08) (envelope-from Huangzheng.Lai@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx04.spreadtrum.com [10.0.1.214]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4Rrq0850kHz2SZykd; Thu, 21 Sep 2023 16:52:08 +0800 (CST) Received: from xm9614pcu.spreadtrum.com (10.13.2.29) by shmbx04.spreadtrum.com (10.0.1.214) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 21 Sep 2023 16:55:27 +0800 From: Huangzheng Lai To: Andi Shyti CC: Orson Zhai , Baolin Wang , Chunyan Zhang , , , huangzheng lai , Huangzheng Lai , Xiongpeng Wu Subject: [PATCH V2 0/7] i2c: sprd: Modification of UNISOC Platform I2C Driver Date: Thu, 21 Sep 2023 16:54:50 +0800 Message-ID: <20230921085457.32446-1-Huangzheng.Lai@unisoc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx04.spreadtrum.com (10.0.1.214) X-MAIL: SHSQR01.spreadtrum.com 38L8tSbb040500 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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: 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]); Thu, 21 Sep 2023 10:50:37 -0700 (PDT) Recently, some bugs have been discovered during use, and patch3 and patch5-7 are bug fixes. Also, this patchset add new features: patch1 allows I2C to use more frequencies for communication, patch2 allows I2C to use 'reset framework' for reset, and patch4 allows I2C controller to dynamically switch frequencies during use. change in V2 -Using 'I2C' instead of 'IIC' in the patch set. -Using imperative form in patch subject. -Use 'switch case' instead of 'else if' in PATCH 1/7. -Modify if (i2c_dev->rst != NULL) to if (i2c_dev->rst) in PATCH 2/7. -Modify some dev_err() to dev_warn() or dev_dbg(). -Clear i2c_dev->ack_flag in sprd_i2c_clear_ack() in PATCH 3/7. -Modify the indentation format of the code in PATCH 4/7. -Move sprd_i2c_enable() above its caller in PATCH 5/7. -Remove 'Set I2C_RX_ACK when clear irq' commit. -Add Fixes tags. Huangzheng Lai (7): i2c: sprd: Add configurations that support 1Mhz and 3.4Mhz frequencies i2c: sprd: Add I2C driver to use 'reset framework' function i2c: sprd: Use global variables to record I2C ack/nack status instead of local variables i2c: sprd: Add I2C controller driver to support dynamic switching of 400K/1M/3.4M frequency i2c: sprd: Configure the enable bit of the I2C controller before each transmission initiation i2c: sprd: Increase the waiting time for I2C transmission to avoid system crash issues i2c: sprd: Add I2C_NACK_EN and I2C_TRANS_EN control bits drivers/i2c/busses/i2c-sprd.c | 166 ++++++++++++++++++++++------------ 1 file changed, 106 insertions(+), 60 deletions(-) -- 2.17.1