<p>Duncan Laurie has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/c/coreboot/+/30132">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vendorcode/google/chromeos: Get ACPI pin from GPIO library<br><br>If the generic GPIO library is enabled the code that generates the<br>GPIO table in ACPI should attempt to get the GPIO pin value from<br>the gpio_acpi_pin() function.<br><br>BUG=b:120686247<br>TEST=Tested on Sarien board to ensure that GPIO pin exported by<br>Chrome OS for the Write Protect signal is correct.<br><br>Change-Id: I267694b576009f79bacac6eda5f32bbf51742d78<br>Signed-off-by: Duncan Laurie <dlaurie@google.com><br>---<br>M src/vendorcode/google/chromeos/acpi.c<br>1 file changed, 6 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/30132/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/vendorcode/google/chromeos/acpi.c b/src/vendorcode/google/chromeos/acpi.c</span><br><span>index 6605809..a1e0b6e 100644</span><br><span>--- a/src/vendorcode/google/chromeos/acpi.c</span><br><span>+++ b/src/vendorcode/google/chromeos/acpi.c</span><br><span>@@ -14,6 +14,7 @@</span><br><span>  */</span><br><span> </span><br><span> #include <arch/acpigen.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <gpio.h></span><br><span> #include "chromeos.h"</span><br><span> </span><br><span> void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num)</span><br><span>@@ -28,7 +29,11 @@</span><br><span>           acpigen_write_package(4);</span><br><span>            acpigen_write_integer(gpios[i].type);</span><br><span>                acpigen_write_integer(gpios[i].polarity);</span><br><span style="color: hsl(0, 100%, 40%);">-               acpigen_write_integer(gpios[i].gpio_num);</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Get ACPI pin from GPIO library if available */</span><br><span style="color: hsl(120, 100%, 40%);">+             if (IS_ENABLED(CONFIG_GENERIC_GPIO_LIB))</span><br><span style="color: hsl(120, 100%, 40%);">+                      acpigen_write_integer(gpio_acpi_pin(gpios[i].gpio_num));</span><br><span style="color: hsl(120, 100%, 40%);">+              else</span><br><span style="color: hsl(120, 100%, 40%);">+                  acpigen_write_integer(gpios[i].gpio_num);</span><br><span>            acpigen_write_string(gpios[i].device);</span><br><span>               acpigen_pop_len();</span><br><span>   }</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/c/coreboot/+/30132">change 30132</a>. To unsubscribe, or for help writing mail filters, 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/c/coreboot/+/30132"/><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-Change-Id: I267694b576009f79bacac6eda5f32bbf51742d78 </div>
<div style="display:none"> Gerrit-Change-Number: 30132 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Duncan Laurie <dlaurie@chromium.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>