Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH V2 1/2] gpiolib: of: Add polarity quirk for s5m8767
@ 2025-03-27  0:49 Peng Fan (OSS)
  2025-03-27  0:49 ` [PATCH V2 2/2] regulator: s5m8767: Convert to GPIO descriptors Peng Fan (OSS)
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Peng Fan (OSS) @ 2025-03-27  0:49 UTC (permalink / raw)
  To: linus.walleij, brgl, krzk, lgirdwood, broonie, andriy.shevchenko
  Cc: linux-gpio, linux-kernel, linux-samsung-soc, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

This is prepare patch for switching s5m8767 regulator driver to
use GPIO descriptor. DTS for exynos5250 spring incorrectly specifies
"active low" polarity for the DVS and DS line. But per datasheet,
they are actually active high. So add polarity quirk for it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V2:
 New patch

 drivers/gpio/gpiolib-of.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index eb667f8f1ead..83559dd24f32 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -222,6 +222,15 @@ static void of_gpio_try_fixup_polarity(const struct device_node *np,
 		 */
 		{ "lantiq,pci-xway",	"gpio-reset",	false },
 #endif
+#if IS_ENABLED(CONFIG_REGULATOR_S5M8767)
+		/*
+		 * According to S5M8767, the DVS and DS pin are
+		 * active-high signals. However, exynos5250-spring.dts use
+		 * active-low setting.
+		 */
+		{ "samsung,s5m8767-pmic", "s5m8767,pmic-buck-dvs-gpios", true },
+		{ "samsung,s5m8767-pmic", "s5m8767,pmic-buck-ds-gpios", true },
+#endif
 #if IS_ENABLED(CONFIG_TOUCHSCREEN_TSC2005)
 		/*
 		 * DTS for Nokia N900 incorrectly specified "active high"
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-04-07 22:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27  0:49 [PATCH V2 1/2] gpiolib: of: Add polarity quirk for s5m8767 Peng Fan (OSS)
2025-03-27  0:49 ` [PATCH V2 2/2] regulator: s5m8767: Convert to GPIO descriptors Peng Fan (OSS)
2025-03-27 11:37   ` Andy Shevchenko
2025-03-27 12:03   ` Mark Brown
2025-03-27 16:54   ` Krzysztof Kozlowski
2025-03-28  7:49   ` Linus Walleij
2025-03-27  8:55 ` [PATCH V2 1/2] gpiolib: of: Add polarity quirk for s5m8767 Bartosz Golaszewski
2025-03-27 12:05   ` Mark Brown
2025-03-27 10:15 ` Andy Shevchenko
2025-03-27 10:25   ` Peng Fan
2025-03-28  7:50 ` Linus Walleij
2025-04-07  7:42 ` (subset) " Bartosz Golaszewski
2025-04-07 22:15 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox