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/.
roox gerrit-no-reply at lists.osmocom.orgroox has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/19482 )
Change subject: Wrote twl3025_power_off_now to restart the phone if the power button is pressed.
......................................................................
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, 9 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/82/19482/1
diff --git a/src/target/firmware/abb/twl3025.c b/src/target/firmware/abb/twl3025.c
index ad2b01f..55ff2ad 100644
--- a/src/target/firmware/abb/twl3025.c
+++ b/src/target/firmware/abb/twl3025.c
@@ -229,6 +229,14 @@
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: 1
Gerrit-Owner: roox <mardnh at gmx.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200801/015b5206/attachment.htm>