diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2013-06-10 15:11:57 -0700 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2013-06-10 15:20:38 -0700 |
commit | ab5f333b494865d4672a7e153ca4d2dc4f8bc6ef (patch) | |
tree | 679dfa531f73a512eaf0eacbb52d5adfb5ea1c7c | |
parent | 6ca6f2851b40330426f782a30164a92bb13c2898 (diff) | |
download | chrome-ec-ab5f333b494865d4672a7e153ca4d2dc4f8bc6ef.tar.gz |
fix the build on lm4 platforms
the chromeos-base/ec-utils package is built for BOARD=bds,
so we need the lm4-based platforms to build properly on this branch.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=spring
BUG=chrome-os-partner:20065
TEST=make BOARD=bds
Change-Id: Ic9cc868f665d930bb0a7c4e5bfc1e9aa28599be9
Reviewed-on: https://gerrit.chromium.org/gerrit/58126
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | chip/lm4/i2c.c | 4 | ||||
-rw-r--r-- | include/i2c.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c index 4a47011c15..ab040cc62d 100644 --- a/chip/lm4/i2c.c +++ b/chip/lm4/i2c.c @@ -111,8 +111,8 @@ static int wait_idle(int port) * @param stop Can session be terminated with smbus stop bit? * @return EC_SUCCESS, or non-zero if error. */ -static int i2c_xfer(int port, int slave_addr, const uint8_t *out, int out_size, - uint8_t *in, int in_size, int start, int stop) +int i2c_xfer(int port, int slave_addr, const uint8_t *out, int out_size, + uint8_t *in, int in_size, int start, int stop) { int rv, i; int started = start ? 0 : 1; diff --git a/include/i2c.h b/include/i2c.h index 54d2b0d269..a5343572ac 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -87,8 +87,13 @@ void board_i2c_release(int port); * @param in_bytes Number of bytse to receive * @return 0 if ok, else ER_ERROR... */ +#ifdef CHIP_stm32 int i2c_xfer(int port, int slave_addr, uint8_t *out, int out_bytes, uint8_t *in, int in_bytes); +#else /* CHIP_stm32 */ +int i2c_xfer(int port, int slave_addr, const uint8_t *out, int out_size, + uint8_t *in, int in_size, int start, int stop); +#endif /* CHIP_stm32 */ /* Grab I2C lock */ void i2c_lock(void); |