summaryrefslogtreecommitdiff
path: root/driver/charger/bq24707a.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-10-17 15:05:04 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-23 21:27:40 +0000
commit2ad076f8a02c8a3165a76dfb093cefd79fdbfc67 (patch)
tree13f9d0505f564f07c9867aabf11b7083613666d4 /driver/charger/bq24707a.h
parent8cf03ac0563294fbdeca2dc133d06f0b51c9a546 (diff)
downloadchrome-ec-2ad076f8a02c8a3165a76dfb093cefd79fdbfc67.tar.gz
cleanup: Rename and move header files
Device-specific headers belong in driver/ or chip/. The include/ directory should be for common interfaces. Code should not normally need to include driver-specific headers. If it does, it should use the full relative path from the EC project root (for example, drivers/charger/bq24715.h). Change-Id: Id23db37a431e2d802a74ec601db6f69b613352ba Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/173746 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'driver/charger/bq24707a.h')
-rw-r--r--driver/charger/bq24707a.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/driver/charger/bq24707a.h b/driver/charger/bq24707a.h
new file mode 100644
index 0000000000..744e991283
--- /dev/null
+++ b/driver/charger/bq24707a.h
@@ -0,0 +1,44 @@
+/* Copyright (c) 2012 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.
+ *
+ * TI bq24707A battery charger driver.
+ */
+
+#ifndef __CROS_EC_CHARGER_BQ24707A_H
+#define __CROS_EC_CHARGER_BQ24707A_H
+
+/* Chip specific commands */
+#define BQ24707_CHARGE_OPTION 0x12
+#define BQ24707_INPUT_CURRENT 0x3f
+#define BQ24707_MANUFACTURE_ID 0xfe
+#define BQ24707_DEVICE_ID 0xff
+
+/* ChargeOption 0x12 */
+#define OPTION_CHARGE_INHIBIT (1 << 0)
+#define OPTION_ACOC_THRESHOLD (3 << 1)
+#define OPTION_COMPARATOR_THRESHOLD (1 << 4)
+#define OPTION_IOUT_SELECTION (1 << 5)
+#define OPTION_IFAULT_HI_THRESHOLD (3 << 7)
+#define OPTION_EMI_FREQ_ENABLE (1 << 9)
+#define OPTION_EMI_FREQ_ADJ (1 << 10)
+#define OPTION_WATCHDOG_TIMER (3 << 13)
+#define OPTION_AOC_DELITCH_TIME (1 << 15)
+/* OPTION_ACOC_THRESHOLD */
+#define ACOC_THRESHOLD_DISABLE (0 << 1)
+#define ACOC_THRESHOLD_133X (1 << 1)
+#define ACOC_THRESHOLD_166X_DEFAULT (2 << 1)
+#define ACOC_THRESHOLD_222X (3 << 1)
+/* OPTION_IFAULT_HI_THRESHOLD */
+#define IFAULT_THRESHOLD_300MV (0 << 7)
+#define IFAULT_THRESHOLD_500MV (1 << 7)
+#define IFAULT_THRESHOLD_700MV_DEFAULT (2 << 7)
+#define IFAULT_THRESHOLD_900MV (3 << 7)
+/* OPTION_WATCHDOG_TIMER */
+#define CHARGE_WATCHDOG_DISABLE (0 << 13)
+#define CHARGE_WATCHDOG_44SEC (1 << 13)
+#define CHARGE_WATCHDOG_88SEC (2 << 13)
+#define CHARGE_WATCHDOG_175SEC_DEFAULT (3 << 13)
+
+#endif /* __CROS_EC_CHARGER_BQ24707A_H */
+