summaryrefslogtreecommitdiff
path: root/common/charge_state_v2.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-03-19 11:15:57 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-03-20 23:51:03 +0000
commitdefaf5cdb5a44067ea0f2d7f18fd57e240d992a6 (patch)
tree26abaf6936bd5bb998c0ab4d9d909261d3cee769 /common/charge_state_v2.c
parenta025f18673583e1c030aa006e0f0cebeea18c062 (diff)
downloadchrome-ec-defaf5cdb5a44067ea0f2d7f18fd57e240d992a6.tar.gz
Create stub files for charge_state_v2.c
Remove copied code from V1 implementation, reduce to bare minimum needed to satisfy external dependencies. Don't actually enable it for any platforms, though. BRANCH=ToT BUG=chrome-os-partner:23776 TEST=make buildall -j It's used by anything and doesn't do anything if it was, but test compilation of the changed sources by defining CONFIG_CHARGER_V2. Change-Id: Iea37d0b4fc48c8ebf7f7088cd1674d6e275d03d4 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/190853 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/charge_state_v2.c')
-rw-r--r--common/charge_state_v2.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
new file mode 100644
index 0000000000..1f0d4d6350
--- /dev/null
+++ b/common/charge_state_v2.c
@@ -0,0 +1,66 @@
+/* Copyright (c) 2014 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.
+ *
+ * Battery charging task and state machine.
+ */
+
+#include "battery.h"
+#include "charge_state.h"
+#include "charger.h"
+#include "chipset.h"
+#include "common.h"
+#include "console.h"
+#include "extpower.h"
+#include "gpio.h"
+#include "hooks.h"
+#include "host_command.h"
+#include "printf.h"
+#include "system.h"
+#include "task.h"
+#include "timer.h"
+#include "util.h"
+
+/* Console output macros */
+#define CPUTS(outstr) cputs(CC_CHARGER, outstr)
+#define CPRINTF(format, args...) cprintf(CC_CHARGER, format, ## args)
+
+
+
+void charger_task(void)
+{
+ while (1)
+ task_wait_event(-1);
+}
+
+
+int charge_keep_power_off(void)
+{
+ return 0;
+}
+
+
+enum charge_state charge_get_state(void)
+{
+ return PWR_STATE_INIT;
+}
+
+uint32_t charge_get_flags(void)
+{
+ return 0;
+}
+
+int charge_get_percent(void)
+{
+ return 0;
+}
+
+int charge_temp_sensor_get_val(int idx, int *temp_ptr)
+{
+ return EC_ERROR_UNKNOWN;
+}
+
+int charge_want_shutdown(void)
+{
+ return 0;
+}