summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorli feng <li1.feng@intel.com>2015-12-14 14:13:06 -0800
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2015-12-15 01:21:40 +0000
commitf9b851beaab3a76ddb5dbf2d668249009fd16cc0 (patch)
tree896f7ba9c901c46bf6991c69e6384af2dc9b330f
parent2ab208f098d223711d62220971e331b7549f6e96 (diff)
downloadchrome-ec-f9b851beaab3a76ddb5dbf2d668249009fd16cc0.tar.gz
i2c: implemented weak version of i2c_port_is_smbus()
If board specific i2c_port_is_smbus() is not implemented, int __attribute((weak)) i2c_port_is_smbus(int port) will be called. BUG=chrome-os-partner:45575 BRANCH=none TEST=On BCRD2 verified weak version is called if i2c_port_is_smbus() is not implemented in board level. Change-Id: Ia87e1f8c5ecf9d002db0922ef25c62765e798f56 Signed-off-by: li feng <li1.feng@intel.com> Reviewed-on: https://chromium-review.googlesource.com/317914 Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--chip/mec1322/i2c.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/chip/mec1322/i2c.c b/chip/mec1322/i2c.c
index 95038715cf..f6e45d287e 100644
--- a/chip/mec1322/i2c.c
+++ b/chip/mec1322/i2c.c
@@ -537,5 +537,7 @@ DECLARE_IRQ(MEC1322_IRQ_I2C_1, i2c1_interrupt, 2);
DECLARE_IRQ(MEC1322_IRQ_I2C_2, i2c2_interrupt, 2);
DECLARE_IRQ(MEC1322_IRQ_I2C_3, i2c3_interrupt, 2);
-int i2c_port_is_smbus(int port) __attribute((weak));
-
+int __attribute((weak)) i2c_port_is_smbus(int port)
+{
+ return 0;
+}