[PATCH 10/14] Care about PCF50633 ADC disabled

Sven Rebhan odinshorse at googlemail.com
Sun Feb 22 22:08:19 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 91e752d..9eaf0b2 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -427,10 +427,15 @@ static void gta02_charger_worker(struct work_struct *work)
 		pcf50633_mbc_usb_curlim_set(pcf, gta02_usb_vbus_draw);
 	} else {
+#ifdef CONFIG_PCF50633_ADC
 			gta02_configure_pmu_for_charger, NULL);
+		/* If the PCF50633 ADC is disabled we fallback to save 100mA */
+		pcf50633_mbc_usb_curlim_set(pcf, 100);

More information about the openmoko-kernel mailing list