* [PATCH v1] pinctrl: baytrail: fix debounce disable case
@ 2023-09-12 15:48 Raag Jadav
2023-09-12 15:54 ` Mika Westerberg
0 siblings, 1 reply; 3+ messages in thread
From: Raag Jadav @ 2023-09-12 15:48 UTC (permalink / raw)
To: linus.walleij, mika.westerberg, andriy.shevchenko, dan.carpenter
Cc: linux-gpio, linux-kernel, mallikarjunappa.sangannavar, pandith.n,
Raag Jadav
We don't need to update debounce pulse value in case debounce is to be
disabled. Break such a case where arg value is zero.
Fixes: 4cfff5b7af8b ("pinctrl: baytrail: consolidate common mask operation")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-gpio/d164d471-5432-4c3c-afdb-33dc8f53d043@moroto.mountain/
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
drivers/pinctrl/intel/pinctrl-baytrail.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 6b45b165604c..c522fd2283f9 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -983,11 +983,18 @@ static int byt_pin_config_set(struct pinctrl_dev *pctl_dev,
break;
case PIN_CONFIG_INPUT_DEBOUNCE:
- if (arg)
+ if (arg) {
conf |= BYT_DEBOUNCE_EN;
- else
+ } else {
conf &= ~BYT_DEBOUNCE_EN;
+ /*
+ * No need to update the pulse value.
+ * Debounce is going to be disabled.
+ */
+ break;
+ }
+
switch (arg) {
case 375:
db_pulse = BYT_DEBOUNCE_PULSE_375US;
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1] pinctrl: baytrail: fix debounce disable case
2023-09-12 15:48 [PATCH v1] pinctrl: baytrail: fix debounce disable case Raag Jadav
@ 2023-09-12 15:54 ` Mika Westerberg
2023-09-12 16:50 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2023-09-12 15:54 UTC (permalink / raw)
To: Raag Jadav
Cc: linus.walleij, andriy.shevchenko, dan.carpenter, linux-gpio,
linux-kernel, mallikarjunappa.sangannavar, pandith.n
On Tue, Sep 12, 2023 at 09:18:15PM +0530, Raag Jadav wrote:
> We don't need to update debounce pulse value in case debounce is to be
> disabled. Break such a case where arg value is zero.
>
> Fixes: 4cfff5b7af8b ("pinctrl: baytrail: consolidate common mask operation")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/linux-gpio/d164d471-5432-4c3c-afdb-33dc8f53d043@moroto.mountain/
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1] pinctrl: baytrail: fix debounce disable case
2023-09-12 15:54 ` Mika Westerberg
@ 2023-09-12 16:50 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-09-12 16:50 UTC (permalink / raw)
To: Mika Westerberg
Cc: Raag Jadav, linus.walleij, dan.carpenter, linux-gpio,
linux-kernel, mallikarjunappa.sangannavar, pandith.n
On Tue, Sep 12, 2023 at 06:54:43PM +0300, Mika Westerberg wrote:
> On Tue, Sep 12, 2023 at 09:18:15PM +0530, Raag Jadav wrote:
> > We don't need to update debounce pulse value in case debounce is to be
> > disabled. Break such a case where arg value is zero.
> >
> > Fixes: 4cfff5b7af8b ("pinctrl: baytrail: consolidate common mask operation")
> > Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > Closes: https://lore.kernel.org/linux-gpio/d164d471-5432-4c3c-afdb-33dc8f53d043@moroto.mountain/
> > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Pushed to my review and testing queue, thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-12 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 15:48 [PATCH v1] pinctrl: baytrail: fix debounce disable case Raag Jadav
2023-09-12 15:54 ` Mika Westerberg
2023-09-12 16:50 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®