dont-smoke.patch (draw only 100mA in u-boot)

Werner Almesberger werner at openmoko.org
Sun Mar 9 18:12:08 CET 2008


This patch makes u-boot only draw up to 100mA from a USB port, unless
there's an indication that it can get more. I've also simplified the
code a bit.

Note that I don't change the PMU configuration if we have plain USB,
since the USB stack will take care of switching to 500mA, and we don't
want to race with that.

- Werner

----------------------------------- Changes -----------------------------------

This patch prevents us from drawing more than 100mA from USB, unless we're
sure we're allowed to. Thus, we don't make the upstream port produce smoke.

series: added dont-smoke.patch (for later merging into uboot-gta02.patch)

dont-smoke.patch:
- drivers/misc/pcf50633.c (pcf50633_read_charger_type, pcf50633_init): return 
  100 (mA) for USB, not 500
- drivers/misc/pcf50633.c (pcf50633_init): use pcf50633_usb_maxcurrent instead
  of open-coding current setting again
- drivers/misc/pcf50633.c (pcf50633_usb_maxcurrent): use symbolic names for
  current limits instead of numbers
- board/neo1973/gta02/pcf50633.c (pcf50633_initial_regs): set initial USB
  current to 100mA, not 500mA




More information about the openmoko-kernel mailing list