[PATCH v1 1/2] gpiolib: of: Fix the choice for Ingenic NAND quirk

Andy Shevchenko posted 2 patches 1 month, 1 week ago
[PATCH v1 1/2] gpiolib: of: Fix the choice for Ingenic NAND quirk
Posted by Andy Shevchenko 1 month, 1 week ago
The Ingenic NAND quirk has been added under CONFIG_LCD_HX8357 ifdeffery
which sounds quite wrong. Fix the choice for Ingenic NAND quirk
by wrapping it into own ifdeffery related to the respective driver.

Fixes: 3a7fd473bd5d ("mtd: rawnand: ingenic: move the GPIO quirk to gpiolib-of.c")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpiolib-of.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index eb667f8f1ead..8fff6fdfb4a1 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -193,6 +193,8 @@ static void of_gpio_try_fixup_polarity(const struct device_node *np,
 		 */
 		{ "himax,hx8357",	"gpios-reset",	false },
 		{ "himax,hx8369",	"gpios-reset",	false },
+#endif
+#if IS_ENABLED(CONFIG_MTD_NAND_JZ4780)
 		/*
 		 * The rb-gpios semantics was undocumented and qi,lb60 (along with
 		 * the ingenic driver) got it wrong. The active state encodes the
-- 
2.47.2
Re: [PATCH v1 1/2] gpiolib: of: Fix the choice for Ingenic NAND quirk
Posted by Linus Walleij 3 weeks, 6 days ago
On Wed, Apr 2, 2025 at 2:21 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> The Ingenic NAND quirk has been added under CONFIG_LCD_HX8357 ifdeffery
> which sounds quite wrong. Fix the choice for Ingenic NAND quirk
> by wrapping it into own ifdeffery related to the respective driver.
>
> Fixes: 3a7fd473bd5d ("mtd: rawnand: ingenic: move the GPIO quirk to gpiolib-of.c")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij