From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 994B7EDEC4B for ; Wed, 13 Sep 2023 12:01:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235205AbjIMMB6 (ORCPT ); Wed, 13 Sep 2023 08:01:58 -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-mmc@vger.kernel.org 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