summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-10-24 15:50:53 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-25 01:32:31 +0000
commitc0fbbaefed2b82bacf4a202cda529658b5d6d058 (patch)
treeac02af96277f61e4e5fafad65cb9d49c16297829 /common
parent870b7ebb788edd1adba70a330d6b0f8c66439849 (diff)
downloadchrome-ec-c0fbbaefed2b82bacf4a202cda529658b5d6d058.tar.gz
cleanup: comments in i2c modules
No code changes; just update comments with bug links BUG=none BRANCH=none TEST=build all platforms Change-Id: I8b845f9c43315b7db5a746a16c6618c3ee96979d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174614 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/i2c.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/common/i2c.c b/common/i2c.c
index ed3a888872..2db40bdf21 100644
--- a/common/i2c.c
+++ b/common/i2c.c
@@ -114,7 +114,10 @@ int i2c_write8(int port, int slave_addr, int offset, int data)
/*****************************************************************************/
/* Host commands */
-/* TODO: replace with single I2C passthru command */
+/*
+ * TODO(crosbug.com/p/23570): remove separate read and write commands, as soon
+ * as ectool supports EC_CMD_I2C_PASSTHRU.
+ */
static int i2c_command_read(struct host_cmd_handler_args *args)
{
@@ -163,9 +166,8 @@ static int i2c_command_write(struct host_cmd_handler_args *args)
}
DECLARE_HOST_COMMAND(EC_CMD_I2C_WRITE, i2c_command_write, EC_VER_MASK(0));
-/* TODO: remove temporary extra debugging for help host-side debugging */
#ifdef CONFIG_I2C_DEBUG_PASSTHRU
-#define PTHRUPRINTF(format, args...) cprintf(CC_I2C, format, ## args)
+#define PTHRUPRINTF(format, args...) CPRINTF(format, ## args)
#else
#define PTHRUPRINTF(format, args...)
#endif
@@ -343,11 +345,10 @@ static void scan_bus(int port, const char *desc)
#ifdef CHIP_FAMILY_stm32f
/*
- * Hope that address 0 exists, because the i2c_xfer()
- * implementation on STM32F can't read a byte without writing
- * one first.
- *
- * TODO: remove when that limitation is fixed.
+ * TODO(crosbug.com/p/23569): The i2c_xfer() implementation on
+ * STM32F can't read a byte without writing one first. So
+ * write a byte and hope nothing bad happens. Remove this
+ * workaround when STM32F is fixed.
*/
tmp = 0;
if (!i2c_xfer(port, a, &tmp, 1, &tmp, 1, I2C_XFER_SINGLE))