Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1045992pxj; Thu, 17 Jun 2021 21:07:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpjCLPdDhA8RFl4OQM2pFYAmC9txcpzpPejvccQUZs2+6HE0fBeQG2TZpcRsgzRkI1SPdV X-Received: by 2002:a02:cc33:: with SMTP id o19mr1500295jap.12.1623989277415; Thu, 17 Jun 2021 21:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623989277; cv=none; d=google.com; s=arc-20160816; b=e2o2h8jKfc/M9lR85BBTVFhvF5LM8FEHS9SSG0RS4wwQ56TkK+3ObFzsEtd+UJ3t3J v4hDuneYiCDhQxS0vmwgdpUom7uF9UgZDem9s8hciWjBqNbvzWeey7xaKtGzhc8J+3TU ccy3qahAlJUfQDWVTs5k9Nuti13OOgGGtK2Se5SVe97VT4Ry0KRGbe0aDrbry8jn8qff EeyjTzXrazjUpN2a98TIx+BzRDRgne7t/4RKbSa2z+2THtqOpqwP5XDYYESjo9qi6+RL BEMX/nduSlcO1luooIzSKqgIeDapdAW7HpmJhLwwlgjHQEZiSfNNfHkBsSewhgtRajHY VJ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=iKneCyMNyMiU7maxDsd53bMsVzgYQ34MWSO9iydA87g=; b=I16i7L125iztX5Xlb6bV2xMgeff3J5DJWVjRjZ+hU6+12xGdnhovpVOWe7tAfRGkMZ BB7swdqNRAoWCut3SJac77fbfUEHtBmaueHkXK91BrZzHY0aGCvGNwMQvLXYhUXY6z7s loTcEmeIuvfbV5w1w88MjG/4GXp8yCsFMIOBNpgHOPCAYQWU0PzMawnJ1znYT9x4w2k2 JRSZs/2rWVtX9KIKq3XhfhImv/3YsdOnK9y21v1/LiT06wZ6DNArolzF73CgWE54IPP2 clZ80NTzo8yF2uuvMkZeXLHL0877iAw7/VlOcTXuMtSPo6nGXsWg0P76wQYBbHL/CEdF F1ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si8392810jad.8.2021.06.17.21.07.45; Thu, 17 Jun 2021 21:07:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229646AbhFREC0 (ORCPT + 99 others); Fri, 18 Jun 2021 00:02:26 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:59639 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229466AbhFRECZ (ORCPT ); Fri, 18 Jun 2021 00:02:25 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 15I3ic7p020343; Fri, 18 Jun 2021 11:44:38 +0800 (GMT-8) (envelope-from jamin_lin@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 18 Jun 2021 11:59:01 +0800 Date: Fri, 18 Jun 2021 11:58:55 +0800 From: Jamin Lin To: Andy Shevchenko CC: Rob Herring , Joel Stanley , "Andrew Jeffery" , Philipp Zabel , "Wolfram Sang" , Arnd Bergmann , "Jean Delvare" , Jarkko Nikula , Khalil Blaiech , Krzysztof Kozlowski , Geert Uytterhoeven , Bence =?utf-8?B?Q3PDs2vDoXM=?= , Yicong Yang , Mike Rapoport , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Ryan Chen , "open list:I2C SUBSYSTEM HOST DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , ChiaWei Wang , Troy Lee , Steven Lee Subject: Re: [PATCH 3/3] i2c:support new register set for ast2600 Message-ID: <20210618035855.GB31659@aspeedtech.com> References: <20210617094424.27123-1-jamin_lin@aspeedtech.com> <20210617094424.27123-4-jamin_lin@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 15I3ic7p020343 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 06/17/2021 10:36, Andy Shevchenko wrote: > On Thu, Jun 17, 2021 at 05:43:40PM +0800, Jamin Lin wrote: > > Add i2c new driver to support new register set for AST2600. > > AST2600 support three modes for data transfer which are > > byte mode, buffer mode and dma mode, respectively. > > The global driver of i2c is used to set the new register > > mode and define the base clock frequency > > of baseclk_1~baseclk_4. > > > > Signed-off-by: Jamin Lin > > --- > > drivers/i2c/busses/Kconfig | 11 + > > drivers/i2c/busses/Makefile | 1 + > > drivers/i2c/busses/ast2600-i2c-global.c | 205 +++ > > drivers/i2c/busses/ast2600-i2c-global.h | 25 + > > drivers/i2c/busses/i2c-new-aspeed.c | 1796 +++++++++++++++++++++++ > > I commented _something_ (but read comments carefully, they will cover much > more). The overall it seems you have to: > - shrink the code base by at least ~15% (it's possible), i.e. -200 LOCs Can you describe it more detail? Do you mean I should separate the patch file to fix size limitation? > - rethink how you do calculations and bit operations > - better code style > Thanks for your review and very good suggestion I will update them and sent patch again. By the way, I received test failed email from Robot due to compiling warning. I will fix them, too. > -- > With Best Regards, > Andy Shevchenko > >