Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1160463rda; Mon, 23 Oct 2023 04:44:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJ2bMv5z6LtBSk/hmSBQR9y+iXwArlaa/9NkivY8oQquHBjIqwBQIy7/rOJM8/jpoxDMA9 X-Received: by 2002:a05:6359:63a7:b0:168:ea51:23d with SMTP id sg39-20020a05635963a700b00168ea51023dmr275323rwb.26.1698061472863; Mon, 23 Oct 2023 04:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698061472; cv=none; d=google.com; s=arc-20160816; b=Hz4EKaJ6SHMnk6sCyaI428z/zqCPvIjv9IjQOX5hBtHuLrdj1C40IufOH3bRsH1JH/ 7uEPHJbfGF+qrWHquLFjDYbhW6dH34dwiYwIloh83ifNWN/oBVsfBsXqM58nGFLPjolr 31bk9NJRV7gK0jn8fgYGjxTJZWhJ9i5E+4KSVrSrHkzOQmC/3L1pUt98/P55Sf2U1JFj V7t3qiEfu3drwyyzFzQpv6084lNPk7xcLOFY5HuIyuOKk6dbNssMiN5p+5cXM2lKBwgC 13+Cz/2cuMg66fj4ebHbrcyCwK3qnumD+akvmk0KzouxukGp11enmZQTtwDt9cPMIl+z Yo+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=ZJVwDuSHmN/ry1pwp34G1oSa0Vk0CsjhMiwFivYXxyg=; fh=tr/fgHUcpLpbS4VIozjfnV7mG4hJKNrvAEbZeaGGeJc=; b=AnY6dicUUkZC1GccUZiNU4UBxbJLSYAPdZy/FO5jMOJrR10HDapEXUZ9346POqHEPm nepnyCMaK1DPeGt40koJ++Ry9EFCMORhGuWiRDgv5RsRokGNE7zFyYmr+TtH2NuIw0oA yipPxwryhHm4KudOfDJywQpRz3MslYGNPlD1BGOT3nBFqYKTIjf+O/SpPCRriWqvrmQ5 R3n1tUvOpIyFLRFwG2vIycyZxhaMqepRThUDbbpuV6N7hn84B/jdo6C0pEVImHjahoah AHNNzz2GzeiK9UwiHAfnmxB647j6zFfMKikgAXgJrZ9QYElFbB9F6k519CeV0RUswowY dRwQ== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id f21-20020a633815000000b00573f885c4edsi6178427pga.368.2023.10.23.04.44.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 04:44:32 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5FDB880A9983; Mon, 23 Oct 2023 04:44:25 -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 S234394AbjJWLnq (ORCPT + 99 others); Mon, 23 Oct 2023 07:43:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234407AbjJWLn3 (ORCPT ); Mon, 23 Oct 2023 07:43:29 -0400 Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E30310F7; Mon, 23 Oct 2023 04:43:25 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R411e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VukmBk1_1698061400; Received: from 30.97.48.63(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VukmBk1_1698061400) by smtp.aliyun-inc.com; Mon, 23 Oct 2023 19:43:21 +0800 Message-ID: <33b514a0-2ea3-35d6-944c-03ce4c61a6c4@linux.alibaba.com> Date: Mon, 23 Oct 2023 19:43:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH V2 7/7] i2c: sprd: Add I2C_NACK_EN and I2C_TRANS_EN control bits To: Huangzheng Lai , Andi Shyti Cc: Orson Zhai , Chunyan Zhang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, huangzheng lai , Xiongpeng Wu References: <20231023081158.10654-1-Huangzheng.Lai@unisoc.com> <20231023081158.10654-8-Huangzheng.Lai@unisoc.com> From: Baolin Wang In-Reply-To: <20231023081158.10654-8-Huangzheng.Lai@unisoc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY 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: 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, 23 Oct 2023 04:44:26 -0700 (PDT) On 10/23/2023 4:11 PM, Huangzheng Lai wrote: > The new I2C IP version on the UNISOC platform has added I2C_NACK_EN and > I2C_TRANS_EN control bits. To ensure that the I2C controller can initiate > transmission smoothly, these two bits need to be configured. What is the side impact for old hardwares that does not support these 2 bits? > Signed-off-by: Huangzheng Lai > --- > drivers/i2c/busses/i2c-sprd.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c > index dbdac89ad482..431c0db84d22 100644 > --- a/drivers/i2c/busses/i2c-sprd.c > +++ b/drivers/i2c/busses/i2c-sprd.c > @@ -33,6 +33,8 @@ > #define ADDR_RST 0x2c > > /* I2C_CTL */ > +#define I2C_NACK_EN BIT(22) > +#define I2C_TRANS_EN BIT(21) > #define STP_EN BIT(20) > #define FIFO_AF_LVL_MASK GENMASK(19, 16) > #define FIFO_AF_LVL 16 > @@ -366,7 +368,7 @@ static void sprd_i2c_enable(struct sprd_i2c *i2c_dev) > sprd_i2c_clear_irq(i2c_dev); > > tmp = readl(i2c_dev->base + I2C_CTL); > - writel(tmp | I2C_EN | I2C_INT_EN, i2c_dev->base + I2C_CTL); > + writel(tmp | I2C_EN | I2C_INT_EN | I2C_NACK_EN | I2C_TRANS_EN, i2c_dev->base + I2C_CTL); > } > > static int sprd_i2c_master_xfer(struct i2c_adapter *i2c_adap,