summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2019-07-16 09:05:34 -0600
committerCommit Bot <commit-bot@chromium.org>2019-08-23 00:12:29 +0000
commitbcdb986f617b5e0f80a9934d58056fc52c2b0f19 (patch)
tree817acedbc0e9c6950bc2e1729b8ebd716243a3fd /driver
parent7d4fadeca0ccd427590089f817a21280b3ab68c3 (diff)
downloadchrome-ec-bcdb986f617b5e0f80a9934d58056fc52c2b0f19.tar.gz
common: remove CONFIG_SMBUS dead code
CONFIG_SMBUS is not used. Cleaning up the code by removing this. Added a comment to document the removal and why. This will give a way to find the code if we ever needed to bring it back BUG=chromium:982316 BRANCH=none TEST=make buildall Change-Id: I40703a95bc849538e1aee32f6f96beab811285bd Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704279 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1767523 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/battery/smart.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/driver/battery/smart.c b/driver/battery/smart.c
index 7a494e8eab..7a47a93f19 100644
--- a/driver/battery/smart.c
+++ b/driver/battery/smart.c
@@ -10,7 +10,6 @@
#include "console.h"
#include "host_command.h"
#include "i2c.h"
-#include "smbus.h"
#include "timer.h"
#include "util.h"
@@ -31,17 +30,7 @@ test_mockable int sb_read(int cmd, int *param)
if (battery_is_cut_off())
return EC_RES_ACCESS_DENIED;
#endif
-#ifdef CONFIG_SMBUS
- {
- int rv;
- uint16_t d16 = 0;
- rv = smbus_read_word(I2C_PORT_BATTERY, BATTERY_ADDR, cmd, &d16);
- *param = d16;
- return rv;
- }
-#else
return i2c_read16(I2C_PORT_BATTERY, BATTERY_ADDR, cmd, param);
-#endif
}
test_mockable int sb_write(int cmd, int param)
@@ -53,11 +42,7 @@ test_mockable int sb_write(int cmd, int param)
if (battery_is_cut_off())
return EC_RES_ACCESS_DENIED;
#endif
-#ifdef CONFIG_SMBUS
- return smbus_write_word(I2C_PORT_BATTERY, BATTERY_ADDR, cmd, param);
-#else
return i2c_write16(I2C_PORT_BATTERY, BATTERY_ADDR, cmd, param);
-#endif
}
int sb_read_string(int offset, uint8_t *data, int len)
@@ -69,13 +54,8 @@ int sb_read_string(int offset, uint8_t *data, int len)
if (battery_is_cut_off())
return EC_RES_ACCESS_DENIED;
#endif
-#ifdef CONFIG_SMBUS
- return smbus_read_string(I2C_PORT_BATTERY, BATTERY_ADDR,
- offset, data, len);
-#else
return i2c_read_string(I2C_PORT_BATTERY, BATTERY_ADDR,
offset, data, len);
-#endif
}
int sb_read_mfgacc(int cmd, int block, uint8_t *data, int len)