summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h b/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h
index 8ad4af8d18..1b55a4ed24 100644
--- a/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h
+++ b/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h
@@ -53,6 +53,7 @@
53#define BATT_VTRICKLE_CHARGE 2900 /* Must charge slowly */ 53#define BATT_VTRICKLE_CHARGE 2900 /* Must charge slowly */
54#define BATT_VSLOW_CHARGE 3500 /* Lower-current charge mode below 54#define BATT_VSLOW_CHARGE 3500 /* Lower-current charge mode below
55 * this level */ 55 * this level */
56#define BATT_FULL_VOLTAGE 4161 /* Battery already topped */
56#define BATT_VAUTO_RECHARGE 4100 /* When to begin another cycle */ 57#define BATT_VAUTO_RECHARGE 4100 /* When to begin another cycle */
57#define BATT_USB_VAUTO_RECHARGE 4000 /* When to cycle with USB only */ 58#define BATT_USB_VAUTO_RECHARGE 4000 /* When to cycle with USB only */
58#define BATT_USB_VSTOP 4140 /* When to "stop" when USB only */ 59#define BATT_USB_VSTOP 4140 /* When to "stop" when USB only */
@@ -92,23 +93,13 @@
92#define BATT_AVE_SAMPLES 32 93#define BATT_AVE_SAMPLES 32
93#define ICHARGER_AVE_SAMPLES 32 94#define ICHARGER_AVE_SAMPLES 32
94 95
96void powermgmt_init_target(void);
97void charging_algorithm_step(void);
98void charging_algorithm_close(void);
99
95/* Provide filtered charge current */ 100/* Provide filtered charge current */
96int battery_charge_current(void); 101int battery_charge_current(void);
97 102
98#ifndef SIMULATOR 103#define CURRENT_MAX_CHG battery_charge_current()
99/* Indicate various functions that require implementation at the target level.
100 * This is because the battery could be low or the battery switch is off but
101 * with the main charger attached which implies safe power for anything. The
102 * true battery reading is always reported for voltage readings and not the
103 * value at the application supply. */
104#define TARGET_QUERY_FORCE_SHUTDOWN
105
106/* For this the application supply is read out if the charger is attached or
107 * the battery read if not (completely hardware selected at BP). */
108#define TARGET_BATTERY_LEVEL_SAFE
109
110/* The state should be adjusted to CHARGING or DISCHARGING */
111#define TARGET_POWERMGMT_FILTER_CHARGE_STATE
112#endif /* SIMULATOR */
113 104
114#endif /* POWERMGMT_TARGET_H */ 105#endif /* POWERMGMT_TARGET_H */