summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-11-19 19:04:03 +0000
committerAmaury Pouly <amaury.pouly@gmail.com>2013-11-19 19:04:03 +0000
commitc2c2274e0adacc1a0c5bdb57fa1367badb7b047f (patch)
treede5477d9b65a50bf5b5e693b1254ac653564c925 /firmware
parent287be81c16ef52484403c9f08bbf80465da6263b (diff)
imx233: factor adc accross targets
The old code allowed each target to specify its adc targets but this proved useless since the target rely directly on imx233/lradc for input method and generic adc is mostly used for battery and debug. Remove all target specific files and provide a generic implemenation. The targets can still specify a battery temperature channel in powermgmt-target.h Change-Id: I68cf2e3e46379d174ac6d774ffb237bb15a19ae3
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES5
-rw-r--r--firmware/target/arm/imx233/adc-imx233.c48
-rw-r--r--firmware/target/arm/imx233/adc-target.h (renamed from firmware/target/arm/imx233/adc-imx233.h)21
-rw-r--r--firmware/target/arm/imx233/creative-zen/adc-target.h29
-rw-r--r--firmware/target/arm/imx233/creative-zen/adc-zen.c34
-rw-r--r--firmware/target/arm/imx233/creative-zen/lcd-zen.c10
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi2/adc-target.h32
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi2/adc-zenxfi2.c40
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/adc-target.h32
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/adc-zenxfi3.c40
-rw-r--r--firmware/target/arm/imx233/debug-imx233.c4
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c42
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h33
-rw-r--r--firmware/target/arm/imx233/sony-nwz/adc-nwz.c38
-rw-r--r--firmware/target/arm/imx233/sony-nwz/adc-target.h31
15 files changed, 62 insertions, 377 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 49a4edcc1d..5cdc37976a 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1177,7 +1177,6 @@ target/arm/imx233/creative-zen/lcd-zenv.c
target/arm/imx233/creative-zen/button-zen.c
target/arm/imx233/creative-zen/debug-zen.c
target/arm/imx233/creative-zen/power-zen.c
-target/arm/imx233/creative-zen/adc-zen.c
target/arm/imx233/creative-zen/powermgmt-zen.c
target/arm/imx233/button-lradc-imx233.c
#endif
@@ -1189,7 +1188,6 @@ target/arm/imx233/creative-zenxfi2/lcd-zenxfi2.c
target/arm/imx233/creative-zenxfi2/button-zenxfi2.c
target/arm/imx233/creative-zenxfi2/debug-zenxfi2.c
target/arm/imx233/creative-zenxfi2/power-zenxfi2.c
-target/arm/imx233/creative-zenxfi2/adc-zenxfi2.c
target/arm/imx233/creative-zenxfi2/powermgmt-zenxfi2.c
#endif
@@ -1201,7 +1199,6 @@ target/arm/imx233/creative-zenxfi3/lcd-zenxfi3.c
target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
target/arm/imx233/creative-zenxfi3/debug-zenxfi3.c
target/arm/imx233/creative-zenxfi3/power-zenxfi3.c
-target/arm/imx233/creative-zenxfi3/adc-zenxfi3.c
target/arm/imx233/creative-zenxfi3/powermgmt-zenxfi3.c
#endif
@@ -1212,7 +1209,6 @@ target/arm/imx233/sony-nwz/backlight-nwz.c
target/arm/imx233/sony-nwz/button-nwz.c
target/arm/imx233/sony-nwz/debug-nwz.c
target/arm/imx233/sony-nwz/power-nwz.c
-target/arm/imx233/sony-nwz/adc-nwz.c
# if defined(SONY_NWZE360)
target/arm/imx233/sony-nwz/lcd-nwze360.c
target/arm/imx233/sony-nwz/powermgmt-nwze360.c
@@ -1437,7 +1433,6 @@ target/arm/imx233/sansa-fuzeplus/lcd-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/button-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/debug-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/power-fuzeplus.c
-target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c
target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c
#endif
diff --git a/firmware/target/arm/imx233/adc-imx233.c b/firmware/target/arm/imx233/adc-imx233.c
index a6025cfde9..a0bda9ab02 100644
--- a/firmware/target/arm/imx233/adc-imx233.c
+++ b/firmware/target/arm/imx233/adc-imx233.c
@@ -19,9 +19,46 @@
*
****************************************************************************/
-#include "adc-imx233.h"
+#include "adc-target.h"
#include "power-imx233.h"
+/* Virtual channels */
+#define IMX233_ADC_BATTERY -1 /* Battery voltage (mV) */
+#define IMX233_ADC_DIE_TEMP -2 /* Die temperature (°C) */
+#define IMX233_ADC_VDDIO -3 /* VddIO voltage (mV) */
+#if IMX233_SUBTARGET >= 3700
+#define IMX233_ADC_VDD5V -4 /* Vdd5V voltage (mV) */
+#endif
+#ifdef IMX233_BATT_TEMP_SENSOR
+#define IMX233_ADC_BATT_TEMP -5 /* Battery temperature (°C) */
+#endif
+
+static const char *imx233_adc_channel_name[NUM_ADC_CHANNELS] =
+{
+ [ADC_BATTERY] = "Battery(raw)",
+ [ADC_DIE_TEMP] = "Die temperature(°C)",
+ [ADC_VDDIO] = "VddIO(mV)",
+#if IMX233_SUBTARGET >= 3700
+ [ADC_VDD5V] = "Vdd5V(mV)",
+#endif
+#ifdef IMX233_BATT_TEMP_SENSOR
+ [ADC_BATT_TEMP] = "Battery temperature(raw)",
+#endif
+};
+
+static int imx233_adc_mapping[NUM_ADC_CHANNELS] =
+{
+ [ADC_BATTERY] = IMX233_ADC_BATTERY,
+ [ADC_DIE_TEMP] = IMX233_ADC_DIE_TEMP,
+ [ADC_VDDIO] = IMX233_ADC_VDDIO,
+#if IMX233_SUBTARGET >= 3700
+ [ADC_VDD5V] = IMX233_ADC_VDD5V,
+#endif
+#ifdef IMX233_BATT_TEMP_SENSOR
+ [ADC_BATT_TEMP] = IMX233_ADC_BATT_TEMP,
+#endif
+};
+
void adc_init(void)
{
}
@@ -52,11 +89,11 @@ static short adc_read_virtual(int c)
return imx233_lradc_read_battery_voltage();
case IMX233_ADC_VDDIO:
/* VddIO pin has a builtin 2:1 divide */
- return adc_read_physical(LRADC_SRC_VDDIO, false);
+ return adc_read_physical(LRADC_SRC_VDDIO, true) * 2;
#if IMX233_SUBTARGET >= 3700
case IMX233_ADC_VDD5V:
/* Vdd5V pin has a builtin 4:1 divide */
- return adc_read_physical(LRADC_SRC_5V, false) * 2;
+ return adc_read_physical(LRADC_SRC_5V, true) * 4;
#endif
case IMX233_ADC_DIE_TEMP:
{
@@ -102,3 +139,8 @@ unsigned short adc_read(int channel)
else
return adc_read_physical(c, true);
}
+
+const char *adc_name(int channel)
+{
+ return imx233_adc_channel_name[channel];
+}
diff --git a/firmware/target/arm/imx233/adc-imx233.h b/firmware/target/arm/imx233/adc-target.h
index f833e17be0..ed6e3eca77 100644
--- a/firmware/target/arm/imx233/adc-imx233.h
+++ b/firmware/target/arm/imx233/adc-target.h
@@ -27,20 +27,21 @@
#include "powermgmt-target.h"
#include "lradc-imx233.h"
-/* Virtual channels */
-#define IMX233_ADC_BATTERY -1 /* Battery voltage (mV) */
-#define IMX233_ADC_DIE_TEMP -2 /* Die temperature (°C) */
-#define IMX233_ADC_VDDIO -3 /* VddIO voltage (mV) */
+enum imx233_adc_channel_t
+{
+ ADC_BATTERY, /* Battery voltage (mV) */
+ ADC_DIE_TEMP, /* Die temperature (°C) */
+ ADC_VDDIO, /* VDDIO (mV) */
#if IMX233_SUBTARGET >= 3700
-#define IMX233_ADC_VDD5V -4 /* Vdd5V voltage (mV) */
+ ADC_VDD5V, /* VDD5V (mV) */
#endif
#ifdef IMX233_BATT_TEMP_SENSOR
-#define IMX233_ADC_BATT_TEMP -5 /* Battery temperature (°C) */
+ ADC_BATT_TEMP, /* Battery temperature (°C) */
#endif
+ NUM_ADC_CHANNELS,
+};
-/* Channel mapping */
-extern int imx233_adc_mapping[];
-/* Channel names */
-extern const char *imx233_adc_channel_name[];
+/* Return channel name */
+const char *adc_name(int channel);
#endif
diff --git a/firmware/target/arm/imx233/creative-zen/adc-target.h b/firmware/target/arm/imx233/creative-zen/adc-target.h
deleted file mode 100644
index 5a525152f6..0000000000
--- a/firmware/target/arm/imx233/creative-zen/adc-target.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2013 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef _ADC_TARGET_H_
-#define _ADC_TARGET_H_
-
-#define NUM_ADC_CHANNELS 2
-
-#define ADC_BATTERY 0
-#define ADC_DIE_TEMP 1
-
-#endif
diff --git a/firmware/target/arm/imx233/creative-zen/adc-zen.c b/firmware/target/arm/imx233/creative-zen/adc-zen.c
deleted file mode 100644
index 92c1063c24..0000000000
--- a/firmware/target/arm/imx233/creative-zen/adc-zen.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2013 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "adc-target.h"
-#include "adc-imx233.h"
-
-int imx233_adc_mapping[] =
-{
- [ADC_DIE_TEMP] = IMX233_ADC_DIE_TEMP,
- [ADC_BATTERY] = IMX233_ADC_BATTERY,
-};
-
-const char *imx233_adc_channel_name[] =
-{
- "Die temperature(°C)",
- "Battery(raw)",
-};
diff --git a/firmware/target/arm/imx233/creative-zen/lcd-zen.c b/firmware/target/arm/imx233/creative-zen/lcd-zen.c
index 22d643c778..3b58159df4 100644
--- a/firmware/target/arm/imx233/creative-zen/lcd-zen.c
+++ b/firmware/target/arm/imx233/creative-zen/lcd-zen.c
@@ -278,15 +278,15 @@ void lcd_init_device(void)
imx233_pinctrl_acquire(1, 8, "lcd_power");
imx233_pinctrl_set_function(1, 8, PINCTRL_FUNCTION_GPIO);
imx233_pinctrl_enable_gpio(1, 8, true);
- // power up
- lcd_power(true);
// reset lcd
imx233_lcdif_reset_lcd(true);
- mdelay(1);
+ mdelay(10);
imx233_lcdif_reset_lcd(false);
- mdelay(1);
+ mdelay(10);
imx233_lcdif_reset_lcd(true);
- mdelay(1);
+ mdelay(10);
+ // power up
+ lcd_power(true);
// setup registers
imx233_lcdif_enable_sync_signals(true); // we need frame signals during init
lcd_power_seq();
diff --git a/firmware/target/arm/imx233/creative-zenxfi2/adc-target.h b/firmware/target/arm/imx233/creative-zenxfi2/adc-target.h
deleted file mode 100644
index 79b281b892..0000000000
--- a/firmware/target/arm/imx233/creative-zenxfi2/adc-target.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2011 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef _ADC_TARGET_H_
-#define _ADC_TARGET_H_
-
-#define NUM_ADC_CHANNELS 5
-
-#define ADC_BATTERY 0
-#define ADC_DIE_TEMP 1
-#define ADC_VDDIO 2
-#define ADC_5V 3
-#define ADC_BATT_TEMP 4
-
-#endif
diff --git a/firmware/target/arm/imx233/creative-zenxfi2/adc-zenxfi2.c b/firmware/target/arm/imx233/creative-zenxfi2/adc-zenxfi2.c
deleted file mode 100644
index 9ec641be88..0000000000
--- a/firmware/target/arm/imx233/creative-zenxfi2/adc-zenxfi2.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2011 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "adc-target.h"
-#include "adc-imx233.h"
-
-int imx233_adc_mapping[] =
-{
- [ADC_BATTERY] = IMX233_ADC_BATTERY,
- [ADC_DIE_TEMP] = IMX233_ADC_DIE_TEMP,
- [ADC_VDDIO] = IMX233_ADC_VDDIO,
- [ADC_5V] = IMX233_ADC_VDD5V,
- [ADC_BATT_TEMP] = IMX233_ADC_BATT_TEMP,
-};
-
-const char *imx233_adc_channel_name[] =
-{
- "Battery(raw)",
- "Die temperature(°C)",
- "VddIO",
- "Vdd5V",
- "Battery temperature(raw)",
-};
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/adc-target.h b/firmware/target/arm/imx233/creative-zenxfi3/adc-target.h
deleted file mode 100644
index d946989c1c..0000000000
--- a/firmware/target/arm/imx233/creative-zenxfi3/adc-target.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2012 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef _ADC_TARGET_H_
-#define _ADC_TARGET_H_
-
-#define NUM_ADC_CHANNELS 5
-
-#define ADC_BATTERY 0
-#define ADC_DIE_TEMP 1
-#define ADC_VDDIO 2
-#define ADC_5V 3
-#define ADC_BATT_TEMP 4
-
-#endif
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/adc-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/adc-zenxfi3.c
deleted file mode 100644
index 919e55200b..0000000000
--- a/firmware/target/arm/imx233/creative-zenxfi3/adc-zenxfi3.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2012 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "adc-target.h"
-#include "adc-imx233.h"
-
-int imx233_adc_mapping[] =
-{
- [ADC_BATTERY] = IMX233_ADC_BATTERY,
- [ADC_DIE_TEMP] = IMX233_ADC_DIE_TEMP,
- [ADC_VDDIO] = IMX233_ADC_VDDIO,
- [ADC_5V] = IMX233_ADC_VDD5V,
- [ADC_BATT_TEMP] = IMX233_ADC_BATT_TEMP,
-};
-
-const char *imx233_adc_channel_name[] =
-{
- "Battery(raw)",
- "Die temperature(°C)",
- "VddIO",
- "Vdd5V",
- "Battery temperature(raw)",
-};
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c
index 8abe8e1c40..63172c8c1e 100644
--- a/firmware/target/arm/imx233/debug-imx233.c
+++ b/firmware/target/arm/imx233/debug-imx233.c
@@ -24,7 +24,6 @@
#include "lcd.h"
#include "font.h"
#include "adc.h"
-#include "adc-imx233.h"
#include "power-imx233.h"
#include "clkctrl-imx233.h"
#include "powermgmt-imx233.h"
@@ -269,8 +268,7 @@ bool dbg_hw_info_lradc(void)
lcd_putsf(0, 0, "Battery(mV) %d", _battery_voltage());
for(unsigned i = 0; i < NUM_ADC_CHANNELS; i++)
{
- lcd_putsf(0, i + 1, "%s %d", imx233_adc_channel_name[i],
- adc_read(i));
+ lcd_putsf(0, i + 1, "%s %d", adc_name(i), adc_read(i));
}
lcd_update();
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c
deleted file mode 100644
index 5d04f6f6b0..0000000000
--- a/firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2011 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "adc-target.h"
-#include "adc-imx233.h"
-
-int imx233_adc_mapping[] =
-{
- [ADC_BATTERY] = IMX233_ADC_BATTERY,
- [ADC_DIE_TEMP] = IMX233_ADC_DIE_TEMP,
- [ADC_VDDIO] = IMX233_ADC_VDDIO,
- [ADC_5V] = IMX233_ADC_VDD5V,
- [ADC_BATT_TEMP] = IMX233_ADC_BATT_TEMP,
- [ADC_CH2] = LRADC_SRC(2),
-};
-
-const char *imx233_adc_channel_name[] =
-{
- "Battery(raw)",
- "Die temperature(°C)",
- "VddIO(mV)",
- "Vdd5V(mV)",
- "Battery temperature(raw)",
- "Channel 2",
-};
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h b/firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h
deleted file mode 100644
index 9fccfa9da4..0000000000
--- a/firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2011 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef _ADC_TARGET_H_
-#define _ADC_TARGET_H_
-
-#define NUM_ADC_CHANNELS 6
-
-#define ADC_BATTERY 0
-#define ADC_DIE_TEMP 1
-#define ADC_VDDIO 2
-#define ADC_5V 3
-#define ADC_BATT_TEMP 4
-#define ADC_CH2 5
-
-#endif
diff --git a/firmware/target/arm/imx233/sony-nwz/adc-nwz.c b/firmware/target/arm/imx233/sony-nwz/adc-nwz.c
deleted file mode 100644
index e53005c082..0000000000
--- a/firmware/target/arm/imx233/sony-nwz/adc-nwz.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2013 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "adc-target.h"
-#include "adc-imx233.h"
-
-int imx233_adc_mapping[] =
-{
- [ADC_BATTERY] = IMX233_ADC_BATTERY,
- [ADC_DIE_TEMP] = IMX233_ADC_DIE_TEMP,
- [ADC_VDDIO] = IMX233_ADC_VDDIO,
- [ADC_5V] = IMX233_ADC_VDD5V,
-};
-
-const char *imx233_adc_channel_name[] =
-{
- "Battery(raw)",
- "Die temperature(°C)",
- "VddIO",
- "Vdd5V",
-};
diff --git a/firmware/target/arm/imx233/sony-nwz/adc-target.h b/firmware/target/arm/imx233/sony-nwz/adc-target.h
deleted file mode 100644
index e9c1939941..0000000000
--- a/firmware/target/arm/imx233/sony-nwz/adc-target.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2013 by Amaury Pouly
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#ifndef _ADC_TARGET_H_
-#define _ADC_TARGET_H_
-
-#define NUM_ADC_CHANNELS 4
-
-#define ADC_BATTERY 0
-#define ADC_DIE_TEMP 1
-#define ADC_VDDIO 2
-#define ADC_5V 3
-
-#endif