Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3487400rdb; Wed, 13 Sep 2023 13:39:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnlEHcWOrQXpnoWyNmp3hVzI0LL2SN2HqH5TNYtzaopWp+XQyd1cAvLIblEhlk3Q0AmmbM X-Received: by 2002:a17:90a:43a5:b0:268:4485:c868 with SMTP id r34-20020a17090a43a500b002684485c868mr2864423pjg.49.1694637550364; Wed, 13 Sep 2023 13:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694637550; cv=none; d=google.com; s=arc-20160816; b=o1+Kpchv+ocjZarQGZwowBI5dlm8AUb9AJfbyYP4on0VSvH3afDIF/cUjB8rD1wwem waJRldDgFUEn9ridr1N0HBDdnDyornOh+2zNdCCBlQeGGb2rFo9O5BMo7Xdd08RdKmpQ RpYCemuST7XT3t8WtmIgX50vfi6DAlZxYLw22+mD39IOWIqDhzoX3+9wtNc2qeZfRlrr YBr5xetEdHX9sNFbfIZqwNgT7OsiwuKpkC8Et5Q2q5rDWSpnUGe9av2SoE50sKq9AkOq cB1lfED9YGCneCq0ni1thCm+7S/jFa+kWra6deLP6x3Zm5uRj14LCWGe4KE6rNFpPD/p O5gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=GWLRygrELKKqAaeytnPuS49YfDZXBa1fKuVzJNWsNlU=; fh=iKfSVwINtwnLoe7H7PMFCBtuZdS9DU7/gmKfZx7sG9I=; b=elc4Zk3EjNqVk4Hahb1SFdTdPRjONsJsTY2irXFYgfv8U32F4EUb3ldD4cJhz7fGDC KVZSR57FMhQhS6+smqz2rxtVz+OaNoxTozFv9kR7mO8QZoZTn1DwQ6s5ovIByCbWdudH fKSZohjqJki2ix30IDBK8nhun/Tlaxzgi6Gw/DlEmL8P0hjaLULxT9AWTitt1Sbfp9DI 5gQNJj3iIVQQVRk6fiPqaD+EbLc4oT6Aps4bzoPE0kObyhskQZXydHJKHRlyHAgohT5b ggdLxOvwI1vMrKS3JQt0Dx+/cpjXjB62uZ8SJ0G+NTgXFdio+9BP5zDI4bNE5bwBOG4Y 4riQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b="1QIV1/Po"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id mh9-20020a17090b4ac900b0026831f63e8csi2467211pjb.52.2023.09.13.13.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 13:39:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b="1QIV1/Po"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id AEDF482B515F; Wed, 13 Sep 2023 05:02:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239926AbjIMMB7 (ORCPT + 99 others); Wed, 13 Sep 2023 08:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234848AbjIMMB5 (ORCPT ); Wed, 13 Sep 2023 08:01:57 -0400 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C7C819B0; Wed, 13 Sep 2023 05:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1694606510; 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=GWLRygrELKKqAaeytnPuS49YfDZXBa1fKuVzJNWsNlU=; b=1QIV1/PoaT+FV+H/sxFzRq6rhuLVR+DSOCBfMOd1OZfn+hsdGTHEPg1/oMtHongC2CnBpe EqeScdSNy0Xo8ZVuo3CeW8HKKTh2RXsJePltFJv4w2/9KR4xsE92deDseOAqXQUVjOYO0+ W19vDjwiP4eU4cPbUw31kE7+153Bi84= Message-ID: Subject: Re: [PATCH 2/5] mtd: rawnand: ingenic: use gpiod_set_active_high() From: Paul Cercueil To: Bartosz Golaszewski , Linus Walleij , Andy Shevchenko , Ulf Hansson , Harvey Hunt , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Daniel Scally , Hans de Goede , Mark Gross , Heiner Kallweit Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org, linux-mtd@lists.infradead.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski Date: Wed, 13 Sep 2023 14:01:47 +0200 In-Reply-To: <20230913115001.23183-3-brgl@bgdev.pl> References: <20230913115001.23183-1-brgl@bgdev.pl> <20230913115001.23183-3-brgl@bgdev.pl> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 (morse.vger.email [0.0.0.0]); Wed, 13 Sep 2023 05:02:06 -0700 (PDT) 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 morse.vger.email Hi, Le mercredi 13 septembre 2023 =C3=A0 13:49 +0200, Bartosz Golaszewski a =C3=A9crit=C2=A0: > From: Bartosz Golaszewski >=20 > Use the new, less cumbersome interface for setting the GPIO as > active-high that doesn't require first checking the current state. >=20 > Signed-off-by: Bartosz Golaszewski Works for me. Acked-by: Paul Cercueil Cheers, -Paul > --- > =C2=A0drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 ++--- > =C2=A01 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c > b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c > index 6748226b8bd1..c055133c45fe 100644 > --- a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c > +++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c > @@ -388,9 +388,8 @@ static int ingenic_nand_init_chip(struct > platform_device *pdev, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * here for older DTs so = we can re-use the generic > nand_gpio_waitrdy() > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 * helper, and be consist= ent with what other drivers do. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 */ > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (of_machine_is_compatible("= qi,lb60") && > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gpiod_is_ac= tive_low(nand->busy_gpio)) > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0gpiod_toggle_active_low(nand->busy_gpio); > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (of_machine_is_compatible("= qi,lb60")) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0gpiod_set_active_high(nand->busy_gpio); > =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0nand->wp_gpio =3D devm_gp= iod_get_optional(dev, "wp", > GPIOD_OUT_LOW); > =C2=A0