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

From: NeilBrown
Date: Tue Mar 28 2017 - 19:05:14 EST


On Tue, Mar 07 2017, Baolin Wang wrote:

> On 3 March 2017 at 10:23, NeilBrown <neilb@xxxxxxxx> wrote:
>
>>
>> I understand your reluctance to change drivers that you cannot test.
>> An alternative it do change all the
>> atomic_notifier_call_chain(.*notifier,
>> calls that don't pass a pointer to vbus_draw to pass NULL, and to
>> declare the passing of NULL to be deprecated (so hopefully people won't
>> use it in new code).
>> Then any notification callback that expects a current can just ignore
>> calls where the pointer is NULL.
>
> I am afraid if it is enough to send out vbus draw information from USB
> phy driver, for example you will miss super speed (900mA), which need
> get the speed information from gadget driver.

When the gadget driver determines that 900mA is available, it calls
usb_phy_set_power() which calls the ->set_power() method on the usb_phy.
The usb_phy the uses the notifier to inform all interested parties
that 900mA is available.

NeilBrown

Attachment: signature.asc
Description: PGP signature