From f9b851beaab3a76ddb5dbf2d668249009fd16cc0 Mon Sep 17 00:00:00 2001 From: li feng Date: Mon, 14 Dec 2015 14:13:06 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/317914 Reviewed-by: Shawn N --- chip/mec1322/i2c.c | 6 ++++-- 1 file 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; +} -- cgit v1.2.1