diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/power.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index 055ca07ab7..830270d08a 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c | |||
@@ -34,11 +34,17 @@ bool charger_enabled; | |||
34 | 34 | ||
35 | #ifdef CONFIG_TUNER | 35 | #ifdef CONFIG_TUNER |
36 | 36 | ||
37 | static int fmstatus = 0; | 37 | static bool powered = false; |
38 | 38 | ||
39 | void radio_set_status(int status) | 39 | bool radio_powered() |
40 | { | 40 | { |
41 | fmstatus = status; | 41 | return powered; |
42 | } | ||
43 | |||
44 | bool radio_power(bool status) | ||
45 | { | ||
46 | bool old_status = powered; | ||
47 | powered = status; | ||
42 | #ifdef HAVE_TUNER_PWR_CTRL | 48 | #ifdef HAVE_TUNER_PWR_CTRL |
43 | if (status) | 49 | if (status) |
44 | { | 50 | { |
@@ -48,11 +54,7 @@ void radio_set_status(int status) | |||
48 | else | 54 | else |
49 | or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */ | 55 | or_b(0x04, &PADRL); /* drive PA2 high for tuner disable */ |
50 | #endif | 56 | #endif |
51 | } | 57 | return old_status; |
52 | |||
53 | int radio_get_status(void) | ||
54 | { | ||
55 | return fmstatus; | ||
56 | } | 58 | } |
57 | 59 | ||
58 | #endif /* #ifdef CONFIG_TUNER */ | 60 | #endif /* #ifdef CONFIG_TUNER */ |