public inbox for ofono@lists.linux.dev
 help / color / mirror / Atom feed
* [0/6] droid: migrate to gobi QMI driver
@ 2025-07-25 12:19 Ivaylo Dimitrov
  2025-07-25 12:19 ` [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem Ivaylo Dimitrov
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:19 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn

[PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when
[PATCH 2/6] gobi: fix start_service_requests() return type
[PATCH 3/6] gobi: request PDS service if supported
[PATCH 4/6] gobi: Do not try to create WDA service if modem does not
[PATCH 5/6] gobi: Introduce "LTE" modem property
[PATCH 6/6] plugins: drop droid and use gobi for droid4 modem instead


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem
  2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
@ 2025-07-25 12:19 ` Ivaylo Dimitrov
  2025-07-25 12:28   ` Ivaylo Dimitrov
  2025-07-28 14:39   ` Denis Kenzior
  2025-07-25 12:19 ` [PATCH 2/6] gobi: fix start_service_requests() return type Ivaylo Dimitrov
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:19 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn, Ivaylo Dimitrov

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);
 		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;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/6] gobi: fix start_service_requests() return type
  2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
  2025-07-25 12:19 ` [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem Ivaylo Dimitrov
@ 2025-07-25 12:19 ` Ivaylo Dimitrov
  2025-07-25 12:19 ` [PATCH 3/6] gobi: request PDS service if supported Ivaylo Dimitrov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:19 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn, Ivaylo Dimitrov

No need to change bool->uint32_t
---
 plugins/gobi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugins/gobi.c b/plugins/gobi.c
index 027c4dba..24c68fde 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -527,7 +527,7 @@ error:
 	shutdown_device(modem);
 }
 
-static uint32_t start_service_requests(struct ofono_modem *modem)
+static bool start_service_requests(struct ofono_modem *modem)
 {
 	struct gobi_data *data = ofono_modem_get_data(modem);
 	unsigned int i;
@@ -570,7 +570,7 @@ static void rmnet_get_interfaces_cb(int error, unsigned int n_interfaces,
 				sizeof(struct rmnet_ifinfo) * n_interfaces);
 	data->n_premux = n_interfaces;
 
-	if (start_service_requests(modem) > 0)
+	if (start_service_requests(modem))
 		return;
 error:
 	shutdown_device(modem);
@@ -618,7 +618,7 @@ static void enable_set_mtu_cb(int error, uint16_t type,
 		goto error;
 	}
 
-	if (start_service_requests(modem) > 0)
+	if (start_service_requests(modem))
 		return;
 error:
 	shutdown_device(modem);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/6] gobi: request PDS service if supported
  2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
  2025-07-25 12:19 ` [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem Ivaylo Dimitrov
  2025-07-25 12:19 ` [PATCH 2/6] gobi: fix start_service_requests() return type Ivaylo Dimitrov
@ 2025-07-25 12:19 ` Ivaylo Dimitrov
  2025-07-25 12:19 ` [PATCH 4/6] gobi: Do not try to create WDA service if modem does not support it Ivaylo Dimitrov
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:19 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn, Ivaylo Dimitrov

---
 plugins/gobi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/gobi.c b/plugins/gobi.c
index 24c68fde..8af449ae 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -792,6 +792,8 @@ static void discover_cb(void *user_data)
 		add_service_request(data, &data->wms, QMI_SERVICE_WMS);
 	if (data->features & GOBI_VOICE)
 		add_service_request(data, &data->voice, QMI_SERVICE_VOICE);
+	if (data->features & GOBI_PDS)
+		add_service_request(data, &data->pds, QMI_SERVICE_PDS);
 	if (data->features & GOBI_UIM)
 		add_service_request(data, &data->uim, QMI_SERVICE_UIM);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/6] gobi: Do not try to create WDA service if modem does not support it
  2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
                   ` (2 preceding siblings ...)
  2025-07-25 12:19 ` [PATCH 3/6] gobi: request PDS service if supported Ivaylo Dimitrov
@ 2025-07-25 12:19 ` Ivaylo Dimitrov
  2025-07-25 12:19 ` [PATCH 5/6] gobi: Introduce "LTE" modem property Ivaylo Dimitrov
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:19 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn, Ivaylo Dimitrov

fix create_wda_cb() qmi_qmux_device_create_client() result check while at
it
---
 plugins/gobi.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/plugins/gobi.c b/plugins/gobi.c
index 8af449ae..f908f935 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -717,7 +717,7 @@ static void create_wda_cb(struct qmi_service *service, void *user_data)
 		DBG("Failed to request WDA service, assume 802.3");
 
 		if (qmi_qmux_device_create_client(data->device, QMI_SERVICE_DMS,
-					request_service_cb, modem, NULL) > 0)
+					request_service_cb, modem, NULL))
 			return;
 
 		goto error;
@@ -797,8 +797,11 @@ static void discover_cb(void *user_data)
 	if (data->features & GOBI_UIM)
 		add_service_request(data, &data->uim, QMI_SERVICE_UIM);
 
-	if (qmi_qmux_device_create_client(data->device, QMI_SERVICE_WDA,
-						create_wda_cb, modem, NULL))
+	if (data->features & GOBI_WDA) {
+		if (qmi_qmux_device_create_client(data->device,
+				QMI_SERVICE_WDA, create_wda_cb, modem, NULL))
+			return;
+	} else if (start_service_requests(modem))
 		return;
 
 error:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/6] gobi: Introduce "LTE" modem property
  2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
                   ` (3 preceding siblings ...)
  2025-07-25 12:19 ` [PATCH 4/6] gobi: Do not try to create WDA service if modem does not support it Ivaylo Dimitrov
@ 2025-07-25 12:19 ` Ivaylo Dimitrov
  2025-07-28 14:46   ` Denis Kenzior
  2025-07-25 12:19 ` [PATCH 6/6] plugins: drop droid and use gobi for droid4 modem instead Ivaylo Dimitrov
  2025-07-28 14:50 ` [0/6] droid: migrate to gobi QMI driver patchwork-bot+ofono
  6 siblings, 1 reply; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:19 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn, Ivaylo Dimitrov

There are modems that are not LTE capable, allow them to announce that
---
 plugins/gobi.c   | 10 ++++++++--
 plugins/udevng.c |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/plugins/gobi.c b/plugins/gobi.c
index f908f935..7864e192 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -57,6 +57,7 @@
 #define GOBI_UIM	(1 << 5)
 #define GOBI_VOICE	(1 << 6)
 #define GOBI_WDA	(1 << 7)
+#define GOBI_LTE	(1 << 8)
 
 #define MAX_CONTEXTS 4
 #define DEFAULT_MTU 1400
@@ -262,8 +263,13 @@ static int gobi_probe(struct ofono_modem *modem)
 	/* See drivers/net/ethernet/qualcomm/rmnet/rmnet_private.h */
 	data->max_aggregation_size = 16384;
 
+	if (ofono_modem_get_boolean(modem, "LTE"))
+		data->features |= GOBI_LTE;
+
 	ofono_modem_set_data(modem, data);
-	ofono_modem_set_capabilities(modem, OFONO_MODEM_CAPABILITY_LTE);
+
+	if (data->features & GOBI_LTE)
+		ofono_modem_set_capabilities(modem, OFONO_MODEM_CAPABILITY_LTE);
 
 	return 0;
 }
@@ -1144,7 +1150,7 @@ static void gobi_post_sim(struct ofono_modem *modem)
 
 	DBG("%p", modem);
 
-	if (data->features & GOBI_WDS)
+	if (data->features & GOBI_WDS && data->features & GOBI_LTE)
 		ofono_lte_create(modem, 0, "qmimodem",
 					qmi_service_clone(data->wds));
 
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 320cd3a6..5627f1ec 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -255,6 +255,7 @@ static int setup_qmi_qmux(struct modem_info *modem,
 	ofono_modem_set_string(modem->modem, "InterfaceNumber", net->number);
 
 	ofono_modem_set_string(modem->modem, "Bus", "usb");
+	ofono_modem_set_boolean(modem->modem, "LTE", true);
 
 	return setup_qmi_netdev(modem, net);
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/6] plugins: drop droid and use gobi for droid4 modem instead
  2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
                   ` (4 preceding siblings ...)
  2025-07-25 12:19 ` [PATCH 5/6] gobi: Introduce "LTE" modem property Ivaylo Dimitrov
@ 2025-07-25 12:19 ` Ivaylo Dimitrov
  2025-07-28 14:50 ` [0/6] droid: migrate to gobi QMI driver patchwork-bot+ofono
  6 siblings, 0 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:19 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn, Ivaylo Dimitrov

---
 Makefile.am      |   1 -
 plugins/droid.c  | 172 -----------------------------------------------
 plugins/udevng.c |  32 ++++++---
 3 files changed, 21 insertions(+), 184 deletions(-)
 delete mode 100644 plugins/droid.c

diff --git a/Makefile.am b/Makefile.am
index c013e77d..cf51cdf1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -578,7 +578,6 @@ builtin_sources += plugins/telit.c
 builtin_sources += plugins/quectel.c
 builtin_sources += plugins/ublox.c
 builtin_sources += plugins/xmm7xxx.c
-builtin_sources += plugins/droid.c
 
 builtin_modules += stemgr
 builtin_sources += plugins/stemgr.c
diff --git a/plugins/droid.c b/plugins/droid.c
deleted file mode 100644
index 1dfae9ee..00000000
--- a/plugins/droid.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * oFono - Open Source Telephony
- * Copyright (C) 2008-2011  Intel Corporation
- * Copyright (C) 2009  Collabora Ltd
- * Copyright (C) 2020  Pavel Machek
- *
- * SPDX-License-Identifier: GPL-2.0-only
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <errno.h>
-
-#include <glib.h>
-#include <gatchat.h>
-#include <gattty.h>
-
-#define OFONO_API_SUBJECT_TO_CHANGE
-#include <ofono/plugin.h>
-#include <ofono/log.h>
-#include <ofono/modem.h>
-#include <ofono/call-barring.h>
-#include <ofono/call-forwarding.h>
-#include <ofono/call-meter.h>
-#include <ofono/call-settings.h>
-#include <ofono/devinfo.h>
-#include <ofono/message-waiting.h>
-#include <ofono/netreg.h>
-#include <ofono/phonebook.h>
-#include <ofono/sim.h>
-#include <ofono/sms.h>
-#include <ofono/ussd.h>
-#include <ofono/voicecall.h>
-
-#include <drivers/atmodem/atutil.h>
-#include <drivers/atmodem/vendor.h>
-
-static void droid_debug(const char *str, void *user_data)
-{
-	const char *prefix = user_data;
-
-	ofono_info("%s%s", prefix, str);
-}
-
-/* Detect hardware, and initialize if found */
-static int droid_probe(struct ofono_modem *modem)
-{
-	DBG("");
-
-	return 0;
-}
-
-static void droid_remove(struct ofono_modem *modem)
-{
-	GAtChat *chat = ofono_modem_get_data(modem);
-
-	DBG("");
-
-	if (chat) {
-		g_at_chat_unref(chat);
-		ofono_modem_set_data(modem, NULL);
-	}
-}
-
-static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data)
-{
-	struct ofono_modem *modem = user_data;
-
-	DBG("");
-
-	if (ok)
-		ofono_modem_set_powered(modem, TRUE);
-}
-
-/* power up hardware */
-static int droid_enable(struct ofono_modem *modem)
-{
-	GAtChat *chat;
-
-	DBG("");
-
-	chat = at_util_open_device(modem, "Device", droid_debug, "", NULL);
-	ofono_modem_set_data(modem, chat);
-
-	/* ensure modem is in a known state; verbose on, echo/quiet off */
-	g_at_chat_send(chat, "ATE0Q0V1", NULL, NULL, NULL, NULL);
-
-	/* power up modem */
-	g_at_chat_send(chat, "AT+CFUN=1", NULL, cfun_set_on_cb, modem, NULL);
-
-	return 0;
-}
-
-static void cfun_set_off_cb(gboolean ok, GAtResult *result, gpointer user_data)
-{
-	struct ofono_modem *modem = user_data;
-	GAtChat *chat = ofono_modem_get_data(modem);
-
-	DBG("");
-
-	g_at_chat_unref(chat);
-	ofono_modem_set_data(modem, NULL);
-
-	if (ok)
-		ofono_modem_set_powered(modem, FALSE);
-}
-
-static int droid_disable(struct ofono_modem *modem)
-{
-	GAtChat *chat = ofono_modem_get_data(modem);
-
-	DBG("");
-
-	/* power down modem */
-	g_at_chat_cancel_all(chat);
-	g_at_chat_unregister_all(chat);
-	g_at_chat_send(chat, "AT+CFUN=0", NULL, cfun_set_off_cb, modem, NULL);
-
-	return -EINPROGRESS;
-}
-
-static void droid_pre_sim(struct ofono_modem *modem)
-{
-	GAtChat *chat = ofono_modem_get_data(modem);
-	struct ofono_sim *sim;
-
-	DBG("");
-
-	ofono_devinfo_create(modem, 0, "atmodem", chat);
-	sim = ofono_sim_create(modem, OFONO_VENDOR_DROID, "atmodem", chat);
-	ofono_voicecall_create(modem, OFONO_VENDOR_DROID, "atmodem", chat);
-
-	if (sim)
-		ofono_sim_inserted_notify(sim, TRUE);
-}
-
-static void droid_post_sim(struct ofono_modem *modem)
-{
-	GAtChat *chat = ofono_modem_get_data(modem);
-	struct ofono_message_waiting *mw;
-
-	DBG("");
-
-	ofono_ussd_create(modem, 0, "atmodem", chat);
-	ofono_call_forwarding_create(modem, 0, "atmodem", chat);
-	ofono_call_settings_create(modem, 0, "atmodem", chat);
-	ofono_netreg_create(modem, 0, "atmodem", chat);
-	/*
-	 * Droid 4 modem has problems with AT+CPUC?, avoid call meter for now.
-	 */
-	ofono_call_barring_create(modem, 0, "atmodem", chat);
-	ofono_sms_create(modem, OFONO_VENDOR_DROID, "atmodem", chat);
-	ofono_phonebook_create(modem, 0, "atmodem", chat);
-
-	mw = ofono_message_waiting_create(modem);
-	if (mw)
-		ofono_message_waiting_register(mw);
-}
-
-static struct ofono_modem_driver droid_driver = {
-	.probe		= droid_probe,
-	.remove		= droid_remove,
-	.enable		= droid_enable,
-	.disable	= droid_disable,
-	.pre_sim	= droid_pre_sim,
-	.post_sim	= droid_post_sim,
-};
-
-OFONO_MODEM_DRIVER_BUILTIN(droid, &droid_driver)
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 5627f1ec..9d405d37 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -871,7 +871,9 @@ static gboolean setup_telitqmi(struct modem_info *modem)
 
 static gboolean setup_droid(struct modem_info *modem)
 {
-	const char *at = NULL;
+	const struct device_info *qmi = NULL;
+	const struct device_info *net = NULL;
+
 	GSList *list;
 
 	DBG("%s", modem->syspath);
@@ -879,22 +881,30 @@ static gboolean setup_droid(struct modem_info *modem)
 	for (list = modem->devices; list; list = list->next) {
 		struct device_info *info = list->data;
 		const char *subsystem =
-			udev_device_get_subsystem(info->udev_device);
-
-		DBG("%s %s %s %s %s", info->devnode, info->interface,
-				info->number, info->label, subsystem);
+				udev_device_get_subsystem(info->udev_device);
+		DBG("%s %s %s %s %s %s", info->devnode, info->interface,
+						info->number, info->label,
+						info->sysattr, subsystem);
 
-		if (g_strcmp0(info->interface, "255/255/255") == 0 &&
-				g_strcmp0(info->number, "04") == 0) {
-			at = info->devnode;
+		if (g_strcmp0(subsystem, "usbmisc") == 0) {
+			if (g_strcmp0(info->number, "05") == 0)
+				qmi = info;
+		} else if (g_strcmp0(subsystem, "net") == 0) {
+			if (g_strcmp0(info->number, "05") == 0)
+				net = info;
 		}
 	}
 
-	if (at == NULL)
+	if (qmi == NULL || net == NULL)
+		return FALSE;
+
+	DBG("qmi=%s net=%s", qmi->devnode, get_ifname(net));
+
+
+	if (setup_qmi_qmux(modem, qmi, net) < 0)
 		return FALSE;
 
-	ofono_modem_set_string(modem->modem, "Device", at);
-	ofono_modem_set_driver(modem->modem, "droid");
+	ofono_modem_set_boolean(modem->modem, "LTE", false);
 
 	return TRUE;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem
  2025-07-25 12:19 ` [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem Ivaylo Dimitrov
@ 2025-07-25 12:28   ` Ivaylo Dimitrov
  2025-07-28 14:39   ` Denis Kenzior
  1 sibling, 0 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-25 12:28 UTC (permalink / raw)
  To: ofono; +Cc: denkenz, absicsz, merlijn



On 25.07.25 г. 15:19 ч., Ivaylo Dimitrov wrote:
> We don't want modem to auto wake-up when

No idea when the other part of commit description dis-appeared, anyway, 
I can send v2 or just use:

"We don't want modem to auto wake-up when disabled"

Regards,
Ivo

> ---
>   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);
>   		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;
>   

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem
  2025-07-25 12:19 ` [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem Ivaylo Dimitrov
  2025-07-25 12:28   ` Ivaylo Dimitrov
@ 2025-07-28 14:39   ` Denis Kenzior
  2025-07-28 16:48     ` Ivaylo Dimitrov
  1 sibling, 1 reply; 14+ messages in thread
From: Denis Kenzior @ 2025-07-28 14:39 UTC (permalink / raw)
  To: Ivaylo Dimitrov, ofono; +Cc: absicsz, merlijn

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/6] gobi: Introduce "LTE" modem property
  2025-07-25 12:19 ` [PATCH 5/6] gobi: Introduce "LTE" modem property Ivaylo Dimitrov
@ 2025-07-28 14:46   ` Denis Kenzior
  2025-07-28 16:44     ` Ivaylo Dimitrov
  0 siblings, 1 reply; 14+ messages in thread
From: Denis Kenzior @ 2025-07-28 14:46 UTC (permalink / raw)
  To: Ivaylo Dimitrov, ofono; +Cc: absicsz, merlijn

Hi Ivo,

On 7/25/25 7:19 AM, Ivaylo Dimitrov wrote:
> There are modems that are not LTE capable, allow them to announce that
> ---
>   plugins/gobi.c   | 10 ++++++++--
>   plugins/udevng.c |  1 +
>   2 files changed, 9 insertions(+), 2 deletions(-)
> 

<snip>

Can't we use QMI_DMS_GET_OPER_MODE to find the modem radio interfaces supported?

Regards,
-Denis

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [0/6] droid: migrate to gobi QMI driver
  2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
                   ` (5 preceding siblings ...)
  2025-07-25 12:19 ` [PATCH 6/6] plugins: drop droid and use gobi for droid4 modem instead Ivaylo Dimitrov
@ 2025-07-28 14:50 ` patchwork-bot+ofono
  6 siblings, 0 replies; 14+ messages in thread
From: patchwork-bot+ofono @ 2025-07-28 14:50 UTC (permalink / raw)
  To: Ivaylo Dimitrov; +Cc: ofono, denkenz, absicsz, merlijn

Hello:

This series was applied to ofono.git (master)
by Denis Kenzior <denkenz@gmail.com>:

On Fri, 25 Jul 2025 15:19:48 +0300 you wrote:
> [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when
> [PATCH 2/6] gobi: fix start_service_requests() return type
> [PATCH 3/6] gobi: request PDS service if supported
> [PATCH 4/6] gobi: Do not try to create WDA service if modem does not
> [PATCH 5/6] gobi: Introduce "LTE" modem property
> [PATCH 6/6] plugins: drop droid and use gobi for droid4 modem instead

Here is the summary with links:
  - [1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem
    (no matching commit)
  - [2/6] gobi: fix start_service_requests() return type
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=9e82a797ac93
  - [3/6] gobi: request PDS service if supported
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=4eeededadedb
  - [4/6] gobi: Do not try to create WDA service if modem does not support it
    https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=cd28a73c6373
  - [5/6] gobi: Introduce "LTE" modem property
    (no matching commit)
  - [6/6] plugins: drop droid and use gobi for droid4 modem instead
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/6] gobi: Introduce "LTE" modem property
  2025-07-28 14:46   ` Denis Kenzior
@ 2025-07-28 16:44     ` Ivaylo Dimitrov
  2025-07-28 17:13       ` Denis Kenzior
  0 siblings, 1 reply; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-28 16:44 UTC (permalink / raw)
  To: Denis Kenzior, ofono; +Cc: absicsz, merlijn

Hi Denis,


On 28.07.25 г. 17:46 ч., Denis Kenzior wrote:
> Hi Ivo,
> 
> On 7/25/25 7:19 AM, Ivaylo Dimitrov wrote:
>> There are modems that are not LTE capable, allow them to announce that
>> ---
>>   plugins/gobi.c   | 10 ++++++++--
>>   plugins/udevng.c |  1 +
>>   2 files changed, 9 insertions(+), 2 deletions(-)
>>
> 
> <snip>
> 
> Can't we use QMI_DMS_GET_OPER_MODE to find the modem radio interfaces 
> supported?
> 

Perhaps you meant QMI_DMS_GET_CAPS? That could work, will try and 
(hopefully) send a patch

Regards,
Ivo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem
  2025-07-28 14:39   ` Denis Kenzior
@ 2025-07-28 16:48     ` Ivaylo Dimitrov
  0 siblings, 0 replies; 14+ messages in thread
From: Ivaylo Dimitrov @ 2025-07-28 16:48 UTC (permalink / raw)
  To: Denis Kenzior, ofono; +Cc: absicsz, merlijn

Hi Denis,


On 28.07.25 г. 17:39 ч., Denis Kenzior wrote:
> 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?

I see. Ok, will send a new series without already merged patches and 
with this (and the other change requested) implemented.

> 
>>           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

Thanks and regards,
Ivo

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/6] gobi: Introduce "LTE" modem property
  2025-07-28 16:44     ` Ivaylo Dimitrov
@ 2025-07-28 17:13       ` Denis Kenzior
  0 siblings, 0 replies; 14+ messages in thread
From: Denis Kenzior @ 2025-07-28 17:13 UTC (permalink / raw)
  To: Ivaylo Dimitrov, ofono; +Cc: absicsz, merlijn

Hi Ivo,

 >>
>> Can't we use QMI_DMS_GET_OPER_MODE to find the modem radio interfaces supported?
>>
> 
> Perhaps you meant QMI_DMS_GET_CAPS? That could work, will try and (hopefully) 
> send a patch

Whoops.  Indeed that is what I meant.  Was looking at get_caps_cb() and got my 
wires crossed :)

Regards,
-Denis

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-07-28 17:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-25 12:19 [0/6] droid: migrate to gobi QMI driver Ivaylo Dimitrov
2025-07-25 12:19 ` [PATCH 1/6] gobi: PERSIST_LOW_POWER instead of LOW_POWER when disabling modem Ivaylo Dimitrov
2025-07-25 12:28   ` Ivaylo Dimitrov
2025-07-28 14:39   ` Denis Kenzior
2025-07-28 16:48     ` Ivaylo Dimitrov
2025-07-25 12:19 ` [PATCH 2/6] gobi: fix start_service_requests() return type Ivaylo Dimitrov
2025-07-25 12:19 ` [PATCH 3/6] gobi: request PDS service if supported Ivaylo Dimitrov
2025-07-25 12:19 ` [PATCH 4/6] gobi: Do not try to create WDA service if modem does not support it Ivaylo Dimitrov
2025-07-25 12:19 ` [PATCH 5/6] gobi: Introduce "LTE" modem property Ivaylo Dimitrov
2025-07-28 14:46   ` Denis Kenzior
2025-07-28 16:44     ` Ivaylo Dimitrov
2025-07-28 17:13       ` Denis Kenzior
2025-07-25 12:19 ` [PATCH 6/6] plugins: drop droid and use gobi for droid4 modem instead Ivaylo Dimitrov
2025-07-28 14:50 ` [0/6] droid: migrate to gobi QMI driver patchwork-bot+ofono

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox