pinctrl: baytrail: fix debounce disable case
Subsystems (3)
PATCH 1/1 pinctrl: baytrail: fix debounce disable case
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 <[email protected]>
Signed-off-by Raag Jadav <[email protected]>
--- drivers/pinctrl/intel/pinctrl-baytrail.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/pinctrl/intel/pinctrl-baytrail.c +9 -2
@@ -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 ;
Signature · 1 line
2.17.1
Quoted 7 lines · 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 <[email protected]>Signed-off-by Raag Jadav <[email protected]>
Acked-by Mika Westerberg <[email protected]>
Quoted 10 lines · Mika Westerberg
Quoted 7 lines · 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 <[email protected]>Signed-off-by Raag Jadav <[email protected]>Acked-by Mika Westerberg <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko