suspend: add boot timer

The EG25 modem needs at least 2 minutes after indicating 'RDY'
to be fully operational. If the modem is suspended before that,
calls or texts may not be seen by the userspace.
This mostly occurs when a full reboot or poweroff/poweron
sequence of the phone is performed.

:
This commit is contained in:
Dylan Van Assche
2021-02-06 07:52:32 +01:00
parent 3bb6e15de0
commit b8d269cf2f
5 changed files with 108 additions and 33 deletions

View File

@@ -178,7 +178,7 @@ void modem_suspend_post(struct EG25Manager *manager)
{
gpio_sequence_suspend(manager);
g_message("suspend sequence is over, drop inhibitor");
suspend_inhibit(manager, FALSE);
suspend_inhibit(manager, FALSE, FALSE);
}
void modem_resume_pre(struct EG25Manager *manager)
@@ -205,7 +205,8 @@ int main(int argc, char *argv[])
memset(&manager, 0, sizeof(manager));
manager.at_fd = -1;
manager.suspend_inhibit_fd = -1;
manager.delay_inhibit_fd = -1;
manager.block_inhibit_fd = -1;
opt_context = g_option_context_new ("- Power management for the Quectel EG25 modem");
g_option_context_add_main_entries (opt_context, options, NULL);