1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Index: firmware/target/arm/adc-pp5020.c
===================================================================
--- firmware/target/arm/adc-pp5020.c	(revision 22567)
+++ firmware/target/arm/adc-pp5020.c	(working copy)
@@ -60,6 +60,16 @@
     adcdata[channel] = (adc_data_1<<2 | adc_data_2);

 #if !defined(PHILIPS_HDD1630)
+#if defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925)
+    /* this may only be necessary for channel 1 (battery) */
+    if ((PLL_CONTROL & 0x80000000) == 0)
+    {
+        if (adcdata[channel] < 0x1a)
+            adcdata[channel] = 0;
+        else
+            adcdata[channel] -= 0x1a;
+    }
+#else
     /* ADC values read low if PLL is enabled */
     if(PLL_CONTROL & 0x80000000){
         adcdata[channel] += 0x14;
@@ -67,6 +77,7 @@
             adcdata[channel] = 0x400;
     }
 #endif
+#endif

     return adcdata[channel];
 }