Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpiolib: of: Add polarity quirk for s5m8767

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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250327004945.563765-1-peng.fan@oss.nxp.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Peng Fan and committed by
Bartosz Golaszewski
4e310626 0af2f6be

+9
+9
drivers/gpio/gpiolib-of.c
··· 222 222 */ 223 223 { "lantiq,pci-xway", "gpio-reset", false }, 224 224 #endif 225 + #if IS_ENABLED(CONFIG_REGULATOR_S5M8767) 226 + /* 227 + * According to S5M8767, the DVS and DS pin are 228 + * active-high signals. However, exynos5250-spring.dts use 229 + * active-low setting. 230 + */ 231 + { "samsung,s5m8767-pmic", "s5m8767,pmic-buck-dvs-gpios", true }, 232 + { "samsung,s5m8767-pmic", "s5m8767,pmic-buck-ds-gpios", true }, 233 + #endif 225 234 #if IS_ENABLED(CONFIG_TOUCHSCREEN_TSC2005) 226 235 /* 227 236 * DTS for Nokia N900 incorrectly specified "active high"