From nobody Fri May  9 15:28:22 2025
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C79AE469D;
	Wed,  2 Apr 2025 12:21:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
 arc=none smtp.client-ip=192.198.163.16
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1743596464; cv=none;
 b=NrOlxAE1VYpxaECg8ujSQQxpkdy9Xv47rABiBpakPxOQnQBzIl26T7QnAuQcvRX7PTkCFFRCahd++eYXDjX8hL4WfhPLBHoijLaMohYj3Sa3ULL9prPe6KbmOEPXMX/8qVzGjw9KwRiQy0LfEWWj6mgLY/RDZfLbg3H0SlIXjAs=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1743596464; c=relaxed/simple;
	bh=1FTObWbeIUXNtJIQRCBuVnbBO7SkEM/tAKZW6uKJ7DI=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version;
 b=RJaNlOtfVvwOn1VE5gZW8p93IdrYvGFs6wQFRCby/VBF/WQoSUJ8IEus6aFgXPLoH1Vpb8JWXD9u5lCNY2UqJKG9kgURs6QruDFmJK0rZpLqnYgPOflwCVM11ac/4UFLC0PbpPudklYPUwK1jodJAHup50g4gy58+H7/x6G1XfE=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
 dmarc=pass (p=none dis=none) header.from=linux.intel.com;
 spf=none smtp.mailfrom=linux.intel.com;
 dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com
 header.b=nSKjdZxu; arc=none smtp.client-ip=192.198.163.16
Authentication-Results: smtp.subspace.kernel.org;
 dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org;
 spf=none smtp.mailfrom=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com
 header.b="nSKjdZxu"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
  t=1743596463; x=1775132463;
  h=from:to:cc:subject:date:message-id:in-reply-to:
   references:mime-version:content-transfer-encoding;
  bh=1FTObWbeIUXNtJIQRCBuVnbBO7SkEM/tAKZW6uKJ7DI=;
  b=nSKjdZxuKCy4GOPitrUr5Jyg3mQGZSqgfliquT25DnNXoLT4Sg/BCaY3
   /l2hneSOZ6fVFv2mr9P41t/N1nod7KjPHNu4cdhWqNHbQ+f5llW3vydLs
   S+Asuw5YUdJRdT010LYotBK4T1cG/GAbVYZju6o/j1hcSCu8GOwmRlDaw
   SqP5DnGx8QxE4l5BYrj/QKt32Xz9+y26fUb9qCxl17kdWdz0l93l6xssO
   H51mtvBwjIuesXxS0UQdxH4jg04c5B7+JVO2uqVa0MlaG7in2QkgfoCY/
   N7z6q974g9JyoZIWCLDrNDyC6EPPTrFJZrq+Rkn6Dsm0TiTy/jfjNWv+J
   w==;
X-CSE-ConnectionGUID: ktjRF9NMThqh3otJOnO0+Q==
X-CSE-MsgGUID: /0vCmN6XQ++il+mXFvu0Ig==
X-IronPort-AV: E=McAfee;i="6700,10204,11392"; a="32561180"
X-IronPort-AV: E=Sophos;i="6.15,182,1739865600";
   d="scan'208";a="32561180"
Received: from fmviesa005.fm.intel.com ([10.60.135.145])
  by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 02 Apr 2025 05:21:02 -0700
X-CSE-ConnectionGUID: eouO8ZIqSleNSNAqfmh9Kg==
X-CSE-MsgGUID: JhwR9rldQGyxDGEyFovqLg==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.15,182,1739865600";
   d="scan'208";a="131404535"
Received: from black.fi.intel.com ([10.237.72.28])
  by fmviesa005.fm.intel.com with ESMTP; 02 Apr 2025 05:21:00 -0700
Received: by black.fi.intel.com (Postfix, from userid 1003)
	id 84F8F15C; Wed, 02 Apr 2025 15:20:59 +0300 (EEST)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: [PATCH v1 1/2] gpiolib: of: Fix the choice for Ingenic NAND quirk
Date: Wed,  2 Apr 2025 15:20:00 +0300
Message-ID: <20250402122058.1517393-2-andriy.shevchenko@linux.intel.com>
X-Mailer: git-send-email 2.47.2
In-Reply-To: <20250402122058.1517393-1-andriy.shevchenko@linux.intel.com>
References: <20250402122058.1517393-1-andriy.shevchenko@linux.intel.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

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>
---
 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 dev=
ice_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
--=20
2.47.2
From nobody Fri May  9 15:28:22 2025
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9F51239082;
	Wed,  2 Apr 2025 12:21:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
 arc=none smtp.client-ip=198.175.65.10
ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1743596467; cv=none;
 b=IbGz6quupazIL/bgAT1KtBk9NB6JYl7iuEFUHWkJnJiVzpZjPwTAzg6qysA+X3n1exwzQoqWT+L0UJ+STTphnKttYP+9loaTlIShC8kNuSGrPJ0XCO/3nka2f9KyAxYIop7EvFJL3YTz/w5K4tspH4fSEYzxL43FVB3vnQbTusU=
ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1743596467; c=relaxed/simple;
	bh=n8S2byZR5SUZKqPL8dvy9unDTv3hjcY6QS1TvVw8b7o=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version;
 b=iDoRkDcesfB9qSVwuudeXVgmx9Sk3/JnJyPGmQpUuVepbpZS1EqoOnPuqKHBWEwa+uhhtRfRshKtssTcO5TsnEvDyUeUwHlzTKzf/YlxVBEZsIGPXLv1PZEZWI3o8LiRWGYbfv+zWHb2yFxsJB5ITBaR5GPU8ZpDfgtB81f8EFk=
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
 dmarc=pass (p=none dis=none) header.from=linux.intel.com;
 spf=none smtp.mailfrom=linux.intel.com;
 dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com
 header.b=Wln9Nji0; arc=none smtp.client-ip=198.175.65.10
Authentication-Results: smtp.subspace.kernel.org;
 dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org;
 spf=none smtp.mailfrom=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com
 header.b="Wln9Nji0"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
  t=1743596466; x=1775132466;
  h=from:to:cc:subject:date:message-id:in-reply-to:
   references:mime-version:content-transfer-encoding;
  bh=n8S2byZR5SUZKqPL8dvy9unDTv3hjcY6QS1TvVw8b7o=;
  b=Wln9Nji0Rbrk4yzK6oujZjH6x/Rx1b2wbWMTbyazPed6jStbp66FWd32
   n1ISK8/E7o6D+wRxSuYMFgvZNam3gfDFV9SD+akKjaJVaqtKHFu2CPOXo
   3YBWXdTOn5XupOzfdakY5446FRAkBd/t052EUmTqTRPpfZJ5U2/Rkqcn8
   /fap0vsqcVJ5kSMlq7Dg2xoSHeXUssAR2pIU9TXYsvaStb/inN/EDuJfM
   rtnznCbo6MM656KF40il5mS1sOcVgX5cfRULGT5VpxwThC+REmMwobTvD
   f+MVAQFfBrnuRw8rBDwRh0W1kJ0ix8iFupbycVJx/8MGyBogklXzX1Let
   w==;
X-CSE-ConnectionGUID: 4tY0R4SkTD+MnsUkq3hbTA==
X-CSE-MsgGUID: 5W1mvg1UTGy+yNv1wxRs2w==
X-IronPort-AV: E=McAfee;i="6700,10204,11392"; a="62357538"
X-IronPort-AV: E=Sophos;i="6.15,182,1739865600";
   d="scan'208";a="62357538"
Received: from orviesa008.jf.intel.com ([10.64.159.148])
  by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 02 Apr 2025 05:21:02 -0700
X-CSE-ConnectionGUID: Gt280GVVQdSNBmNU5NI8dg==
X-CSE-MsgGUID: 1Hyf3AiMTpi9UKSewvGZoQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.15,182,1739865600";
   d="scan'208";a="127584273"
Received: from black.fi.intel.com ([10.237.72.28])
  by orviesa008.jf.intel.com with ESMTP; 02 Apr 2025 05:21:01 -0700
Received: by black.fi.intel.com (Postfix, from userid 1003)
	id 92F2526F; Wed, 02 Apr 2025 15:20:59 +0300 (EEST)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Subject: [PATCH v1 2/2] gpiolib: of: Move Atmel HSMCI quirk up out of the
 regulator comment
Date: Wed,  2 Apr 2025 15:20:01 +0300
Message-ID: <20250402122058.1517393-3-andriy.shevchenko@linux.intel.com>
X-Mailer: git-send-email 2.47.2
In-Reply-To: <20250402122058.1517393-1-andriy.shevchenko@linux.intel.com>
References: <20250402122058.1517393-1-andriy.shevchenko@linux.intel.com>
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

The regulator comment in of_gpio_set_polarity_by_property()
made on top of a couple of the cases, while Atmel HSMCI quirk
is not related to that. Make it clear by moving Atmel HSMCI
quirk up out of the scope of the regulator comment.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib-of.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 8fff6fdfb4a1..65f6a7177b78 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -268,6 +268,9 @@ static void of_gpio_set_polarity_by_property(const stru=
ct device_node *np,
 		{ "fsl,imx8qm-fec",  "phy-reset-gpios", "phy-reset-active-high" },
 		{ "fsl,s32v234-fec", "phy-reset-gpios", "phy-reset-active-high" },
 #endif
+#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
+		{ "atmel,hsmci",       "cd-gpios",     "cd-inverted" },
+#endif
 #if IS_ENABLED(CONFIG_PCI_IMX6)
 		{ "fsl,imx6q-pcie",  "reset-gpio", "reset-gpio-active-high" },
 		{ "fsl,imx6sx-pcie", "reset-gpio", "reset-gpio-active-high" },
@@ -293,9 +296,6 @@ static void of_gpio_set_polarity_by_property(const stru=
ct device_node *np,
 #if IS_ENABLED(CONFIG_REGULATOR_GPIO)
 		{ "regulator-gpio",    "enable-gpio",  "enable-active-high" },
 		{ "regulator-gpio",    "enable-gpios", "enable-active-high" },
-#endif
-#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
-		{ "atmel,hsmci",       "cd-gpios",     "cd-inverted" },
 #endif
 	};
 	unsigned int i;
--=20
2.47.2