diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-05-11 00:06:00 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-05-11 00:06:00 +0200 |
commit | 0709d2d842861f05ed0e194dfe31b52e2ff80c12 (patch) | |
tree | 1527ac7eccfcdde8e1e0dfb42239bc6145b619a0 | |
parent | 44622dfd8d1d97e21c6f63add241cbe366ab8f39 (diff) |
perst/sim_switch: Log events using TRACE_INFO
-rw-r--r-- | firmware/libboard/common/source/sim_switch.c | 7 | ||||
-rw-r--r-- | firmware/libboard/qmod/source/wwan_perst.c | 10 |
2 files changed, 13 insertions, 4 deletions
diff --git a/firmware/libboard/common/source/sim_switch.c b/firmware/libboard/common/source/sim_switch.c index 598cd4d..8ed16ac 100644 --- a/firmware/libboard/common/source/sim_switch.c +++ b/firmware/libboard/common/source/sim_switch.c @@ -41,10 +41,13 @@ int sim_switch_use_physical(unsigned int nr, int physical) return -1; } - if (physical) + if (physical) { + TRACE_INFO("%u: Use local/physical SIM\r\n", nr); PIO_Clear(pin); - else + } else { + TRACE_INFO("%u: Use remote/emulated SIM\r\n", nr); PIO_Set(pin); + } return 0; } diff --git a/firmware/libboard/qmod/source/wwan_perst.c b/firmware/libboard/qmod/source/wwan_perst.c index b80fd55..d00ce89 100644 --- a/firmware/libboard/qmod/source/wwan_perst.c +++ b/firmware/libboard/qmod/source/wwan_perst.c @@ -7,6 +7,7 @@ */ #include "board.h" +#include "trace.h" #include "wwan_perst.h" #include "osmocom/core/timer.h" @@ -33,6 +34,7 @@ static void perst_tmr_cb(void *data) { struct wwan_perst *perst = data; /* release the (low-active) reset */ + TRACE_INFO("De-asserting modem reset\r\n"); PIO_Clear(&perst->pin); } @@ -63,6 +65,7 @@ int wwan_perst_do_reset_pulse(int modem_nr, unsigned int duration_ms) if (!perst) return -1; + TRACE_INFO("%u: Asserting modem reset\r\n", modem_nr); PIO_Set(&perst->pin); osmo_timer_schedule(&perst->timer, duration_ms/1000, (duration_ms%1000)*1000); @@ -76,10 +79,13 @@ int wwan_perst_set(int modem_nr, int active) return -1; osmo_timer_del(&perst->timer); - if (active) + if (active) { + TRACE_INFO("%u: Asserting modem reset\r\n", modem_nr); PIO_Set(&perst->pin); - else + } else { + TRACE_INFO("%u: De-asserting modem reset\r\n", modem_nr); PIO_Clear(&perst->pin); + } return 0; } |