diff options
Diffstat (limited to 'firmware/target/arm/tatung/tpj1022/power-tpj1022.c')
-rw-r--r-- | firmware/target/arm/tatung/tpj1022/power-tpj1022.c | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/firmware/target/arm/tatung/tpj1022/power-tpj1022.c b/firmware/target/arm/tatung/tpj1022/power-tpj1022.c new file mode 100644 index 0000000000..e8bc4e1fb0 --- /dev/null +++ b/firmware/target/arm/tatung/tpj1022/power-tpj1022.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Barry Wardell | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | /* Created from power.c using some iPod code, and some custom stuff based on | ||
21 | GPIO analysis | ||
22 | */ | ||
23 | |||
24 | #include "config.h" | ||
25 | #include "cpu.h" | ||
26 | #include <stdbool.h> | ||
27 | #include "adc.h" | ||
28 | #include "kernel.h" | ||
29 | #include "system.h" | ||
30 | #include "power.h" | ||
31 | #include "hwcompat.h" | ||
32 | #include "logf.h" | ||
33 | #include "usb.h" | ||
34 | |||
35 | #if CONFIG_CHARGING == CHARGING_CONTROL | ||
36 | bool charger_enabled; | ||
37 | #endif | ||
38 | |||
39 | void power_init(void) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | bool charger_inserted(void) | ||
44 | { | ||
45 | return false; | ||
46 | } | ||
47 | |||
48 | void ide_power_enable(bool on) | ||
49 | { | ||
50 | (void)on; | ||
51 | /* We do nothing on the iPod */ | ||
52 | } | ||
53 | |||
54 | |||
55 | bool ide_powered(void) | ||
56 | { | ||
57 | /* pretend we are always powered - we don't turn it off on the ipod */ | ||
58 | return true; | ||
59 | } | ||
60 | |||
61 | void power_off(void) | ||
62 | { | ||
63 | /* Give things a second to settle before cutting power */ | ||
64 | sleep(HZ); | ||
65 | |||
66 | //GPIOF_OUTPUT_VAL &=~ 0x20; | ||
67 | } | ||