summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/power-as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/power-as3525.c')
-rw-r--r--firmware/target/arm/as3525/power-as3525.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/firmware/target/arm/as3525/power-as3525.c b/firmware/target/arm/as3525/power-as3525.c
index a61cb59c12..07867546c2 100644
--- a/firmware/target/arm/as3525/power-as3525.c
+++ b/firmware/target/arm/as3525/power-as3525.c
@@ -18,7 +18,6 @@
18 * KIND, either express or implied. 18 * KIND, either express or implied.
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21
22#include <stdbool.h> 21#include <stdbool.h>
23#include "config.h" 22#include "config.h"
24#include "ascodec-target.h" 23#include "ascodec-target.h"
@@ -40,14 +39,14 @@ void power_init(void)
40} 39}
41 40
42#if CONFIG_CHARGING 41#if CONFIG_CHARGING
43bool charger_inserted(void) 42unsigned int power_input_status(void)
44{ 43{
45 if(ascodec_read(AS3514_IRQ_ENRD0) & (1<<5)) 44 return (ascodec_read(AS3514_IRQ_ENRD0) & (1<<5)) ?
46 return true; 45 POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
47 else 46
48 return false; 47 /* TODO: Handle USB and other sources properly */
49} 48}
50#endif 49#endif /* CONFIG_CHARGING */
51 50
52void ide_power_enable(bool on) 51void ide_power_enable(bool on)
53{ 52{