diff options
author | Thomas Martitz <kugel@rockbox.org> | 2011-12-31 13:34:56 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2011-12-31 13:34:56 +0000 |
commit | 05f12e08772d1ca03101b176e329bfd313daf673 (patch) | |
tree | 56ce125d3bd3c2c1d3e5588b2a3ddab1b8a460ab /firmware/export/power.h | |
parent | 07605a659e06efaedb325e9a91214be503188f06 (diff) | |
download | rockbox-05f12e08772d1ca03101b176e329bfd313daf673.tar.gz rockbox-05f12e08772d1ca03101b176e329bfd313daf673.zip |
ypr0: Enable battery voltage read-out, charging monitoring and charger detection.
Voltage can be read using as3543 adc (i.e. ascodec api, on this target implemented
via ioctl()). TODO: Look into possibly controlling charging more by re-using
powermgmt-ascodec.c. However, charging seems to be controlled by the kernel,
so may not be needed.
Charger state can be read using /dev/minivet. It allows to differentiate between
wall charger and usb charging, but that's not implemented (is it even worthwhile?)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31470 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/power.h')
-rw-r--r-- | firmware/export/power.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/export/power.h b/firmware/export/power.h index d46b9ba924..4937705910 100644 --- a/firmware/export/power.h +++ b/firmware/export/power.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include "config.h" | 24 | #include "config.h" |
25 | 25 | ||
26 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) || defined(SAMSUNG_YPR0) | ||
26 | #if CONFIG_CHARGING | 27 | #if CONFIG_CHARGING |
27 | enum power_input_flags { | 28 | enum power_input_flags { |
28 | /* No external power source? Default. */ | 29 | /* No external power source? Default. */ |
@@ -100,4 +101,6 @@ bool tuner_power(bool status); | |||
100 | bool tuner_powered(void); | 101 | bool tuner_powered(void); |
101 | #endif | 102 | #endif |
102 | 103 | ||
104 | #endif | ||
105 | |||
103 | #endif /* _POWER_H_ */ | 106 | #endif /* _POWER_H_ */ |