Re: [PATCH v9 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

From: Peter Chen
Date: Tue Apr 05 2016 - 21:22:16 EST


On Tue, Apr 05, 2016 at 09:53:05AM -0700, Mark Brown wrote:
>
> > > The framework does not want to focus on charger detection too much,
> > > and just supplies one callback '->charger_detect()' for user to be
> > > implemented if they ensure they need to do the SW charger detection
> > > manually (Note: must at the right time to do the SW detection.). So
> > > the usb charger just focus on dealing with the usb gadget power
> > > negotiation, and it does not need to care much how to do charger
> > > detection on your platform.
>
> > No, this comment is common one, but only for SW detection. Eg, when
> > the PMIC tells you it is a SDP, you can't notify to charger IC about
> > 500mA at once, you need to do it after host allows you to do it.
>
> Note that this isn't just the charger device that needs to constrain
> current consumption - it's the entire system. You can't charge to the
> limit for system power draw if the USB controller is supplying the main
> system rail.

Sorry, I can't catch up you. USB Host (SDP or CDP) supplies power for
USB device (not only USB controller, it is the whole system), it can
supply more power after set configuration. See 1.4.13 from BC 1.2.

An SDP expects a downstream device with a good battery to draw less than
2.5mA average when unconnected or suspended, up to 100mA maximum when
connected and not configured and not suspended, and up to 500mA maximum
if so configured and not suspended.

--

Best Regards,
Peter Chen