From b0c718454081b884b0c6987757f1fa3c2320b2bc Mon Sep 17 00:00:00 2001 From: Sven Rebhan Date: Mon, 23 Feb 2009 01:21:55 +0000 Subject: Care about PCF50633 ADC disabled 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 --- arch/arm/mach-s3c2442/mach-gta02.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/mach-s3c2442') diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c index 91e752db267..9eaf0b2fa74 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); return; } else { +#ifdef CONFIG_PCF50633_ADC pcf50633_adc_async_read(pcf, PCF50633_ADCC1_MUX_ADCIN1, PCF50633_ADCC1_AVERAGE_16, gta02_configure_pmu_for_charger, NULL); +#else + /* If the PCF50633 ADC is disabled we fallback to save 100mA */ + pcf50633_mbc_usb_curlim_set(pcf, 100); +#endif return; } } -- cgit v1.2.3