+ devc->optarif = teleinfo_get_optarif(buf);
+
+ sdi->inst_type = SR_INST_SERIAL;
+ sdi->conn = serial;
+ sdi->priv = devc;
+ sdi->driver = di;
+
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "P")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+
+ if (devc->optarif == OPTARIF_BASE) {
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "BASE")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ } else if (devc->optarif == OPTARIF_HC) {
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HP")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HC")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ } else if (devc->optarif == OPTARIF_EJP) {
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HN")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPM")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ } else if (devc->optarif == OPTARIF_BBR) {
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJB")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJW")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HPJR")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJB")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJW")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ if (!(probe = sr_probe_new(0, SR_PROBE_ANALOG, TRUE, "HCJR")))
+ goto scan_cleanup;
+ sdi->probes = g_slist_append(sdi->probes, probe);
+ }