diff options
author | Vic Yang <victoryang@chromium.org> | 2013-09-26 16:57:52 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-09-27 04:33:28 +0000 |
commit | 09de4c720d790a7243808e82264e8a1bb122a99d (patch) | |
tree | 516ff6b02718c42816bdfb68578d63e886bd9d8e | |
parent | 649b3e2714fd9d0fc2fccb8955e5bf787412ee6f (diff) | |
download | chrome-ec-09de4c720d790a7243808e82264e8a1bb122a99d.tar.gz |
Merge smart_battery_stub.h to smart_battery.h
For testing, we are now mocking things at function-level instead of
file-level. No need to have separate header file for smart battery
functions now. Merge them back to smart_battery.h.
Just moving code. No functional change.
BUG=chrome-os-partner:18343
TEST=util/make_all.sh
BRANCH=None
Change-Id: I4de1f73def447e75458118c1148c598794ddc091
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/170751
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | board/host/smart_battery.c | 1 | ||||
-rw-r--r-- | include/smart_battery.h | 13 | ||||
-rw-r--r-- | include/smart_battery_stub.h | 23 |
3 files changed, 12 insertions, 25 deletions
diff --git a/board/host/smart_battery.c b/board/host/smart_battery.c index 0620de6e39..3465f83431 100644 --- a/board/host/smart_battery.c +++ b/board/host/smart_battery.c @@ -9,7 +9,6 @@ #include "common.h" #include "console.h" #include "smart_battery.h" -#include "smart_battery_stub.h" #include "test_util.h" #include "uart.h" #include "util.h" diff --git a/include/smart_battery.h b/include/smart_battery.h index f80e63ce1b..9d457fef47 100644 --- a/include/smart_battery.h +++ b/include/smart_battery.h @@ -11,7 +11,6 @@ #include "battery.h" #include "common.h" #include "i2c.h" -#include "smart_battery_stub.h" /* Smart battery and charger I2C address */ #define BATTERY_ADDR 0x16 @@ -129,5 +128,17 @@ #define INFO_CHARGER_SPEC(INFO) ((INFO) & 0xf) #define INFO_SELECTOR_SUPPORT(INFO) (((INFO) >> 4) & 1) +/* Read from charger */ +int sbc_read(int cmd, int *param); + +/* Write to charger */ +int sbc_write(int cmd, int param); + +/* Read from battery */ +int sb_read(int cmd, int *param); + +/* Write to battery */ +int sb_write(int cmd, int param); + #endif /* __CROS_EC_SMART_BATTERY_H */ diff --git a/include/smart_battery_stub.h b/include/smart_battery_stub.h deleted file mode 100644 index 35754009c5..0000000000 --- a/include/smart_battery_stub.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - * - * Functions needed by smart battery driver. - */ - -#ifndef __CROS_EC_SMART_BATTERY_STUB_H -#define __CROS_EC_SMART_BATTERY_STUB_H - -/* Read from charger */ -int sbc_read(int cmd, int *param); - -/* Write to charger */ -int sbc_write(int cmd, int param); - -/* Read from battery */ -int sb_read(int cmd, int *param); - -/* Write to battery */ -int sb_write(int cmd, int param); - -#endif /* __CROS_EC_SMART_BATTERY_STUB_H */ |