1
0
Fork 0
forked from len0rd/rockbox

imx233: rewrite lradc using new register headers

Change-Id: I06e4467c0ffe33145e6192528b074a23a8df67cc
This commit is contained in:
Amaury Pouly 2013-06-16 16:43:05 +02:00
parent 8517cf8bed
commit d815cf3c79
7 changed files with 93 additions and 155 deletions

View file

@ -51,10 +51,10 @@ 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(HW_LRADC_CHANNEL_VDDIO, false);
return adc_read_physical(LRADC_SRC_VDDIO, false);
case IMX233_ADC_VDD5V:
/* Vdd5V pin has a builtin 4:1 divide */
return adc_read_physical(HW_LRADC_CHANNEL_5V, false) * 2;
return adc_read_physical(LRADC_SRC_5V, false) * 2;
case IMX233_ADC_DIE_TEMP:
{
// don't block on second channel otherwise we might deadlock !