summaryrefslogtreecommitdiff
path: root/firmware/drivers/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/power.c')
-rw-r--r--firmware/drivers/power.c18
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
37static int fmstatus = 0; 37static bool powered = false;
38 38
39void radio_set_status(int status) 39bool radio_powered()
40{ 40{
41 fmstatus = status; 41 return powered;
42}
43
44bool 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
53int radio_get_status(void)
54{
55 return fmstatus;
56} 58}
57 59
58#endif /* #ifdef CONFIG_TUNER */ 60#endif /* #ifdef CONFIG_TUNER */