Re: [PATCH 2/5] mtd: rawnand: ingenic: use gpiod_set_active_high()

From
Paul Cercueil <paul@crapouillou.net>
Date
2023-09-13 12:01:56
Also in
linux-gpio, linux-mmc, lkml, platform-driver-x86
Reply to
Bartosz Golaszewski, 2023-09-13
Hi,

Le mercredi 13 septembre 2023 à 13:49 +0200, Bartosz Golaszewski a
écrit :
From: Bartosz Golaszewski <redacted>

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 <redacted>
Works for me.

Acked-by: Paul Cercueil <paul@crapouillou.net>

Cheers,
-Paul
quoted hunk ↗ jump to hunk
---
 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);
 
  
Thread (24 messages) 24 messages, 7 authors, last reply 2023-09-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help