Re: [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem

Denis Kenzior <[email protected]> Mon, 28 Jul 2025 09:39:41 -0500
Newsgroups dev.linux.lists.ofono
Message-ID <[email protected]>
Hi Ivo,

On 7/25/25 7:19 AM, Ivaylo Dimitrov wrote:
> We don't want modem to auto wake-up when
> ---
>   plugins/gobi.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/plugins/gobi.c b/plugins/gobi.c
> index 52ead377..027c4dba 100644
> --- a/plugins/gobi.c
> +++ b/plugins/gobi.c
> @@ -442,7 +442,7 @@ static void get_oper_mode_cb(struct qmi_result *result, void *user_data)
>   	switch (data->oper_mode) {
>   	case QMI_DMS_OPER_MODE_ONLINE:
>   		param = qmi_param_new_uint8(QMI_DMS_PARAM_OPER_MODE,
> -					QMI_DMS_OPER_MODE_LOW_POWER);
> +					QMI_DMS_OPER_MODE_PERSIST_LOW_POWER);

Not so sure about this.  In the past we've had problems with some QMI modems 
either not honoring this mode, or turning off entirely (my memory is fuzzy 
here).   Perhaps we can make this an attribute as well and let hardware 
detection logic set the low power mode to use?  Similar to how you handle LTE 
capability in patch 5?

>   		if (!param) {
>   			shutdown_device(modem);
>   			return;
> @@ -922,7 +922,7 @@ static int gobi_disable(struct ofono_modem *modem)
>   		goto out;
>   
>   	param = qmi_param_new_uint8(QMI_DMS_PARAM_OPER_MODE,
> -					QMI_DMS_OPER_MODE_LOW_POWER);
> +					QMI_DMS_OPER_MODE_PERSIST_LOW_POWER);
>   	if (!param)
>   		return -ENOMEM;
>   

Regards,
-Denis