aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1119-Revert-pinctrl-amd-Set-the-level-based-on-ACPI-table.patch
blob: 32dee1f3519a32f46ba7f9aef93aa83930a56a6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From 67ebbbbe104bc7bad549e01bab02450191b64bd6 Mon Sep 17 00:00:00 2001
From: Sudheesh Mavila <sudheesh.mavila@amd.com>
Date: Thu, 8 Mar 2018 15:39:51 +0530
Subject: [PATCH 1119/4131] Revert "pinctrl/amd: Set the level based on ACPI
 tables"

This reverts commit 2983f296f2327bc517e3b29344fce82271160197.
 The original patch was intented to avoid some issues with synaptics touchpad. The similar implementation now is part of
i2c_hid and hence this change is no more valid. Hence reverting.

Fix the incorrect pasrsing info of low Vs high in the debugfs.

Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/pinctrl/pinctrl-amd.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
 mode change 100644 => 100755 drivers/pinctrl/pinctrl-amd.c

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
old mode 100644
new mode 100755
index f0e1f7c..1537267
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -236,10 +236,10 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc)
 			if (pin_reg & BIT(INTERRUPT_ENABLE_OFF)) {
 				interrupt_enable = "interrupt is enabled|";
 
-				if (!(pin_reg & BIT(ACTIVE_LEVEL_OFF)) &&
+				if ((pin_reg & BIT(ACTIVE_LEVEL_OFF)) &&
 				    !(pin_reg & BIT(ACTIVE_LEVEL_OFF + 1)))
 					active_level = "Active low|";
-				else if (pin_reg & BIT(ACTIVE_LEVEL_OFF) &&
+				else if (!(pin_reg & BIT(ACTIVE_LEVEL_OFF)) &&
 					 !(pin_reg & BIT(ACTIVE_LEVEL_OFF + 1)))
 					active_level = "Active high|";
 				else if (!(pin_reg & BIT(ACTIVE_LEVEL_OFF)) &&
@@ -405,22 +405,13 @@ static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 {
 	int ret = 0;
 	u32 pin_reg;
-	unsigned long flags, irq_flags;
+	unsigned long flags;
 	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 	struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
 
 	raw_spin_lock_irqsave(&gpio_dev->lock, flags);
 	pin_reg = readl(gpio_dev->base + (d->hwirq)*4);
 
-	/* Ignore the settings coming from the client and
-	 * read the values from the ACPI tables
-	 * while setting the trigger type
-	 */
-
-	irq_flags = irq_get_trigger_type(d->irq);
-	if (irq_flags != IRQ_TYPE_NONE)
-		type = irq_flags;
-
 	switch (type & IRQ_TYPE_SENSE_MASK) {
 	case IRQ_TYPE_EDGE_RISING:
 		pin_reg &= ~BIT(LEVEL_TRIG_OFF);
-- 
2.7.4