diff --git a/common/charge_manager.c b/common/charge_manager.c index 4b400f137c..1622997f02 100644 --- a/common/charge_manager.c +++ b/common/charge_manager.c @@ -441,10 +441,10 @@ static int hc_pd_power_info(struct host_cmd_handler_args *args) /* Fill in power role */ if (charge_port == port) r->role = USB_PD_PORT_POWER_SINK; - else if (sup != CHARGE_SUPPLIER_NONE) - r->role = USB_PD_PORT_POWER_SINK_NOT_CHARGING; else if (pd_is_connected(port) && pd_get_role(port) == PD_ROLE_SOURCE) r->role = USB_PD_PORT_POWER_SOURCE; + else if (sup != CHARGE_SUPPLIER_NONE) + r->role = USB_PD_PORT_POWER_SINK_NOT_CHARGING; else r->role = USB_PD_PORT_POWER_DISCONNECTED; diff --git a/util/ectool.c b/util/ectool.c index 7486580c0c..4e03a90f62 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -2999,7 +2999,7 @@ int cmd_usb_pd_power(int argc, char *argv[]) printf(" Max input current: %dmA\n", r->current_max); printf(" Max input power: %dmW\n", - r->max_power); + r->max_power / 1000); printf("\n"); }