summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorTim Van Patten <timvp@google.com>2022-08-22 14:06:11 -0600
committerFelix Held <felix-coreboot@felixheld.de>2022-08-26 17:32:43 +0000
commit14fa11f9b9d2f3aa0c5d2ca5839ff6b3073cb2e9 (patch)
tree85dec1da513969e644d1746f70fa3f0616ced484 /src/ec
parent5684941f8bac16917df06d4dbe7816369319a685 (diff)
ec/google/chromeec: Call PNOT() when Battery Status Changes
PNOT() should be called when the battery status changes, to give the SOC an opportunity to handle it. This is in preparation for the low/no battery boot changes. This CL also updates the PNOT() comments to better match the name of the function and why it's called. BRANCH=none BUG=b:217911928 TEST=Boot skyrim Change-Id: I8b74313d242fd4959315a67579eb6c5f49a31a76 Signed-off-by: Tim Van Patten <timvp@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66993 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/google/chromeec/acpi/ec.asl26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 99f9344b77..b85e1861a0 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -166,8 +166,10 @@ Device (EC0)
// Initialize AC power state
Store (ACEX, \PWRS)
/*
- * Inform platform code about the current AC power state.
- * This allows the platform to take any action based on the initialized state.
+ * Call PNOT (Platform Notify) to inform platform code
+ * about the current AC/battery state. This handles all cases,
+ * the battery transitioning into and out of having critically
+ * low charge.
* PWRS isn't valid before this point.
*/
\PNOT ()
@@ -258,6 +260,12 @@ Device (EC0)
Notify (\_SB.DPTF.TCHG, 0x80)
}
#endif
+ /*
+ * Call PNOT (Platform Notify) to inform platform code
+ * about the current battery state. This handles all cases,
+ * the battery transitioning into and out of having critically
+ * low charge.
+ */
\PNOT ()
}
@@ -272,6 +280,12 @@ Device (EC0)
Notify (\_SB.DPTF.TCHG, 0x80)
}
#endif
+ /*
+ * Call PNOT (Platform Notify) to inform platform code
+ * about the current battery state. This handles all cases,
+ * the battery transitioning into and out of having critically
+ * low charge.
+ */
\PNOT ()
}
@@ -384,6 +398,14 @@ Device (EC0)
Notify (BAT1, 0x80)
}
#endif
+
+ /*
+ * Call PNOT (Platform Notify) to inform platform code
+ * about the current battery state. This handles all cases,
+ * the battery transitioning into and out of having critically
+ * low charge.
+ */
+ \PNOT ()
}
// MKBP interrupt.