mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 15:22:20 +02:00
manager: split modem_suspend() into _pre() and _post() functions
This way we can make sure the AT commands are executed only once ModemManager has released the modem, preventing any race condition.
This commit is contained in:
@@ -135,14 +135,20 @@ error:
|
||||
manager->modem_state = EG25_STATE_RESETTING;
|
||||
}
|
||||
|
||||
void modem_suspend(struct EG25Manager *manager)
|
||||
void modem_suspend_pre(struct EG25Manager *manager)
|
||||
{
|
||||
manager->modem_state = EG25_STATE_SUSPENDING;
|
||||
gpio_sequence_suspend(manager);
|
||||
}
|
||||
|
||||
void modem_suspend_post(struct EG25Manager *manager)
|
||||
{
|
||||
at_sequence_suspend(manager);
|
||||
}
|
||||
|
||||
void modem_resume_pre(struct EG25Manager *manager)
|
||||
{
|
||||
manager->modem_state = EG25_STATE_RESUMING;
|
||||
gpio_sequence_resume(manager);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user