In charge_manager_get_best_charge_port(), there's some logic that appears to reject suppliers of type "other" (i.e. : a proprietary USB charger).
...[snip]...
#ifndef CONFIG_CHARGE_MANAGER_DRP_CHARGING
/*
* Don't charge from a dual-role port unless
* it is our override port.
*/
if (dualrole_capability[j] != CAP_DEDICATED &&
override_port != j)
continue;
#endif
...[snip]...
dualrole_capability can be "unknown", "dualrole", or "dedicated dualrole". But, a non-dual role port partner falls into the "unknown" bucket as well. And if we don't have an override port set (the usual case), we'll reject this charge port.
What if we also check that the override_port *is* set? I feel like that might capture the intent of the comment better.
What do you think?
Comment 1 by sheriffbot@chromium.org
, Sep 21