diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/powermgmt.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/as3525/powermgmt-target.h | 4 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h | 4 | ||||
-rw-r--r-- | firmware/target/arm/philips/sa9200/powermgmt-target.h | 4 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/powermgmt-target.h | 4 | ||||
-rw-r--r-- | firmware/target/sh/archos/recorder/powermgmt-recorder.c | 8 | ||||
-rw-r--r-- | firmware/target/sh/archos/recorder/powermgmt-target.h | 14 |
7 files changed, 8 insertions, 32 deletions
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index 9e9d3d0fd8..14d0078c31 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h | |||
@@ -139,6 +139,8 @@ int _battery_time(void); /* minutes */ | |||
139 | int _battery_voltage(void); /* voltage in millivolts */ | 139 | int _battery_voltage(void); /* voltage in millivolts */ |
140 | #if CONFIG_CHARGING >= CHARGING_TARGET | 140 | #if CONFIG_CHARGING >= CHARGING_TARGET |
141 | void powermgmt_init_target(void); | 141 | void powermgmt_init_target(void); |
142 | void charging_algorithm_close(void); | ||
143 | void charging_algorithm_step(void); | ||
142 | #endif | 144 | #endif |
143 | 145 | ||
144 | #ifdef HAVE_BATTERY_SWITCH | 146 | #ifdef HAVE_BATTERY_SWITCH |
diff --git a/firmware/target/arm/as3525/powermgmt-target.h b/firmware/target/arm/as3525/powermgmt-target.h index f2762f3e47..3b459fa695 100644 --- a/firmware/target/arm/as3525/powermgmt-target.h +++ b/firmware/target/arm/as3525/powermgmt-target.h | |||
@@ -100,10 +100,6 @@ | |||
100 | #error "Charger settings not defined!" | 100 | #error "Charger settings not defined!" |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | void powermgmt_init_target(void); | ||
104 | void charging_algorithm_step(void); | ||
105 | void charging_algorithm_close(void); | ||
106 | |||
107 | /* We want to be able to reset the averaging filter */ | 103 | /* We want to be able to reset the averaging filter */ |
108 | #define HAVE_RESET_BATTERY_FILTER | 104 | #define HAVE_RESET_BATTERY_FILTER |
109 | 105 | ||
diff --git a/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h b/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h index c881bed68c..a45d1b712f 100644 --- a/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/powermgmt-target.h | |||
@@ -107,10 +107,6 @@ | |||
107 | #define BATT_AVE_SAMPLES 128 | 107 | #define BATT_AVE_SAMPLES 128 |
108 | #define ICHARGER_AVE_SAMPLES 32 | 108 | #define ICHARGER_AVE_SAMPLES 32 |
109 | 109 | ||
110 | void powermgmt_init_target(void); | ||
111 | void charging_algorithm_step(void); | ||
112 | void charging_algorithm_close(void); | ||
113 | |||
114 | /* Provide filtered charge current */ | 110 | /* Provide filtered charge current */ |
115 | int battery_charge_current(void); | 111 | int battery_charge_current(void); |
116 | 112 | ||
diff --git a/firmware/target/arm/philips/sa9200/powermgmt-target.h b/firmware/target/arm/philips/sa9200/powermgmt-target.h index 4400cda5d1..37ea310efe 100644 --- a/firmware/target/arm/philips/sa9200/powermgmt-target.h +++ b/firmware/target/arm/philips/sa9200/powermgmt-target.h | |||
@@ -36,10 +36,6 @@ | |||
36 | */ | 36 | */ |
37 | #define ADC_BATTERY ADC_RTCSUP | 37 | #define ADC_BATTERY ADC_RTCSUP |
38 | 38 | ||
39 | void powermgmt_init_target(void); | ||
40 | void charging_algorithm_step(void); | ||
41 | void charging_algorithm_close(void); | ||
42 | |||
43 | /* We want to be able to reset the averaging filter */ | 39 | /* We want to be able to reset the averaging filter */ |
44 | #define HAVE_RESET_BATTERY_FILTER | 40 | #define HAVE_RESET_BATTERY_FILTER |
45 | 41 | ||
diff --git a/firmware/target/arm/sandisk/powermgmt-target.h b/firmware/target/arm/sandisk/powermgmt-target.h index aa6a0e0e3d..cb1ccf55c4 100644 --- a/firmware/target/arm/sandisk/powermgmt-target.h +++ b/firmware/target/arm/sandisk/powermgmt-target.h | |||
@@ -47,10 +47,6 @@ | |||
47 | #define ADC_BATTERY ADC_RTCSUP | 47 | #define ADC_BATTERY ADC_RTCSUP |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | void powermgmt_init_target(void); | ||
51 | void charging_algorithm_step(void); | ||
52 | void charging_algorithm_close(void); | ||
53 | |||
54 | /* We want to be able to reset the averaging filter */ | 50 | /* We want to be able to reset the averaging filter */ |
55 | #define HAVE_RESET_BATTERY_FILTER | 51 | #define HAVE_RESET_BATTERY_FILTER |
56 | 52 | ||
diff --git a/firmware/target/sh/archos/recorder/powermgmt-recorder.c b/firmware/target/sh/archos/recorder/powermgmt-recorder.c index 0bce1585cd..1e78b8d155 100644 --- a/firmware/target/sh/archos/recorder/powermgmt-recorder.c +++ b/firmware/target/sh/archos/recorder/powermgmt-recorder.c | |||
@@ -65,6 +65,10 @@ int _battery_voltage(void) | |||
65 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; | 65 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; |
66 | } | 66 | } |
67 | 67 | ||
68 | void powermgmt_init_target(void) | ||
69 | { | ||
70 | } | ||
71 | |||
68 | /** Charger control **/ | 72 | /** Charger control **/ |
69 | #ifdef CHARGING_DEBUG_FILE | 73 | #ifdef CHARGING_DEBUG_FILE |
70 | #include "file.h" | 74 | #include "file.h" |
@@ -483,12 +487,12 @@ void charging_algorithm_step(void) | |||
483 | charger_enable(trickle_sec > 0); | 487 | charger_enable(trickle_sec > 0); |
484 | } | 488 | } |
485 | 489 | ||
486 | #ifdef CHARGING_DEBUG_FILE | ||
487 | void charging_algorithm_close(void) | 490 | void charging_algorithm_close(void) |
488 | { | 491 | { |
492 | #ifdef CHARGING_DEBUG_FILE | ||
489 | debug_file_close(); | 493 | debug_file_close(); |
490 | } | ||
491 | #endif /* CHARGING_DEBUG_FILE */ | 494 | #endif /* CHARGING_DEBUG_FILE */ |
495 | } | ||
492 | 496 | ||
493 | /* Returns true if the unit is charging the batteries. */ | 497 | /* Returns true if the unit is charging the batteries. */ |
494 | bool charging_state(void) | 498 | bool charging_state(void) |
diff --git a/firmware/target/sh/archos/recorder/powermgmt-target.h b/firmware/target/sh/archos/recorder/powermgmt-target.h index 7792c05185..6b68d05bd4 100644 --- a/firmware/target/sh/archos/recorder/powermgmt-target.h +++ b/firmware/target/sh/archos/recorder/powermgmt-target.h | |||
@@ -86,18 +86,4 @@ bool charger_enabled(void); | |||
86 | /* Battery filter lengths in samples */ | 86 | /* Battery filter lengths in samples */ |
87 | #define BATT_AVE_SAMPLES 32 | 87 | #define BATT_AVE_SAMPLES 32 |
88 | 88 | ||
89 | /* No init to do */ | ||
90 | #if !(CONFIG_PLATFORM & PLATFORM_HOSTED) | ||
91 | static inline void powermgmt_init_target(void) {} | ||
92 | #endif | ||
93 | void charging_algorithm_step(void); | ||
94 | |||
95 | #ifdef CHARGING_DEBUG_FILE | ||
96 | /* Need to flush and close debug file */ | ||
97 | void charging_algorithm_close(void); | ||
98 | #else | ||
99 | /* No poweroff operation to do */ | ||
100 | static inline void charging_algorithm_close(void) {} | ||
101 | #endif | ||
102 | |||
103 | #endif /* POWERMGMT_TARGET_H */ | 89 | #endif /* POWERMGMT_TARGET_H */ |