Skip to contentSkip to conversation

Patch "pinctrl: baytrail: Rectify debounce support (part 2)" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jun 15, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

pinctrl: baytrail: Rectify debounce support (part 2)

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
pinctrl-baytrail-rectify-debounce-support-part-2.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Jun 15 13:06:48 CEST 2017

From: Andy Shevchenko <[email protected]>
Date: Thu, 26 Jan 2017 19:24:07 +0200
Subject: pinctrl: baytrail: Rectify debounce support (part 2)

From: Andy Shevchenko <[email protected]>

[ Upstream commit 827e1579e1d5cb66e340e7be1944b825b542bbdf ]

The commit 04ff5a095d66 ("pinctrl: baytrail: Rectify debounce support") almost fixes the logic of debuonce but missed couple of things, i.e. typo in mask when disabling debounce and lack of enabling it back.

This patch addresses above issues.

---
 drivers/pinctrl/intel/pinctrl-baytrail.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/pinctrl/intel/pinctrl-baytrail.c +8 -4
@@ -1250,10 +1250,12 @@ static int byt_pin_config_set(struct pin
 			debounce = readl(db_reg);
 			debounce &= ~BYT_DEBOUNCE_PULSE_MASK;
 
+			if (arg)
+				conf |= BYT_DEBOUNCE_EN;
+			else
+				conf &= ~BYT_DEBOUNCE_EN;
+
 			switch (arg) {
-			case 0:
-				conf &= BYT_DEBOUNCE_EN;
-				break;
 			case 375:
 				debounce |= BYT_DEBOUNCE_PULSE_375US;
 				break;
@@ -1276,7 +1278,9 @@ static int byt_pin_config_set(struct pin
 				debounce |= BYT_DEBOUNCE_PULSE_24MS;
 				break;
 			default:
-				ret = -EINVAL;
+				if (arg)
+					ret = -EINVAL;
+				break;
 			}
 
 			if (!ret)

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/pinctrl-baytrail-rectify-debounce-support-part-2.patch