summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-03-15 18:47:23 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2012-03-15 18:47:23 +0100
commite07b22f27e4fb23355d96e840252753be8b2ba39 (patch)
tree188e427f0bf1a29465346f8bcbacbf3b76db849b /firmware
parent9caffa8bf7a2f1fc06b70eb0015c4f089a1173af (diff)
fuze+: add unknown channel to debug menu
imx233: always divide physical channels by two for wider range The Fuze+ OF monitors channel 2 but I'm unable to determine the meaning of it. Print the value on the debug menu so that people can have a look at it. Change-Id: I8a942febeafbce06014178abda12e38a16c26664
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/imx233/adc-imx233.c2
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c2
-rw-r--r--firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h3
3 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/arm/imx233/adc-imx233.c b/firmware/target/arm/imx233/adc-imx233.c
index 21447bbda7..08adba442d 100644
--- a/firmware/target/arm/imx233/adc-imx233.c
+++ b/firmware/target/arm/imx233/adc-imx233.c
@@ -76,7 +76,7 @@ int adc_read_physical(int src)
{
int virt = imx233_lradc_acquire_channel(TIMEOUT_BLOCK);
// divide by two for wider ranger
- imx233_lradc_setup_channel(virt, false, false, 0, src);
+ imx233_lradc_setup_channel(virt, true, false, 0, src);
int val = adc_read_physical_ex(virt);
imx233_lradc_release_channel(virt);
return val;
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c
index 78b88c9e85..7207e5f8a8 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/adc-fuzeplus.c
@@ -27,6 +27,7 @@ int imx233_adc_mapping[] =
[ADC_DIE_TEMP] = IMX233_ADC_DIE_TEMP,
[ADC_VDDIO] = IMX233_ADC_VDDIO,
[ADC_5V] = HW_LRADC_CHANNEL_5V,
+ [ADC_CH2] = HW_LRADC_CHANNEL(2),
};
const char *imx233_adc_channel_name[] =
@@ -35,4 +36,5 @@ const char *imx233_adc_channel_name[] =
"Die temperature(°C)",
"VddIO",
"Vdd5V",
+ "Channel 2",
};
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h b/firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h
index b7fa5edc86..e9c6f5d00e 100644
--- a/firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h
+++ b/firmware/target/arm/imx233/sansa-fuzeplus/adc-target.h
@@ -21,11 +21,12 @@
#ifndef _ADC_TARGET_H_
#define _ADC_TARGET_H_
-#define NUM_ADC_CHANNELS 4
+#define NUM_ADC_CHANNELS 5
#define ADC_BATTERY 0
#define ADC_DIE_TEMP 1
#define ADC_VDDIO 2
#define ADC_5V 3
+#define ADC_CH2 4
#endif