Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5923606iob; Tue, 10 May 2022 06:49:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5T/1E8TEacjiPjJMN9WxIy3Kd3jSF9fHHnwJdofdvft8/Yg/V6i/U4i3wmWjdSIxVAJPJ X-Received: by 2002:a17:906:804b:b0:6f3:8d78:ffa8 with SMTP id x11-20020a170906804b00b006f38d78ffa8mr19937519ejw.588.1652190570264; Tue, 10 May 2022 06:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652190570; cv=none; d=google.com; s=arc-20160816; b=Ftm069lAdafnh2J+njQzKUUS6FUK4GtzpxHgdAR23tyl+AsxJLyds5tVBBjSrP3+Cp tKARVFZRlUpMAzN/XeIZRYW8aaR1GR2k03VidKyPw1jGjZWrKDMgUjQXNR/rtLJBgJVJ OdN7dxml1zXJ6kbIHCq9pSqwH71qfa96i6PKkvAksaTq5svu5sBKKioVrLgFXkyoScbu 1mrkHEs6KMMw8vDh48sR/lGc19nD7gEM6aWJ91p+x2nu4BH2Z3i0TF5O9ohN2UoJ+W0W w6UStUaDlUs4b+BUf58lOjOexinCLA9xT883nnI/slAlCS03EkYhXBHpzIesbrdjE/uM tJpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UIZf2mb+nRcyXrIwrUk9H1s8jDWIHlr7p1SIVq99s9I=; b=igW0zfhPhGmsCddpnFVCJl8dNRl+vBat4RsbuKlGWdHSy1Sncw1A9odaeIcPHKnPRw xcs+ZI/9yxNbRcPFnbXcYgDayosWCToDPfo188Bx2e11wQHnX6hRRCDTOwZs2yiUgVO+ 6RuhH+ZTcTAv/Lcvpq6fOZTDXt0C8W66eshvJYFhmCDb353qKFrM2ajopRcGwiIOy7zk hzqYzMyUrQvg3Dr9ADMqd4Cbs5BCqyaOzQS7fGbrfmxAJW3d5I+vEb52N/sAquWAx3Iz VmrKFsDBLPL4Eb+LsSiNO8S3oQZVfpXXImwsUpLdkyduWQKTaziq8CErL92ly4ppVjYR nyzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NB+TWyT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a05640250d000b00421b5d86019si19133038edb.45.2022.05.10.06.49.06; Tue, 10 May 2022 06:49:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NB+TWyT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239714AbiEJKXb (ORCPT + 99 others); Tue, 10 May 2022 06:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239707AbiEJKX1 (ORCPT ); Tue, 10 May 2022 06:23:27 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 690892555AF; Tue, 10 May 2022 03:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652177971; x=1683713971; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=nXHxCMDwnYM34gDLMPSIohgzS3+HPWiv+a82UDu22gc=; b=NB+TWyT8hUv8OjSVcsNu88eHevAIngdhF6GGj1yOeVyB+Cz/JlFmx9Kr VxPD5iH121RkMYSZ0OgL9RI7jSxaJd4jGubhaib+OFCYe+BJTMIZTeCdd CFQRpOJl5w9Eeqa+tzTkgFdAPYaiz1PxxMn3WVFg7BxENzyRti6duFhQJ 8Q0K+Xs1Lmm3JUuUdjTfxNVmZIYh9GE6R0GyrU3tXBkKxVVA9nQun1MK9 q2WnYReMOFtF/i5tRZtEY5OXGR+TtlVY/jCJ2At1IF0x6Gaz/0IUM/lZc Lx1ZdWfwCzWO331A8BnhjxJWuWhCqJnzVs6aIdWI6AgionDKrZf29yGS9 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="266916311" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="266916311" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 03:19:31 -0700 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="669819774" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 03:19:25 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1noMxc-00EIJZ-VW; Tue, 10 May 2022 13:19:20 +0300 Date: Tue, 10 May 2022 13:19:20 +0300 From: Andy Shevchenko To: Tyrone Ting Cc: avifishman70@gmail.com, tmaimon77@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, robh+dt@kernel.org, krzysztof.kozlowski@canonical.com, wsa@kernel.org, jarkko.nikula@linux.intel.com, semen.protsenko@linaro.org, sven@svenpeter.dev, jie.deng@intel.com, jsd@semihalf.com, lukas.bulwahn@gmail.com, olof@lixom.net, arnd@arndb.de, tali.perry@nuvoton.com, Avi.Fishman@nuvoton.com, tomer.maimon@nuvoton.com, KWLIU@nuvoton.com, JJLIU0@nuvoton.com, kfting@nuvoton.com, openbmc@lists.ozlabs.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 8/9] i2c: npcm: Remove own slave addresses 2:10 Message-ID: References: <20220510091654.8498-1-warp5tw@gmail.com> <20220510091654.8498-9-warp5tw@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220510091654.8498-9-warp5tw@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Tue, May 10, 2022 at 05:16:53PM +0800, Tyrone Ting wrote: > From: Tali Perry > > NPCM can support up to 10 own slave addresses. > In practice, only one address is actually being used. > In order to access addresses 2 and above, need to switch > register banks. The switch needs spinlock. > To avoid using spinlock for this useless feature > removed support of SA >= 2. > Also fix returned slave event enum. > > Remove some comment since the bank selection is not > required. The bank selection is not required since > the supported slave addresses are reduced. Fancy indentation. Please fix it in all your commit messages where it applies. ... > + if (addr_type > I2C_SLAVE_ADDR2 && addr_type <= I2C_SLAVE_ADDR10) { > + dev_err(bus->dev, > + "try to enable more then 2 SA not supported\n"); Make it one line and drop {}. > + } ... > + if (addr_type > I2C_SLAVE_ADDR2 && addr_type <= I2C_SLAVE_ADDR10) { > + dev_err(bus->dev, > + "get slave: try to use more then 2 slave addresses not supported\n"); As per above be consistent with abbreviations ("SA" here, which makes line shorter) and follow the above recommendation. > + } -- With Best Regards, Andy Shevchenko