Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1751157rdh; Tue, 26 Sep 2023 02:21:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKXJMleGMf9g9SPnhovUJN7asvfuPWnzj4LePoRBB8P2XZwpBqg60VZHRhSUD7gQDWzmtc X-Received: by 2002:a81:a54a:0:b0:598:7836:aac1 with SMTP id v10-20020a81a54a000000b005987836aac1mr8347069ywg.49.1695720108946; Tue, 26 Sep 2023 02:21:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695720108; cv=none; d=google.com; s=arc-20160816; b=aFaek4SDOxQiYXg7Apc6ANX5GKG3LD+exn6Gy83IIAeDO2iFGOJWrgv25w9rP/+Mlq YLZlhR1NIOykNjqUNlQky4h+JvsQTPPczH7Bdk+EULH0n0o8cQWcWhhNhA+l3t3f/OIA YfgpSC+8D/hYAzX7Lmi8r3wqicXrMcm7AY7hGJsMjAK6RdJONvG93K8Q67ky+OeK9hEN CI3l5vGSZincV1/a24/0ndSHeAI2ThcVJpMK9ksWa3iFXruRB8uqQsRzfs0Ph1yWN6eQ 1bAFC3gdTYfx7SawJzkfJqfaUQYR2bu52pP6/Xu6M2RAD8GPwCPLCm+W6cm7QfKpWdLt t3nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=62i6jKle2TrQicZgJBk/autmG/K7qzxoSj1CVO2zc+w=; fh=K7RwD7eUiOsVywLOJXemzfqYIJolWARlH55gOPkqDWc=; b=1ChDVv/6T/dgQI7jJhxNR5Y8Mj2WxmFRQNL3lGoBMXupP605d4gOSYddp+g0R+D/aw B4v21jR9+SGjVLfjK3OfbKYZ2EHNEV2CW7prkpDbCKIxXbtnwRpz7aHx0yZgE4UeklKX XBrsO9KaxwMOlh1jDWtoiQ5q95pxX71iPTdgYeoe5W8XNPjjCZTiOrFzPeoozcp5lTZB XE1XtnIdGjXcUo9HNsI847sC4PwI8nlsrOJY96MO0JkU+F5t582nQpbEOB7rA475SHZw 8GhnwOmT4rdzaZALtSx7tNs+8CX17XYu56SPuMG2c+02NNhU0VOMxVVBBfTTUA+iqJjV 9kbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LEwU4lFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w71-20020a63824a000000b00573fd75b486si12483705pgd.658.2023.09.26.02.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 02:21:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LEwU4lFe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4F4418023885; Tue, 26 Sep 2023 02:17:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234087AbjIZJQ7 (ORCPT + 99 others); Tue, 26 Sep 2023 05:16:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbjIZJQ6 (ORCPT ); Tue, 26 Sep 2023 05:16:58 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4984E6; Tue, 26 Sep 2023 02:16:50 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id CD6F340004; Tue, 26 Sep 2023 09:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695719809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=62i6jKle2TrQicZgJBk/autmG/K7qzxoSj1CVO2zc+w=; b=LEwU4lFeHRNnHHEVD100Q7J4C1swRhuGuU9sigjtpACm+bhaLpArGlAqMfJspzhIFeBUcQ Fy0WS340DGTFyJUi/5F11vXu7qXVai/0vdRLqMjDus8oOWW6TsnYmI6JLOYYJrkTxUVyN+ L/Doi05uXxgBshAo9saucTBogZODomazcwPZrv4yilbcs0gpHDXCh0FieUi+yPF/X9EyRo 0TBaCFbp+RRBEiA0PizTbjdhxhpH6kR/E4qpYgsgoYeBrFEr5Klv1FRX+1n4wtzAZ1Q9BE MgEn1anNzShjL0OKx7LrlOdmM4sFqwLAZmIFGnUPPyO/jcAmrCJVni9GjFAQfA== Date: Tue, 26 Sep 2023 11:16:43 +0200 From: Miquel Raynal To: Bartosz Golaszewski Cc: Linus Walleij , Andy Shevchenko , Harvey Hunt , Paul Cercueil , Richard Weinberger , Vignesh Raghavendra , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-mips@vger.kernel.org, Bartosz Golaszewski Subject: Re: [RFT PATCH] mtd: rawnand: ingenic: move the GPIO quirk to gpiolib-of.c Message-ID: <20230926111643.58ee4587@xps-13> In-Reply-To: <20230926090623.35595-1-brgl@bgdev.pl> References: <20230926090623.35595-1-brgl@bgdev.pl> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 26 Sep 2023 02:17:17 -0700 (PDT) Hi Bartosz, brgl@bgdev.pl wrote on Tue, 26 Sep 2023 11:06:23 +0200: > From: Bartosz Golaszewski >=20 > We have a special place for OF polarity quirks in gpiolib-of.c. Let's > move this over there so that it doesn't pollute the driver. >=20 > Signed-off-by: Bartosz Golaszewski > --- > This is an alternative to the previous patch that instead of replacing > one active-low setter with another, just moves the quirk over to > gpiolib-of.c >=20 > drivers/gpio/gpiolib-of.c | 9 +++++++++ > drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 12 ------------ > 2 files changed, 9 insertions(+), 12 deletions(-) >=20 > diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c > index 5515f32cf19b..58c0bbe9d569 100644 > --- a/drivers/gpio/gpiolib-of.c > +++ b/drivers/gpio/gpiolib-of.c > @@ -192,6 +192,15 @@ static void of_gpio_try_fixup_polarity(const struct = device_node *np, > */ > { "himax,hx8357", "gpios-reset", false }, > { "himax,hx8369", "gpios-reset", false }, > + /* > + * The rb-gpios semantics was undocumented and qi,lb60 (along with > + * the ingenic driver) got it wrong. The active state encodes the > + * NAND ready state, which is high level. Since there's no signal > + * inverter on this board, it should be active-high. Let's fix that > + * here for older DTs so we can re-use the generic nand_gpio_waitrdy() > + * helper, and be consistent with what other drivers do. > + */ > + { "qi,lb60", "rb-gpios", true }, I didn't know about such a list, interesting. Better be aware when debugging :) IIRC Linus was fine, so if Paul also agrees I guess this is better taking through the gpio tree? I don't have any ingenic related changes queued right now so feel free to take it. Acked-by: Miquel Raynal Thanks, Miqu=C3=A8l