From e6b280e24b02552dc43510ed7fadce4a7105e4a2 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 10 Feb 2014 16:21:05 -0800 Subject: chrome ec: Add support for limiting charger current Update the ec_commands header (direct from EC source) and add support for the new charger current limit interface which will be used by DPTF. Change-Id: Ia9a2a84b612a2982dbe996f07a856be6cd53ebdb Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/185758 Reviewed-by: Aaron Durbin (cherry picked from commit 1fcca2d75856ecefd3aeb1c551182aa76d649466) Signed-off-by: Isaac Christensen Reviewed-on: http://review.coreboot.org/6925 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/ec/google/chromeec/acpi/ec.asl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/ec/google/chromeec/acpi') diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index 1d698a1f1e..5218c88c40 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -52,6 +52,7 @@ Device (EC0) PATI, 8, // Programmable Auxiliary Trip Sensor ID PATT, 8, // Programmable Auxiliary Trip Threshold PATC, 8, // Programmable Auxiliary Trip Commit + CHGL, 8, // Charger Current Limit } OperationRegion (EMEM, SystemIO, EC_LPC_ADDR_MEMMAP, EC_MEMMAP_SIZE) @@ -380,7 +381,7 @@ Device (EC0) /* * Thermal Threshold Event - */ + */ Method (_Q09, 0, NotSerialized) { If (Acquire (^PATM, 1000)) { @@ -404,6 +405,23 @@ Device (EC0) Release (^PATM) } + /* + * Set Charger Current Limit + * Arg0 = Current Limit in 64mA steps + */ + Method (CHGS, 1, Serialized) + { + Store (ToInteger (Arg0), ^CHGL) + } + + /* + * Disable Charger Current Limit + */ + Method (CHGD, 0, Serialized) + { + Store (0xFF, ^CHGL) + } + #include "ac.asl" #include "battery.asl" } -- cgit v1.2.3