This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/19482 )
Change subject: firmware/abb: Wrote twl3025_power_off_now to restart the phone if the power button is pressed
......................................................................
firmware/abb: Wrote twl3025_power_off_now to restart the phone if the power button is pressed
I am not sure how other developers do this. There are probably better ways to
make testing faster but I kind of like it this way.
I just call the twl3025_power_off_now function when the power key is pressed.
Change-Id: I1e55910acd8584c74e5e190b3334a8cf6987f5f3
---
M src/target/firmware/abb/twl3025.c
M src/target/firmware/include/abb/twl3025.h
2 files changed, 10 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/target/firmware/abb/twl3025.c b/src/target/firmware/abb/twl3025.c
index ad2b01f..5b792d6 100644
--- a/src/target/firmware/abb/twl3025.c
+++ b/src/target/firmware/abb/twl3025.c
@@ -229,6 +229,15 @@
twl3025_reg_write(VRPCDEV, 0x01);
}
+void twl3025_power_off_now(void)
+{
+ /* The phone will restart if the power butten has not been released.
+ * This can be useful for development. */
+ unsigned long flags;
+ local_firq_save(flags);
+ twl3025_reg_write(VRPCDEV, 0x01);
+}
+
void twl3025_clk13m(int enable)
{
if (enable) {
diff --git a/src/target/firmware/include/abb/twl3025.h b/src/target/firmware/include/abb/twl3025.h
index 727bde0..8bc2fb9 100755
--- a/src/target/firmware/include/abb/twl3025.h
+++ b/src/target/firmware/include/abb/twl3025.h
@@ -147,6 +147,7 @@
int twl3025_get_pwon(void);
void twl3025_power_off(void);
+void twl3025_power_off_now(void);
void twl3025_clk13m(int enable);
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/19482
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I1e55910acd8584c74e5e190b3334a8cf6987f5f3
Gerrit-Change-Number: 19482
Gerrit-PatchSet: 2
Gerrit-Owner: roox <mardnh at gmx.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200806/a475986b/attachment.htm>