Hi,
2011/2/15 Andreas Westin <andreas.westin(a)stericsson.com>:
+static int u8500_probe(struct ofono_modem *modem)
+{
+ const char *ifname = ofono_modem_get_string(modem, "Interface");
+ unsigned address = ofono_modem_get_integer(modem, "Address");
+ GIsiModem *isimodem;
+ GIsiClient *client = NULL;
+ GIsiPhonetNetlink *link = NULL;
+ struct isi_data *isi = NULL;
+
+ if (ifname == NULL)
+ return -EINVAL;
+
+ DBG("(%p) with %s", modem, ifname);
+
+ isimodem = g_isi_modem_create_by_name(ifname);
+ if (isimodem == NULL) {
+ DBG("Interface=%s: %s", ifname, strerror(errno));
+ return -errno;
+ }
+
+ if (!g_isi_modem_set_version(isimodem, modemversion))
+ return -EINVAL;
I'm not going to add this API in GIsiModem. If we went this route, and
used vendor quirks inside the isimodem driver, then it would make a
whole lot more sense to do it in the driver create(), not here.
But we're not going that route. Each driver detects the version of the
ISI service it is talking to when it is probed.
Cheers,
Aki