From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E05EC48BDF for ; Fri, 18 Jun 2021 04:00:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0571061059 for ; Fri, 18 Jun 2021 04:00:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbhFRECZ (ORCPT ); Fri, 18 Jun 2021 00:02:25 -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: devicetree@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 > >