<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/19482">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">firmware/abb: Wrote twl3025_power_off_now to restart the phone if the power button is pressed<br><br>I am not sure how other developers do this. There are probably better ways to<br>make testing faster but I kind of like it this way.<br><br>I just call the twl3025_power_off_now function when the power key is pressed.<br><br>Change-Id: I1e55910acd8584c74e5e190b3334a8cf6987f5f3<br>---<br>M src/target/firmware/abb/twl3025.c<br>M src/target/firmware/include/abb/twl3025.h<br>2 files changed, 10 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/target/firmware/abb/twl3025.c b/src/target/firmware/abb/twl3025.c</span><br><span>index ad2b01f..5b792d6 100644</span><br><span>--- a/src/target/firmware/abb/twl3025.c</span><br><span>+++ b/src/target/firmware/abb/twl3025.c</span><br><span>@@ -229,6 +229,15 @@</span><br><span>      twl3025_reg_write(VRPCDEV, 0x01);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+void twl3025_power_off_now(void)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       /* The phone will restart if the power butten has not been released.</span><br><span style="color: hsl(120, 100%, 40%);">+   * This can be useful for development. */</span><br><span style="color: hsl(120, 100%, 40%);">+     unsigned long flags;</span><br><span style="color: hsl(120, 100%, 40%);">+  local_firq_save(flags);</span><br><span style="color: hsl(120, 100%, 40%);">+       twl3025_reg_write(VRPCDEV, 0x01);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> void twl3025_clk13m(int enable)</span><br><span> {</span><br><span>       if (enable) {</span><br><span>diff --git a/src/target/firmware/include/abb/twl3025.h b/src/target/firmware/include/abb/twl3025.h</span><br><span>index 727bde0..8bc2fb9 100755</span><br><span>--- a/src/target/firmware/include/abb/twl3025.h</span><br><span>+++ b/src/target/firmware/include/abb/twl3025.h</span><br><span>@@ -147,6 +147,7 @@</span><br><span> int twl3025_get_pwon(void);</span><br><span> </span><br><span> void twl3025_power_off(void);</span><br><span style="color: hsl(120, 100%, 40%);">+void twl3025_power_off_now(void);</span><br><span> </span><br><span> void twl3025_clk13m(int enable);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/19482">change 19482</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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://gerrit.osmocom.org/c/osmocom-bb/+/19482"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1e55910acd8584c74e5e190b3334a8cf6987f5f3 </div>
<div style="display:none"> Gerrit-Change-Number: 19482 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: roox <mardnh@gmx.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>