summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wang <matt_wang@compal.corp-partner.google.com>2022-05-24 14:26:51 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-03 10:06:57 +0000
commit0628e0a16b62079488f13cc7744d9cfcc3d9224d (patch)
treee5bbd2847bc19771e29d112f990114e1b639acde
parent83c5bf9f39cdbc38ac5fa230f4194e935e0869c5 (diff)
downloadchrome-ec-0628e0a16b62079488f13cc7744d9cfcc3d9224d.tar.gz
kinox: update the charge manager info
Modify the charge info for the host command EC_CMD_USB_PD_POWER_INFO can get which one type the adapter plugin then set the corresponding intel power limit parameters. The CHARGE_SUPPLIER_PROPRIETARY for TIO1 and TIO2. The CHARGE_SUPPLIER_DEDICATED for TINY. BUG=b:231911918 BRANCH=none TEST=The host can get the correct adpater type.(b:231911918#comment12) Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: I801fba3a7630c77271abe6b07ebcf53734537d02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3662863 Reviewed-by: Ricky Chang <rickytlchang@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
-rw-r--r--board/kinox/power_detection.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/board/kinox/power_detection.c b/board/kinox/power_detection.c
index 1434c7afeb..54ca591252 100644
--- a/board/kinox/power_detection.c
+++ b/board/kinox/power_detection.c
@@ -291,8 +291,20 @@ void set_the_obp(int power_type_index, int adp_type)
/* Only the TIO and Tiny need to update */
pi.voltage = power_type[power_type_index].charge_voltage;
pi.current = power_type[power_type_index].charge_current;
- charge_manager_update_charge(CHARGE_SUPPLIER_DEDICATED,
- DEDICATED_CHARGE_PORT, &pi);
+
+ switch (adp_type) {
+ case TIO1:
+ case TIO2:
+ charge_manager_update_charge(
+ CHARGE_SUPPLIER_PROPRIETARY,
+ DEDICATED_CHARGE_PORT, &pi);
+ break;
+ case TINY:
+ charge_manager_update_charge(
+ CHARGE_SUPPLIER_DEDICATED,
+ DEDICATED_CHARGE_PORT, &pi);
+ break;
+ }
}
CPRINTS("Power type %s, %dW", adp_id_names[adp_type],