[PATCH 6/9] Care about PCF50633 ADC disabled

Sven Rebhan odinshorse at googlemail.com
Sun Mar 1 14:38:37 CET 2009

If the PCF50633 ADC is disabled, but the charger is enabled we can't determine
the charger type using the pulldown. The safest thing we can do is to fallback
to 100mA that should be supplied according to the USB specs.

Signed-off-by: Sven Rebhan <odinshorse at googlemail.com>

diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index 9ad7b90..cd4d161 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -194,10 +194,15 @@ static void gta02_charger_worker(struct work_struct *work)
+#ifdef CONFIG_PCF50633_ADC
 		gta02_configure_pmu_for_charger, NULL);
+               /* If the PCF50633 ADC is disabled we fallback to a 100mA limit for safety. */
+               pcf50633_mbc_usb_curlim_set(pcf, 100);
 #define GTA02_CHARGER_CONFIGURE_TIMEOUT ((3000 * HZ) / 1000)

More information about the openmoko-kernel mailing list