All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 8/9] udev: Add cdmagen
@ 2010-12-17 23:11 Dara Spieker-Doyle
  2010-12-18 18:29 ` Marcel Holtmann
  0 siblings, 1 reply; 3+ messages in thread
From: Dara Spieker-Doyle @ 2010-12-17 23:11 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

---
 plugins/udev.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/plugins/udev.c b/plugins/udev.c
index 255755e..e9541ac 100644
--- a/plugins/udev.c
+++ b/plugins/udev.c
@@ -449,6 +449,25 @@ static void add_isi(struct ofono_modem *modem,
 	ofono_modem_register(modem);
 }
 
+static void add_cdmagen(struct ofono_modem *modem,
+					struct udev_device *udev_device)
+{
+	const char *devnode;
+	int registered;
+
+	DBG("modem %p", modem);
+
+	devnode = udev_device_get_devnode(udev_device);
+
+	registered = ofono_modem_get_integer(modem, "Registered");
+	if (registered != 0)
+		return;
+
+	ofono_modem_set_string(modem, "Device", devnode);
+	ofono_modem_set_integer(modem, "Registered", 1);
+	ofono_modem_register(modem);
+}
+
 static void add_modem(struct udev_device *udev_device)
 {
 	struct ofono_modem *modem;
@@ -533,6 +552,8 @@ done:
 		add_isi(modem, udev_device);
 	else if (g_strcmp0(driver, "n900") == 0)
 		add_isi(modem, udev_device);
+	else if (g_strcmp0(driver, "cdmagen") == 0)
+		add_cdmagen(modem, udev_device);
 }
 
 static gboolean devpath_remove(gpointer key, gpointer value, gpointer user_data)
-- 
1.7.0.4


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

* Re: [PATCH v2 8/9] udev: Add cdmagen
  2010-12-17 23:11 [PATCH v2 8/9] udev: Add cdmagen Dara Spieker-Doyle
@ 2010-12-18 18:29 ` Marcel Holtmann
  2010-12-20 18:31   ` Dara Spieker-Doyle
  0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2010-12-18 18:29 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

Hi Dara,

>  	struct ofono_modem *modem;
> @@ -533,6 +552,8 @@ done:
>  		add_isi(modem, udev_device);
>  	else if (g_strcmp0(driver, "n900") == 0)
>  		add_isi(modem, udev_device);
> +	else if (g_strcmp0(driver, "cdmagen") == 0)
> +		add_cdmagen(modem, udev_device);
>  }

this is actually wrong. The generic drivers running against phonesim
should not be done via udev. We did remove atgen for a reason actually
since it was not really useful.

Even the isigen driver needs to be renamed into isiusb or usbpn in the
long term.

Regards

Marcel



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

* Re: [PATCH v2 8/9] udev: Add cdmagen
  2010-12-18 18:29 ` Marcel Holtmann
@ 2010-12-20 18:31   ` Dara Spieker-Doyle
  0 siblings, 0 replies; 3+ messages in thread
From: Dara Spieker-Doyle @ 2010-12-20 18:31 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 928 bytes --]

Hi Marcel

Thank you for reviewing these patches

On 12/18/2010 10:29 AM, ext Marcel Holtmann wrote:
> Hi Dara,
>
>>   	struct ofono_modem *modem;
>> @@ -533,6 +552,8 @@ done:
>>   		add_isi(modem, udev_device);
>>   	else if (g_strcmp0(driver, "n900") == 0)
>>   		add_isi(modem, udev_device);
>> +	else if (g_strcmp0(driver, "cdmagen") == 0)
>> +		add_cdmagen(modem, udev_device);
>>   }
>
> this is actually wrong. The generic drivers running against phonesim
> should not be done via udev. We did remove atgen for a reason actually
> since it was not really useful.

Actually, this driver is not for running against phonesim at all. This 
plugin is intended for use against the majority of CDMA AT Modem devices 
(phones and usb sticks) connected in a tethered mode.
Please see the other email thread in this series ([Patch v2 7/9]) for 
alternative name suggestion to clarify this.

Thanks
Dara

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

end of thread, other threads:[~2010-12-20 18:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-17 23:11 [PATCH v2 8/9] udev: Add cdmagen Dara Spieker-Doyle
2010-12-18 18:29 ` Marcel Holtmann
2010-12-20 18:31   ` Dara Spieker-Doyle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.