Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7223853rwp; Tue, 18 Jul 2023 11:55:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlEhUIsvn464k1qvCyYGEOXmTCeFyYy6m+MF0C8BrAq7djvfki4eYxASA6wlpvThWkyN3Nrq X-Received: by 2002:a17:902:c945:b0:1b8:6cbd:96f1 with SMTP id i5-20020a170902c94500b001b86cbd96f1mr19428364pla.66.1689706523670; Tue, 18 Jul 2023 11:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689706523; cv=none; d=google.com; s=arc-20160816; b=hSAcXtz+63aZwX7mmPsMrtR80GQz7bhPq8V8ScyFN83UaK3dKm2N4KlL0hlQ4o//p9 m4K3XVxFPkEMs3n7qbAKaj7sj5es9I+wM5tdxm7rtNqY1HSng5SybVJVqGVFGDhsd9BN Lw2eIe/agZteVOmTZv1qDVXgnvz/jYpM221JREHuO/q2LDELno9+eYmbrpaTSVKf6/9D lBTG29rDtK0nVDVA47v9+GHQ4g+R6wcbvu1NZESYRHQL4SGpg1V7DGkyONwkHB0S6kPd TwXQG3LlGMgSF9SmggEK1jfS7HsKBR52tWiLqJpoLx11MIF1dGsrK5AoCI42JpaZgj5+ jmfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xrugx7KI1EVrxuOX8UYknjbUTHEed/rOAZZDAg45sNo=; fh=qMLhzbCj+MuHNAuZBv13nqcV6DzlFj1VEnwcUsQwdag=; b=iMo1QJuSAMMaZimXKS+m7s0GYaSScgNzWe1BeSDMOOI4qc7X980JsdY0KHQ5oXykGu ix3S9efA3RK9/qBxK4N2ouUNdtgADXtSN7Jo5gEEYmQCBMLCOe/rLiGbqJ+Kfu6zB6jP GrqX6gJ0TFrv9i2qKYGL3U3Xm9ZE5H+Rc6LGULf0jlB86nyQ6u/vc/ICXwP5B7XH05uP A+ALQ3GrfIdHA2k8OJ5FaLiR+XqkVYs1YDgHnpe4zVBBD4/GJsfWtBoI7sn9xvdHwuBg UBOgFv1SHbOWGdf6UkvXzLIIeaGnpjF3QjJMcwCkcbQK2KsoCtht7md+jdsoyQXCWWPE 2BOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=fONXT3gI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170902dad100b001b8ae5d825bsi2042191plx.612.2023.07.18.11.55.10; Tue, 18 Jul 2023 11:55:23 -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=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=fONXT3gI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229646AbjGRSVF (ORCPT + 99 others); Tue, 18 Jul 2023 14:21:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbjGRSVD (ORCPT ); Tue, 18 Jul 2023 14:21:03 -0400 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CA3EDD for ; Tue, 18 Jul 2023 11:21:02 -0700 (PDT) Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-78f208ebf29so1868594241.3 for ; Tue, 18 Jul 2023 11:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1689704461; x=1692296461; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xrugx7KI1EVrxuOX8UYknjbUTHEed/rOAZZDAg45sNo=; b=fONXT3gIOLqAdNT92yIJWsaEBJcCpfqrLAh5LfKVz021q3iNnvd/wVAZkPJeoy1pVt gsdn/7BsjQq697y5LFuu5ZqujTCqQguuMn+SbGekSpPKBWA3HpHWsCTbEKS2PKMNR9zb 4YxrXizTL07CZyQT567urzA4KNJbskptw6KU0eMFzcrrK7Ijbzyr5FT3JnzfX+m9q3ym HiN1fzTimyZ1r55CdZ4wtrrEm2+poVc6QX96mQxi8vbSR2Gn6AHNnVduwW9+V2L3abzE PwaNfD5oQca/3hzec+w+dZQl70ajhAWkW7migjR08rPyo1zh0jjim6Gpk7y++PZm2fKt 3gwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689704461; x=1692296461; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xrugx7KI1EVrxuOX8UYknjbUTHEed/rOAZZDAg45sNo=; b=NW3bl5KKp2KeIiz82+U5UscOXns/mR9dmwOfAd5oeDXkCFKB6M3La2k9AjaqSPNOhg cT5XAJPJ/e8lnz5iHSLT4bJ82I7WbHW2XspEPo2csO6dGXljNpoKNoJrfM0f7R2UOx3D IJbkj9Lg5TSfU05jCQjrGz2apWPZerNig29oCzTk1MmUqPfR+XgbzlMQQSGKNAeURP05 a/bxfcJn/FCzXc18Rh0cXRYRAdSnXGgM8/gTnHTpibuAK3TSFHCAhCVVsxCSsQbM9YKR 5ZCQA0v92/CPtpD0ohPPkUUOf1SPNmVHNGG40ongrrL4fUvBsTjD5FYhBK/ayOaPCr8y PCqA== X-Gm-Message-State: ABy/qLb01YrqhpJK44CkDfzK9bsZqtkxPBffywu7z2u8t4oTtHqZZ32G ouvDXd6XISmKshDS6oAhqnOnScG/tlQi/ILmvx9KEQ== X-Received: by 2002:a05:6102:24b:b0:443:73ac:896d with SMTP id a11-20020a056102024b00b0044373ac896dmr6866028vsq.27.1689704461617; Tue, 18 Jul 2023 11:21:01 -0700 (PDT) MIME-Version: 1.0 References: <20230711151248.4750-1-asmaa@nvidia.com> In-Reply-To: <20230711151248.4750-1-asmaa@nvidia.com> From: Bartosz Golaszewski Date: Tue, 18 Jul 2023 20:20:50 +0200 Message-ID: Subject: Re: [PATCH v2 1/1] gpio: mmio: handle "ngpios" properly in bgpio_init() To: Asmaa Mnebhi Cc: andy.shevchenko@gmail.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, davthompson@nvidia.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, Jul 11, 2023 at 5:13=E2=80=AFPM Asmaa Mnebhi wro= te: > > bgpio_init() uses "sz" argument to populate ngpio, which is not > accurate. Instead, read the "ngpios" property from the DT and if it > doesn't exist, use the "sz" argument. With this change, drivers no > longer need to overwrite the ngpio variable after calling bgpio_init(). > > If the "ngpios" property is specified, bgpio_bits is calculated > as the round up value of ngpio. At the moment, the only requirement > specified is that the round up value must be a multiple of 8 but > it should also be a power of 2 because we provide accessors based > on the bank size in bgpio_setup_accessors(). > > Signed-off-by: Asmaa Mnebhi > Reviewed-by: Andy Shevchenko > --- I'm confused. Is this the final version after all? Bart