base-manager: new '--test-low-power-suspend-resume' option

Will request to put the modems in low power mode upon system suspend.

Based on an earlier approach from Jack Song and Nero Zhang, see
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1050
This commit is contained in:
Aleksander Morgado
2023-12-12 11:22:30 +00:00
committed by Aleksander Morgado
parent 63dd4ad263
commit bbd11cda4b
5 changed files with 104 additions and 26 deletions
+13
View File
@@ -238,6 +238,7 @@ static gboolean test_no_udev;
#if defined WITH_SUSPEND_RESUME
static gboolean test_no_suspend_resume;
static gboolean test_quick_suspend_resume;
static gboolean test_low_power_suspend_resume;
#endif
#if defined WITH_QRTR
static gboolean test_no_qrtr;
@@ -285,6 +286,11 @@ static const GOptionEntry test_entries[] = {
"Enable quick suspend/resume support for modems which stay on during host suspension",
NULL
},
{
"test-low-power-suspend-resume", 0, 0, G_OPTION_ARG_NONE, &test_low_power_suspend_resume,
"Enable support to put the modem in low power mode during suspend/resume",
NULL
},
#endif
#if defined WITH_QRTR
{
@@ -358,11 +364,18 @@ mm_context_get_test_no_suspend_resume (void)
{
return test_no_suspend_resume;
}
gboolean
mm_context_get_test_quick_suspend_resume (void)
{
return test_quick_suspend_resume;
}
gboolean
mm_context_get_test_low_power_suspend_resume (void)
{
return test_low_power_suspend_resume;
}
#endif
#if defined WITH_QRTR