diff options
-rw-r--r-- | board/amenia/usb_pd_policy.c | 5 | ||||
-rw-r--r-- | board/chell/usb_pd_policy.c | 5 | ||||
-rw-r--r-- | board/glados/usb_pd_policy.c | 5 | ||||
-rw-r--r-- | board/kevin/usb_pd_policy.c | 5 | ||||
-rw-r--r-- | board/reef/usb_pd_policy.c | 5 | ||||
-rw-r--r-- | board/ryu/usb_pd_policy.c | 6 | ||||
-rw-r--r-- | board/samus_pd/usb_pd_policy.c | 6 | ||||
-rw-r--r-- | board/strago/usb_pd_policy.c | 3 | ||||
-rw-r--r-- | board/wheatley/usb_pd_policy.c | 3 | ||||
-rw-r--r-- | common/charge_manager.c | 4 | ||||
-rw-r--r-- | driver/charger/bd99955.c | 6 | ||||
-rw-r--r-- | driver/usb_switch_pi3usb9281.c | 3 |
12 files changed, 4 insertions, 52 deletions
diff --git a/board/amenia/usb_pd_policy.c b/board/amenia/usb_pd_policy.c index df2d69770c..1348099836 100644 --- a/board/amenia/usb_pd_policy.c +++ b/board/amenia/usb_pd_policy.c @@ -87,8 +87,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); #endif - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -101,9 +99,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); #endif - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } int pd_board_checks(void) diff --git a/board/chell/usb_pd_policy.c b/board/chell/usb_pd_policy.c index cf57b09345..efe2b953c5 100644 --- a/board/chell/usb_pd_policy.c +++ b/board/chell/usb_pd_policy.c @@ -82,8 +82,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); #endif - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -96,9 +94,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); #endif - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } int pd_snk_is_vbus_provided(int port) diff --git a/board/glados/usb_pd_policy.c b/board/glados/usb_pd_policy.c index d50450d557..77aa25a8e3 100644 --- a/board/glados/usb_pd_policy.c +++ b/board/glados/usb_pd_policy.c @@ -81,8 +81,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); #endif - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -94,9 +92,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); #endif - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } int pd_snk_is_vbus_provided(int port) diff --git a/board/kevin/usb_pd_policy.c b/board/kevin/usb_pd_policy.c index c5849a8c44..934f0406bc 100644 --- a/board/kevin/usb_pd_policy.c +++ b/board/kevin/usb_pd_policy.c @@ -84,8 +84,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); #endif - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -98,9 +96,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); #endif - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } int pd_board_checks(void) diff --git a/board/reef/usb_pd_policy.c b/board/reef/usb_pd_policy.c index 92a84c9b64..d078a5a2b6 100644 --- a/board/reef/usb_pd_policy.c +++ b/board/reef/usb_pd_policy.c @@ -87,8 +87,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); #endif - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -101,9 +99,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); #endif - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } int pd_board_checks(void) diff --git a/board/ryu/usb_pd_policy.c b/board/ryu/usb_pd_policy.c index e4b45bece0..86e1f96fad 100644 --- a/board/ryu/usb_pd_policy.c +++ b/board/ryu/usb_pd_policy.c @@ -45,9 +45,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.current = max_ma; charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -57,9 +54,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.current = max_ma; charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } int pd_is_valid_input_voltage(int mv) diff --git a/board/samus_pd/usb_pd_policy.c b/board/samus_pd/usb_pd_policy.c index 7b51e3e38e..875234a9fb 100644 --- a/board/samus_pd/usb_pd_policy.c +++ b/board/samus_pd/usb_pd_policy.c @@ -87,9 +87,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.current = max_ma; charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -99,9 +96,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.current = max_ma; charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } int pd_snk_is_vbus_provided(int port) diff --git a/board/strago/usb_pd_policy.c b/board/strago/usb_pd_policy.c index 162c8a0d5e..214d52295e 100644 --- a/board/strago/usb_pd_policy.c +++ b/board/strago/usb_pd_policy.c @@ -73,7 +73,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); #endif - /* notify host of power info change */ } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -85,8 +84,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); #endif - - /* notify host of power info change */ } int pd_snk_is_vbus_provided(int port) diff --git a/board/wheatley/usb_pd_policy.c b/board/wheatley/usb_pd_policy.c index 5f0f8c5761..923cdcbbec 100644 --- a/board/wheatley/usb_pd_policy.c +++ b/board/wheatley/usb_pd_policy.c @@ -78,7 +78,6 @@ void pd_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_PD, port, &charge); #endif - /* notify host of power info change */ } void typec_set_input_current_limit(int port, uint32_t max_ma, @@ -90,8 +89,6 @@ void typec_set_input_current_limit(int port, uint32_t max_ma, charge.voltage = supply_voltage; charge_manager_update_charge(CHARGE_SUPPLIER_TYPEC, port, &charge); #endif - - /* notify host of power info change */ } int pd_snk_is_vbus_provided(int port) diff --git a/common/charge_manager.c b/common/charge_manager.c index a263277db6..13f85e38d0 100644 --- a/common/charge_manager.c +++ b/common/charge_manager.c @@ -546,6 +546,10 @@ static void charge_manager_refresh(void) board_set_charge_limit(new_port, new_supplier, new_charge_current); #endif /* HAS_TASK_CHG_RAMP */ + + /* notify host of power info change */ + pd_send_host_event(PD_EVENT_POWER_CHANGE); + CPRINTS("CL: p%d s%d i%d v%d", new_port, new_supplier, new_charge_current, new_charge_voltage); } diff --git a/driver/charger/bd99955.c b/driver/charger/bd99955.c index c12b7949a5..d73669dbe9 100644 --- a/driver/charger/bd99955.c +++ b/driver/charger/bd99955.c @@ -284,9 +284,6 @@ static int bd99955_bc12_detect(int port) charge.voltage = USB_CHARGER_VOLTAGE_MV; charge.current = bd99955_get_bc12_ilim(bc12_type); charge_manager_update_charge(bc12_type, port, &charge); - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } return bc12_type; @@ -304,9 +301,6 @@ static void bd99955_bc12_detach(int port, int type) /* Disable charging trigger by BC1.2 detection */ bd99955_bc12_enable_charging(port, 0); - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } static int bd99955_enable_vbus_detect_interrupts(int port, int enable) diff --git a/driver/usb_switch_pi3usb9281.c b/driver/usb_switch_pi3usb9281.c index 340df9df11..e97a04f8db 100644 --- a/driver/usb_switch_pi3usb9281.c +++ b/driver/usb_switch_pi3usb9281.c @@ -342,9 +342,6 @@ static void bc12_detect(int port) port, &charge); } - - /* notify host of power info change */ - pd_send_host_event(PD_EVENT_POWER_CHANGE); } void usb_charger_task(void) |