summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-10-22 12:52:46 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-22 23:18:13 +0000
commit5f26987366fefe22f9f6157f3d13c18aed3c9e03 (patch)
tree7b301f40e06224a7bcf1103ec7341811cb9c5871
parenta27fb9cfdc156a0512e6b481cb1679dfa9f5fa25 (diff)
downloadchrome-ec-5f26987366fefe22f9f6157f3d13c18aed3c9e03.tar.gz
cleanup: Comments about PMU powerinfo module
Document some Pit-platform-specific assumptions. No code changes. BUG=none BRANCH=none TEST=build pit Change-Id: I601ca4a57645ba45e7db01e271556a30d334f9cd Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174056 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--common/pmu_tps65090_powerinfo.c15
-rw-r--r--include/config.h6
2 files changed, 18 insertions, 3 deletions
diff --git a/common/pmu_tps65090_powerinfo.c b/common/pmu_tps65090_powerinfo.c
index e840feba77..30fe53fa4a 100644
--- a/common/pmu_tps65090_powerinfo.c
+++ b/common/pmu_tps65090_powerinfo.c
@@ -12,8 +12,9 @@
#include "pmu_tpschrome.h"
#include "util.h"
-/* FIXME: move all the constants to pmu_tpschrome, make
- * dcdc3, fet output name configurable.
+/*
+ * All these constants are specific to the Pit board. If we reuse this command
+ * on other boards, we'll need to move the table to board.c.
*/
static const struct {
const char *name;
@@ -33,6 +34,7 @@ static const struct {
{"p1350", 1350, 5000},
};
+/* These constants may be Pit-specific as well. */
static const int pmu_voltage_range_mv = 17000;
static const int pmu_ac_sense_range_mv = 33;
static const int pmu_bat_sense_range_mv = 40;
@@ -113,6 +115,15 @@ DECLARE_CONSOLE_COMMAND(powerinfo, command_powerinfo,
"Show PMU power info",
NULL);
+/**
+ * Host command to get power info from PMU
+ *
+ * This reuses the same EC_CMD_POWER_INFO host command as Spring, but doesn't
+ * provide the full set of information because Pit doesn't take power over USB.
+ *
+ * Note that Spring *also* uses the TPS65090 PMU, but it can't use this common
+ * code because it implements the same host command differently...
+ */
static int power_command_info(struct host_cmd_handler_args *args)
{
int bat_charging_current;
diff --git a/include/config.h b/include/config.h
index 7092d3da86..a82af12158 100644
--- a/include/config.h
+++ b/include/config.h
@@ -540,7 +540,11 @@
/* Support TPS65090 PMU */
#undef CONFIG_PMU_TPS65090
-/* Support PMU powerinfo host and console commands */
+/*
+ * Support PMU powerinfo host and console commands. Note that the
+ * implementation is currently specific to the Pit board, so don't blindly
+ * enable this for another board without fixing that first.
+ */
#undef CONFIG_PMU_POWERINFO
/*****************************************************************************/