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-07-17 21:25:38 +0000
commit0e3dd9d2cc19b65654f8090aa02f8dac20358c2e (patch)
tree854d25ef2b0e9333fd69618fcbf258f23b620d72 /driver
parent3811a28a607e40f5291e45d7c57da6b0700fb821 (diff)
downloadchrome-ec-0e3dd9d2cc19b65654f8090aa02f8dac20358c2e.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>
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 4903b601fd..e42ebc726a 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)