Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37157994rwd; Tue, 11 Jul 2023 10:09:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlGNIB7UnOrt1jiqDCx+zBW9o5mt4NThsq7vcqUJtm0g/p9MrCaQco8CD71E0wYv5tlHeOsE X-Received: by 2002:a05:6a21:340a:b0:130:a400:1d65 with SMTP id yn10-20020a056a21340a00b00130a4001d65mr16679392pzb.14.1689095341401; Tue, 11 Jul 2023 10:09:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689095341; cv=none; d=google.com; s=arc-20160816; b=FfdYrrasGxy2Yd52wGurUoFZIDFB5OKuXIZP8A03lq16yZgW+RHrFxy9Kzt53tgf6z +sK9BH1/1leg1yohQfXB63s8M4wQmkD//JFUu23QDN87b8OdqNhDeQ1tfied8NXGnAj4 AvcTt6zcUg1GJYgLqWDwyfjLR1UCv67JAybT4JQnH5fP/jrCsJlDVaQbD07cmDLf3aFT iwtg8TDSPjAmksTPUwstLzaRiYvKW7Q5tOdr5dX9RGtuNUVasOOte730/tMlSb5I+0/O 1Y9qn+OoX1HOkcxgwesQgCrWoofEZ56zUJAv7VfHQrsBzJxgdW1KwEzQenegwOhuFUxu 4D/A== 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=+3YNvBazbMQlNenlLt7Z8u6jmQ7PpLqo2Es7F9N7uLc=; fh=52S1ceCtzuwpOUd8HtOZVrQNUc+hoxFl0/lmALQhqcg=; b=BqDsJD3cEvZqrpkDurd91HhxHLQu3OGWeKxMaWTz944EZ5KZs4TZA8cJFdKct4f5yX +/73WHGo+BXaed0xlYpoY8um/SJftzu+Jvmhw2SbHSjhkr3w415qj7mqjC0kvD7bSTZP VJAXYh5TvNTRajJY/x74SuDGxXqT1iE7EPSDflzscTphw6dgsutwVLZUVmUUPFIPxFKF gm96nE4u80mQBnGBdBZ1qP5aXMZcLppZr93J8MScQXA6Gd23b2fdA5CSkB2jbInTPgfh WbkFYgP+J/Z9MnUbEMu1WgjJEnRdm6sEdhcfRH3euH9goR7LAV5/HHk8Oxs85jhp9MeP fnww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=m6wv+eZC; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b27-20020a631b5b000000b00536b4c4b695si1654197pgm.136.2023.07.11.10.08.48; Tue, 11 Jul 2023 10:09:01 -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=@gmail.com header.s=20221208 header.b=m6wv+eZC; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231646AbjGKQQB (ORCPT + 99 others); Tue, 11 Jul 2023 12:16:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231834AbjGKQP4 (ORCPT ); Tue, 11 Jul 2023 12:15:56 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B239B10F6; Tue, 11 Jul 2023 09:15:53 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-51cff235226so11886910a12.0; Tue, 11 Jul 2023 09:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689092152; x=1691684152; 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=+3YNvBazbMQlNenlLt7Z8u6jmQ7PpLqo2Es7F9N7uLc=; b=m6wv+eZCBxEQXr8Ozexh8K+SxK/QKGuR6+iDyfzVSoR4HB0ekoJN8PAFacAcLZHTzM gI9bLUwRKfSr47ck4O6Cm06ExIp5FywzJPfDkKdtbCTMpMZDRTKdyINAdTAzckwIWFHv ne2WbmkCM7pxZQ8/WwVCvuEqAWBNIRW2s0X1HDkUyHzCYhf38/Q+uedwNWtsrOtcbOKp R5+4wYehC97hw1fsdl/FFoR7lPM1ta9idisqtyyezymqeaWDOKReuWkMYRmWiHryUGuF 5lpvi1yYsqqIgBuSgIa6v1wlFs2sboFBUxIFH0SHnuWZoF00Twt0WZuj6hWzOwhgTcDi JGTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689092152; x=1691684152; 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=+3YNvBazbMQlNenlLt7Z8u6jmQ7PpLqo2Es7F9N7uLc=; b=Egnj+c+8ijI3mbuhGHatwPEAgEHrHzbWCzG9GZ259h6ajA2lkaAngO7PL5K7O/VL+q IFbzHa6nlUAXfpGTBOYdwzXmzUjemFhY2QLDypMw/BOHT5y0W5uiekikRKtzCkLBDmQ6 VvjRQdBvGCg5PZTav4hYf3iu9PoP6VO+5TCSayl7YOLzCJvrH5WioS08Q4nuGp/85k0M gMb7+LcyD6SSGWKsgGjgh5iP4uX0L6x/2NUSz0jF/flfbT9V0b/yBkp0ZFFfxWTGV+a8 nwjDgqyLbEwXPMSgo/Pa+OXuhWSV4Z9UZvL20mCo2SP4pw6FIY7I3TwXx1HY9FhqC/93 O5Dw== X-Gm-Message-State: ABy/qLbJ5eU3qjABt1y5H7CMjPD4oiQgae57kyM8qa5rk2Rf/OFy+4WZ 0pQvJAsvxumKlnDloEgwa7bSYaftMh13/qqlFNbd7AMxoKI= X-Received: by 2002:a05:6402:520c:b0:51e:538c:1e19 with SMTP id s12-20020a056402520c00b0051e538c1e19mr14034219edd.15.1689092151844; Tue, 11 Jul 2023 09:15:51 -0700 (PDT) MIME-Version: 1.0 References: <20230711151248.4750-1-asmaa@nvidia.com> In-Reply-To: <20230711151248.4750-1-asmaa@nvidia.com> From: Andy Shevchenko Date: Tue, 11 Jul 2023 19:15:15 +0300 Message-ID: Subject: Re: [PATCH v2 1/1] gpio: mmio: handle "ngpios" properly in bgpio_init() To: Asmaa Mnebhi Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com, brgl@bgdev.pl, 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, Jul 11, 2023 at 6: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 > --- > The following 2 patches were approved in March 2023 but didn't make > it into the tree: > [PATCH v4] gpio: mmio: handle "ngpios" properly in bgpio_init() > [PATCH v1] gpio: mmio: fix calculation of bgpio_bits > > They needed a rebase and were combined into a single patch since > "gpio: mmio: fix calculation of bgpio_bits" fixes a bug in > "gpio: mmio: handle "ngpios" properly in bgpio_init()" And hence Linus' tag had been dropped. LGTM now, thank you for pursuing this! I hope Linus can review it again and Bart will be okay with the result to be applied. > v1->v2: > - Added the tags > - Updated the changelog --=20 With Best Regards, Andy Shevchenko