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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 1C9A0C48BDF for ; Fri, 18 Jun 2021 04:39:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C1C4E60FE9 for ; Fri, 18 Jun 2021 04:39:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1C4E60FE9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JUdc5MZ9e1PYjTSYlqDuaV7xbWVt78Rznz+bs2LP/f4=; b=W5iXKKtTlp75FD 21fI7mEf2ddoD5C0B7qItxBrBzfeqpSiSOkLSMScIhgsyb/P1sM9lIeRxgROs8H+3Orj3CRuImPei m0tQkzwiZ8z0Li83YmWcGwIa4vcOdQCeV3KFnjHo6OXf/prJTtMyDMlIxVC8lMSg+Giy8p19oDDsK VtRrDfeCFG3qvILGRGCujG+a8vPZKhEd5UiKdpxaWn6kLcoAExdScykWEioIIk/HL7jjCs4SFOXJw KwhNcxXPEr9QPB3Q8D5aHssKfwjtAoC4ieEnB4r1SF2uIW0glbbKUcATfE2so2+MJuPEkDy++ft29 3iTTCdoj9QuMzN4/B9EQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu6GZ-00Cd9x-IZ; Fri, 18 Jun 2021 04:38:03 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu6GX-00Cd9q-Iq for linux-arm-kernel@bombadil.infradead.org; Fri, 18 Jun 2021 04:38:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=iKneCyMNyMiU7maxDsd53bMsVzgYQ34MWSO9iydA87g=; b=jQFp9I0kir9toMo3rd0rheX4Qx kFx0NsjfqoZ1PJ7ZUsTDqjn/ZRXT+hBhbY1eGKdOjrik0We98n48ekd5GMXucY0MGdrjHWkwcCkX7 YdoDGbKxXIP/xV5gQx40Notr425l3alpTJ6+81noUTMq6cJR0kgZhYKUmnvP6uGSYLTDk9/ZtkJ3v ykOWuJ2fTgm0jq0TuqzGRoph50LQqBlkbC4vLnN7oqLDAv59RnyMNkalI8Ekg6h19kBBXs9LzYtYX 6vrucOVzIu91OSw0oJ8zJ8qgwWZG7lF9rDc4mG74FJgZl8UL7okwpqaQO8sHiRu0T6enbCqs7jvJ1 rk3q2lKw==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lu5fK-0092wi-Pm for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 03:59:43 +0000 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-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_045942_301335_346A66A2 X-CRM114-Status: GOOD ( 17.47 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel