aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3453-Revert-amd-i2c-AMD-MP2-I2C-Bug-fix.patch
blob: c4b1fdc5981945f30b44efe0a897b9d27b3d0c4b (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
From 522828c4e27dd4b9a0fa80ca21efef0b1f757a81 Mon Sep 17 00:00:00 2001
From: Sudheesh Mavila <sudheesh.mavila@amd.com>
Date: Fri, 1 Jun 2018 10:12:08 +0530
Subject: [PATCH 3453/4131] Revert "amd-i2c : AMD-MP2-I2C Bug fix"

This reverts commit f80a21164d8f199ef2748466b169affeb18fd5b8.
---
 drivers/i2c/busses/Kconfig       | 2 +-
 drivers/i2c/busses/i2c-amd-mp2.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index e6e7d9a..29aa1f8 100755
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -85,7 +85,7 @@ config I2C_AMD_MP2
 	  I2C interface.
 
 	  This driver can also be built as a module.  If so, the module
-	  will be called pcie_mp2_amd and i2c-amd-mp2.
+	  will be called i2c-pcie_mp2_amd.
 
 	  
 config I2C_HIX5HD2
diff --git a/drivers/i2c/busses/i2c-amd-mp2.c b/drivers/i2c/busses/i2c-amd-mp2.c
index 8a43b35..f0fbbf7 100755
--- a/drivers/i2c/busses/i2c-amd-mp2.c
+++ b/drivers/i2c/busses/i2c-amd-mp2.c
@@ -40,7 +40,7 @@ struct amd_mp2_i2c {
 	struct amd_i2c_dev amd_mp2;
 	struct completion msg_complete;
 	struct i2c_msg *msg_buf;
-	unsigned short  is_configured;
+	bool is_configured;
 	int bus_id;
 
 };
@@ -178,11 +178,11 @@ static int amd_mp2_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 
 	reinit_completion(&dev->msg_complete);
 
-	if (dev->is_configured != msgs->addr) {
+	if (dev->is_configured == 0) {
 		pr_devel(" call the configure\n");
 		mp2_i2c_pci_configure(dev, msgs->addr);
 		timeout = wait_for_completion_timeout(&dev->msg_complete, 50);
-		dev->is_configured =  msgs->addr;
+		dev->is_configured = 1;
 	}
 	pr_devel(" %s:%s dev:%p dev->amd_mp2=%p  dev->amd_mp2.pdev:%p\n num =%d",
 			DRIVER_NAME, __func__, dev, &dev->amd_mp2, dev->amd_mp2.pdev, num);
-- 
2.7.4