Message ID | 20230913115001.23183-3-brgl@bgdev.pl |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp1185835vqx; Wed, 13 Sep 2023 09:01:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHa8okptDnzRWqCKoDKkvMVbbAcj2e81g9Q2mceKrRC7g2IOAg1GfeLBqxXjTGLo11rAKAM X-Received: by 2002:a17:902:cec2:b0:1bc:506a:58f2 with SMTP id d2-20020a170902cec200b001bc506a58f2mr3631621plg.46.1694620872143; Wed, 13 Sep 2023 09:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694620872; cv=none; d=google.com; s=arc-20160816; b=vmzox8Ud32i1gLUt8tcXGboVKIIx8EZOCcqlL4uM7aClCx7eq4moilzV2hGMz/NUxN UiE8Rdp0fLEgrjw/Y+9JXz7QZkAGtxfoRmrYcvmAimRD+E/RGKzQ/J2EBBoonhE8mK+2 Q7aKX7zkAymoAbelXpE9Ffk2emz1DWgzPaTJ/fUiUY2LvdJ5KLFZLYEtG3nU9XUdB7QF 9W0a2uZ0dUTeV0pf1SYkgR2mrcoiyXezMSVBKOzydNIEIHLG/3/VtV8SujgYTTaa0+lY uSX5qqL8H7GuCWMb+0te9n+n04EQgWQ4IgRF4lEX375dwEdr1NtdPZVF5pruE8606hfU bXWQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZfIOoxhDAqFwndjqT4NZlTiK/Oyr/4kFj6yAfQvO5X0=; fh=0APTZUKOvF74sGqrjhjjJpAFLL5Kw9fbVHsTj8Q1YJA=; b=xDYg2C6sX21Jcaq4HuKHr/Q/dahtNKp17VhtxE749PFigf2bfrd1gIr16GPRZGbg89 0wUwbCnUojBcb6f/oxAYlKCeyd4zLOTtpTdNHtLOHKhsBiraw3RaK5CXPGS9QUaPGCMr u/dQdHxAAqMWLbxHn2J+Sk/8q4VVPD1fMoFBypRkJlgZzVR7InM2dRERF0GY0A4vGkjU s1P9/Iy4LoGPRcRUURTAz6QFExcHtKsYobkPXCPvxl7ChpE+p8N408nnXc0r9x3GFeA7 9bBksekh/oJ2CsXNbE+S32C4F766+ZFElPkvF/gxe5OBqzN+zFOCvPybVfT5T4YC4C/q 3p7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=Kt6Dg9PA; 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 Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id i11-20020a170902c94b00b001b9be39eaa8si11130852pla.348.2023.09.13.09.01.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 09:01:12 -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=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=Kt6Dg9PA; 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 Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id AFD9881E554B; Wed, 13 Sep 2023 04:50:41 -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 S240569AbjIMLu2 (ORCPT <rfc822;pwkd43@gmail.com> + 36 others); Wed, 13 Sep 2023 07:50:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240539AbjIMLuZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 13 Sep 2023 07:50:25 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86E8F19B6 for <linux-kernel@vger.kernel.org>; Wed, 13 Sep 2023 04:50:21 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-401d6f6b2e0so5277975e9.1 for <linux-kernel@vger.kernel.org>; Wed, 13 Sep 2023 04:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1694605820; x=1695210620; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZfIOoxhDAqFwndjqT4NZlTiK/Oyr/4kFj6yAfQvO5X0=; b=Kt6Dg9PAdyJu64rbRPiB/YQgnFDw/OTAazlhmKFCcQR0Ugv08vQcaaQRM7oBHf1byY 47lb+nXanFWkiCncaBrTTF8VjZi41cJk1geT4sZvi0kq3u0PYDxTtTc+ciiSEDfnIx8h MNorN4K13cYToGQvg1ybvkl7Q2ATPTjM0D4VsuLG0fGGQfexm7kfL5yV4l/mbEPLDGAz 0pZwtXHiZ3QIl36ugfVsMeFPgFcuD85S8XMxDM/JJrWTBwNWIdnIcNGM9bua0y/ge7eu vVmV6fkE4S3cAoP66fpvhNrc2+Z6Y5hAGD8PIoUqu49BuEjjxpn3rzFQFzLsbVnGtnH3 qVvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694605820; x=1695210620; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZfIOoxhDAqFwndjqT4NZlTiK/Oyr/4kFj6yAfQvO5X0=; b=cUuerw+Zv5MYQaUssIaQlaPVeJWrCGS1NHWSz73wTcuNbUJjROzmV6/hqaNN5PCNK7 cq/Y/HkSnvBl27EImUwYy6h1TkDdTbeOyHIw7eSFADmVJb1ToNdIZm9Ak+1QIrR+kx4L NLbm3X0B8MBH/OSXooqcErDjrp0sKX3+OwBJF1TNRJhzsxC4x4NBMGRPWqEkQg+HASwv e3GTMS1tUWwPyq9lZA35zxA3q9fwXKw7Bzo/BTKI2IEd21tTpnZbSI1VYRGNBlpABIgU +v9IoX6D60/cm5ta4MqncRJ1u51qImPyqeL1n8Q3y9jz3xE5Dthw7M7Cc9ZvqSdabxsX gUfQ== X-Gm-Message-State: AOJu0YwJHDyZmRYpI5BIudlQ9QDw4nj+qhRT3o39IvytLLOBS0P+z0oA pBashHBzP/YicGzGrC8BgP/j8Q== X-Received: by 2002:a5d:5b18:0:b0:31f:cc46:3db9 with SMTP id bx24-20020a5d5b18000000b0031fcc463db9mr1114110wrb.26.1694605820092; Wed, 13 Sep 2023 04:50:20 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:3b50:bca5:a754:7463]) by smtp.gmail.com with ESMTPSA id j14-20020adfd20e000000b0031fc4c31d77sm1932689wrh.88.2023.09.13.04.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 04:50:19 -0700 (PDT) From: Bartosz Golaszewski <brgl@bgdev.pl> To: Linus Walleij <linus.walleij@linaro.org>, Andy Shevchenko <andy@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>, Paul Cercueil <paul@crapouillou.net>, Harvey Hunt <harveyhuntnexus@gmail.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Daniel Scally <djrscally@gmail.com>, Hans de Goede <hdegoede@redhat.com>, Mark Gross <markgross@kernel.org>, Heiner Kallweit <hkallweit1@gmail.com> 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 <bartosz.golaszewski@linaro.org> Subject: [PATCH 2/5] mtd: rawnand: ingenic: use gpiod_set_active_high() Date: Wed, 13 Sep 2023 13:49:58 +0200 Message-Id: <20230913115001.23183-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230913115001.23183-1-brgl@bgdev.pl> References: <20230913115001.23183-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> 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]); Wed, 13 Sep 2023 04:50:41 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776938775440005212 X-GMAIL-MSGID: 1776938775440005212 |
Series |
gpio: remove gpiod_toggle_active_low()
|
|
Commit Message
Bartosz Golaszewski
Sept. 13, 2023, 11:49 a.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Use the new, less cumbersome interface for setting the GPIO as active-high that doesn't require first checking the current state. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Comments
Hi, Le mercredi 13 septembre 2023 à 13:49 +0200, Bartosz Golaszewski a écrit : > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Use the new, less cumbersome interface for setting the GPIO as > active-high that doesn't require first checking the current state. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Works for me. Acked-by: Paul Cercueil <paul@crapouillou.net> Cheers, -Paul > --- > drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > 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, > * here for older DTs so we can re-use the generic > nand_gpio_waitrdy() > * helper, and be consistent with what other drivers do. > */ > - if (of_machine_is_compatible("qi,lb60") && > - gpiod_is_active_low(nand->busy_gpio)) > - gpiod_toggle_active_low(nand->busy_gpio); > + if (of_machine_is_compatible("qi,lb60")) > + gpiod_set_active_high(nand->busy_gpio); > > nand->wp_gpio = devm_gpiod_get_optional(dev, "wp", > GPIOD_OUT_LOW); >
Hi Bartosz, paul@crapouillou.net wrote on Wed, 13 Sep 2023 14:01:47 +0200: > Hi, > > Le mercredi 13 septembre 2023 à 13:49 +0200, Bartosz Golaszewski a > écrit : > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > Use the new, less cumbersome interface for setting the GPIO as > > active-high that doesn't require first checking the current state. > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Works for me. > > Acked-by: Paul Cercueil <paul@crapouillou.net> For me as well, the new API looks much better. I saw Hans is fine with you merging the platform/x86 patch. I am also fine if all maintainers agree on that. In this case: Acked-by: Miquel Raynal <miquel.raynal@bootlin.com> However, if you finally need to produce an immutable tag, let me know and I will take the patch through our tree. Thanks, Miquèl
On Wed, Sep 13, 2023 at 2:50 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Use the new, less cumbersome interface for setting the GPIO as > active-high that doesn't require first checking the current state. ... > * here for older DTs so we can re-use the generic nand_gpio_waitrdy() > * helper, and be consistent with what other drivers do. > */ > - if (of_machine_is_compatible("qi,lb60") && > - gpiod_is_active_low(nand->busy_gpio)) > - gpiod_toggle_active_low(nand->busy_gpio); > + if (of_machine_is_compatible("qi,lb60")) > + gpiod_set_active_high(nand->busy_gpio); Why not moving this quirk to gpiolib-of.c?
On Wed, Sep 13, 2023 at 10:05 PM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > On Wed, Sep 13, 2023 at 2:50 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > Use the new, less cumbersome interface for setting the GPIO as > > active-high that doesn't require first checking the current state. > > ... > > > * here for older DTs so we can re-use the generic nand_gpio_waitrdy() > > * helper, and be consistent with what other drivers do. > > */ > > - if (of_machine_is_compatible("qi,lb60") && > > - gpiod_is_active_low(nand->busy_gpio)) > > - gpiod_toggle_active_low(nand->busy_gpio); > > + if (of_machine_is_compatible("qi,lb60")) > > + gpiod_set_active_high(nand->busy_gpio); > > Why not moving this quirk to gpiolib-of.c? That's a better idea here I think, it's clearly a quirk for a buggy device tree. Yours, Linus Walleij
Hi Andy, linus.walleij@linaro.org wrote on Wed, 13 Sep 2023 22:12:40 +0200: > On Wed, Sep 13, 2023 at 10:05 PM Andy Shevchenko > <andy.shevchenko@gmail.com> wrote: > > On Wed, Sep 13, 2023 at 2:50 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > > > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > > > Use the new, less cumbersome interface for setting the GPIO as > > > active-high that doesn't require first checking the current state. > > > > ... > > > > > * here for older DTs so we can re-use the generic nand_gpio_waitrdy() > > > * helper, and be consistent with what other drivers do. > > > */ > > > - if (of_machine_is_compatible("qi,lb60") && > > > - gpiod_is_active_low(nand->busy_gpio)) > > > - gpiod_toggle_active_low(nand->busy_gpio); > > > + if (of_machine_is_compatible("qi,lb60")) > > > + gpiod_set_active_high(nand->busy_gpio); > > > > Why not moving this quirk to gpiolib-of.c? > > That's a better idea here I think, it's clearly a quirk for a > buggy device tree. Agreed, it's just for backward compatibility purposes in a single driver. I believe it should stay here. Thanks, Miquèl
On Wed, Sep 13, 2023 at 11:23 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote: > linus.walleij@linaro.org wrote on Wed, 13 Sep 2023 22:12:40 +0200: > > On Wed, Sep 13, 2023 at 10:05 PM Andy Shevchenko > > <andy.shevchenko@gmail.com> wrote: > > > On Wed, Sep 13, 2023 at 2:50 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: ... > > > Why not moving this quirk to gpiolib-of.c? > > > > That's a better idea here I think, it's clearly a quirk for a > > buggy device tree. > > Agreed, it's just for backward compatibility purposes in a single > driver. I believe it should stay here. I believe Linus was for moving. gpiolib-of.c contains a lot of quirks, including this one. Calling these new (or old) APIs for overriding polarity in many cases shouldn't be needed if were no issues with DT or something like that.
On Thu, Sep 14, 2023 at 10:02 AM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > On Wed, Sep 13, 2023 at 11:23 PM Miquel Raynal > <miquel.raynal@bootlin.com> wrote: > > linus.walleij@linaro.org wrote on Wed, 13 Sep 2023 22:12:40 +0200: > > > On Wed, Sep 13, 2023 at 10:05 PM Andy Shevchenko > > > <andy.shevchenko@gmail.com> wrote: > > > > On Wed, Sep 13, 2023 at 2:50 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > > ... > > > > > Why not moving this quirk to gpiolib-of.c? > > > > > > That's a better idea here I think, it's clearly a quirk for a > > > buggy device tree. > > > > Agreed, it's just for backward compatibility purposes in a single > > driver. I believe it should stay here. > > I believe Linus was for moving. > > gpiolib-of.c contains a lot of quirks, including this one. Calling To be clear: "including one for the same issue" > these new (or old) APIs for overriding polarity in many cases > shouldn't be needed if there were no issues with DT or something like that. To be clear: The less we call these APIs from drivers the better. Ideally these APIs shouldn't have existed.
Hi, Le jeudi 14 septembre 2023 à 10:02 +0300, Andy Shevchenko a écrit : > On Wed, Sep 13, 2023 at 11:23 PM Miquel Raynal > <miquel.raynal@bootlin.com> wrote: > > linus.walleij@linaro.org wrote on Wed, 13 Sep 2023 22:12:40 +0200: > > > On Wed, Sep 13, 2023 at 10:05 PM Andy Shevchenko > > > <andy.shevchenko@gmail.com> wrote: > > > > On Wed, Sep 13, 2023 at 2:50 PM Bartosz Golaszewski > > > > <brgl@bgdev.pl> wrote: > > ... > > > > > Why not moving this quirk to gpiolib-of.c? > > > > > > That's a better idea here I think, it's clearly a quirk for a > > > buggy device tree. > > > > Agreed, it's just for backward compatibility purposes in a single > > driver. I believe it should stay here. > > I believe Linus was for moving. Which Linus? Because the one who's also the gpio maintainer just wrote above that it was better to keep it in the driver. Cheers, -Paul > > gpiolib-of.c contains a lot of quirks, including this one. Calling > these new (or old) APIs for overriding polarity in many cases > shouldn't be needed if were no issues with DT or something like that. >
On Thu, Sep 14, 2023 at 10:30 AM Paul Cercueil <paul@crapouillou.net> wrote: > > Hi, > > Le jeudi 14 septembre 2023 à 10:02 +0300, Andy Shevchenko a écrit : > > On Wed, Sep 13, 2023 at 11:23 PM Miquel Raynal > > <miquel.raynal@bootlin.com> wrote: > > > linus.walleij@linaro.org wrote on Wed, 13 Sep 2023 22:12:40 +0200: > > > > On Wed, Sep 13, 2023 at 10:05 PM Andy Shevchenko > > > > <andy.shevchenko@gmail.com> wrote: > > > > > On Wed, Sep 13, 2023 at 2:50 PM Bartosz Golaszewski > > > > > <brgl@bgdev.pl> wrote: > > > > ... > > > > > > > Why not moving this quirk to gpiolib-of.c? > > > > > > > > That's a better idea here I think, it's clearly a quirk for a > > > > buggy device tree. > > > > > > Agreed, it's just for backward compatibility purposes in a single > > > driver. I believe it should stay here. > > > > I believe Linus was for moving. > > Which Linus? Because the one who's also the gpio maintainer just wrote > above that it was better to keep it in the driver. > I'm also under the impression that Linus meant moving it to gpiolib-of.c. Let's Linus: Could you clarify? Bart > Cheers, > -Paul > > > > > gpiolib-of.c contains a lot of quirks, including this one. Calling > > these new (or old) APIs for overriding polarity in many cases > > shouldn't be needed if were no issues with DT or something like that. > > >
On Thu, Sep 14, 2023 at 11:30 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > On Thu, Sep 14, 2023 at 10:30 AM Paul Cercueil <paul@crapouillou.net> wrote: > > > I believe Linus was for moving. Yes. > > Which Linus? Because the one who's also the gpio maintainer just wrote > > above that it was better to keep it in the driver. What. No. I expressed myself unclearly: > > Why not moving this quirk to gpiolib-of.c? > > That's a better idea here I think, it's clearly a quirk for a > buggy device tree. "That's a better idea here I think" means "That's a better idea [IN THIS CASE] I think" i.e. in this case it is a better idea to move it into gpiolib-of.c > I'm also under the impression that Linus meant moving it to gpiolib-of.c. Let's > > Linus: Could you clarify? Yes. I invented that thing so I'm a fan of it. Yours, Linus Walleij
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, * here for older DTs so we can re-use the generic nand_gpio_waitrdy() * helper, and be consistent with what other drivers do. */ - if (of_machine_is_compatible("qi,lb60") && - gpiod_is_active_low(nand->busy_gpio)) - gpiod_toggle_active_low(nand->busy_gpio); + if (of_machine_is_compatible("qi,lb60")) + gpiod_set_active_high(nand->busy_gpio); nand->wp_gpio = devm_gpiod_get_optional(dev, "wp", GPIOD_OUT_LOW);