diff options
author | Sven Rebhan <odinshorse@googlemail.com> | 2009-02-23 01:21:55 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-02-23 01:21:55 +0000 |
commit | b0c718454081b884b0c6987757f1fa3c2320b2bc (patch) | |
tree | 9dffbbea79c8cd3a8c461a1ad21506183631f2cb /arch | |
parent | 7c9df2ef815eaa70df86e0300f99c8b692627abd (diff) |
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 <odinshorse@googlemail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2442/mach-gta02.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } } |