Message ID | 20250327004945.563765-1-peng.fan@oss.nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [V2,1/2] gpiolib: of: Add polarity quirk for s5m8767 | expand |
On Thu, Mar 27, 2025 at 1:50 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > > 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 > Mark, Once v6.15-rc1 is tagged, I'd like to pick it up and provide you with an immutable tag so that you can take the corresponding regulator patch through your tree, does it sound good to you? Bartosz
On Thu, Mar 27, 2025 at 08:49:44AM +0800, Peng Fan (OSS) wrote: > > 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. So, to make this clear: this is simply DTS mistake as driver basically ignores the polarity or other flags in it, correct?
> Subject: Re: [PATCH V2 1/2] gpiolib: of: Add polarity quirk for s5m8767 > > On Thu, Mar 27, 2025 at 08:49:44AM +0800, Peng Fan (OSS) wrote: > > > > 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. > > So, to make this clear: this is simply DTS mistake as driver basically > ignores the polarity or other flags in it, correct? Correct. Regards, Peng. > > -- > With Best Regards, > Andy Shevchenko >
On Thu, Mar 27, 2025 at 09:55:03AM +0100, Bartosz Golaszewski wrote: > Once v6.15-rc1 is tagged, I'd like to pick it up and provide you with > an immutable tag so that you can take the corresponding regulator > patch through your tree, does it sound good to you? Sure.
On Thu, Mar 27, 2025 at 1:50 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > 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> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
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"