<p>Patrick Georgi has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21099">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/google: Detect keyboard backlight at runtime<br><br>This enables adding the backlight driver to boards that may or may not<br>come with a keyboard backlight function.<br>It's the responsibility of the EC to report if that feature exists, but<br>that's not a big extra burden given that it already keeps track of<br>everything else related to the backlight.<br><br>BUG=b:64705535<br>BRANCH=none<br>CQ-DEPEND=CL:620595<br>TEST=configured the value manually and noticed the presence/absence of<br>/sys/firmware/platform/GOOG0002:00 on a Chrome OS Linux kernel.<br><br>Change-Id: Idc36bfaa6e69581ba19b52d37af6956f63cfdb8f<br>Signed-off-by: Patrick Georgi <pgeorgi@google.com><br>---<br>M src/ec/google/chromeec/acpi/ec.asl<br>M src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>2 files changed, 11 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/21099/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl<br>index a532492..422abe1 100644<br>--- a/src/ec/google/chromeec/acpi/ec.asl<br>+++ b/src/ec/google/chromeec/acpi/ec.asl<br>@@ -54,6 +54,8 @@<br>                PATC, 8,        // Programmable Auxiliary Trip Commit<br>                 CHGL, 8,        // Charger Current Limit<br>              TBMD, 1,        // Tablet mode<br>+               Offset (0x0a),<br>+               KBLE, 1,        // Keyboard Backlight exists<br>  }<br> <br> #if IS_ENABLED(CONFIG_EC_GOOGLE_CHROMEEC_ACPI_MEMMAP)<br>diff --git a/src/ec/google/chromeec/acpi/keyboard_backlight.asl b/src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>index 75a8df3..197536a 100644<br>--- a/src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>+++ b/src/ec/google/chromeec/acpi/keyboard_backlight.asl<br>@@ -23,6 +23,15 @@<br>             Name (_HID, "GOOG0002")<br>             Name (_UID, 1)<br> <br>+            /* Ask EC if we even have a backlight<br>+                 * Return 0xf (present, enabled, show in UI, functioning) or 0<br>+                */<br>+          Method (_STA, 0, NotSerialized)<br>+              {<br>+                    Multiply (0xf, \_SB.PCI0.LPCB.EC0.KBLE, Local0)<br>+                      Return (Local0)<br>+              }<br>+<br>          /* Read current backlight value */<br>            Method (KBQC, 0, NotSerialized)<br>               {<br></pre><p>To view, visit <a href="https://review.coreboot.org/21099">change 21099</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21099"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Idc36bfaa6e69581ba19b52d37af6956f63cfdb8f </div>
<div style="display:none"> Gerrit-Change-Number: 21099 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Georgi <pgeorgi@google.com> </div>