summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c')
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c
deleted file mode 100644
index be087eb140..0000000000
--- a/firmware/target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c
+++ /dev/null
@@ -1,53 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2011 by Amaury Pouly
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include "system.h"
23#include "power.h"
24#include "tuner.h"
25#include "fmradio_i2c.h"
26#include "pinctrl-imx233.h"
27#include "power-imx233.h"
28
29static bool tuner_enable = false;
30
31bool tuner_power(bool enable)
32{
33 if(enable != tuner_enable)
34 {
35 /* CE is B0P29 (active high) */
36 imx233_pinctrl_acquire(0, 29, "tuner power");
37 imx233_pinctrl_set_function(0, 29, PINCTRL_FUNCTION_GPIO);
38 imx233_pinctrl_set_drive(0, 29, PINCTRL_DRIVE_4mA);
39 imx233_pinctrl_enable_gpio(0, 29, enable);
40 imx233_pinctrl_set_gpio(0, 29, enable);
41 tuner_enable = enable;
42 /* give time to power up, datasheet states than minimum timing time is
43 * around 100µs so 1 tick should do */
44 sleep(1);
45 //imx233_power_set_dcdc_freq(enable, HW_POWER_MISC__FREQSEL__24MHz);
46 }
47 return tuner_enable;
48}
49
50bool tuner_powered(void)
51{
52 return tuner_enable;
53}