]> sigrok.org Git - libsigrok.git/blame - src/hardware/yokogawa-dlm/api.c
drivers: Factor out std_gvar_array_*().
[libsigrok.git] / src / hardware / yokogawa-dlm / api.c
CommitLineData
10763937
SA
1/*
2 * This file is part of the libsigrok project.
3 *
4 * Copyright (C) 2014 abraxa (Soeren Apel) <soeren@apelpie.net>
5 * Based on the Hameg HMO driver by poljar (Damir Jelić) <poljarinho@gmail.com>
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
6ec6c43b 21#include <config.h>
10763937 22#include <stdlib.h>
5a1afc09 23#include "scpi.h"
10763937
SA
24#include "protocol.h"
25
dd5c48a6 26static struct sr_dev_driver yokogawa_dlm_driver_info;
8ab929d6 27
329733d9
UH
28static const char *MANUFACTURER_ID = "YOKOGAWA";
29static const char *MANUFACTURER_NAME = "Yokogawa";
8ab929d6 30
4b25cbff 31static const uint32_t scanopts[] = {
f3c60fb6
SA
32 SR_CONF_CONN,
33};
34
4b25cbff 35static const uint32_t drvopts[] = {
cf0280fa
AJ
36 SR_CONF_LOGIC_ANALYZER,
37 SR_CONF_OSCILLOSCOPE,
38};
39
4b25cbff 40static const uint32_t devopts[] = {
f3c60fb6
SA
41 SR_CONF_LIMIT_FRAMES | SR_CONF_GET | SR_CONF_SET,
42 SR_CONF_SAMPLERATE | SR_CONF_GET,
43 SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
44 SR_CONF_NUM_HDIV | SR_CONF_GET,
45 SR_CONF_HORIZ_TRIGGERPOS | SR_CONF_GET | SR_CONF_SET,
f3c60fb6 46 SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
86621306 47 SR_CONF_TRIGGER_SLOPE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
f3c60fb6
SA
48};
49
6b82c3e5 50static const uint32_t devopts_cg_analog[] = {
f3c60fb6 51 SR_CONF_NUM_VDIV | SR_CONF_GET,
86621306
UH
52 SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
53 SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
f3c60fb6
SA
54};
55
6b82c3e5 56static const uint32_t devopts_cg_digital[] = {
f3c60fb6
SA
57};
58
8ab929d6
SA
59enum {
60 CG_INVALID = -1,
61 CG_NONE,
62 CG_ANALOG,
63 CG_DIGITAL,
64};
65
8ab929d6
SA
66static struct sr_dev_inst *probe_usbtmc_device(struct sr_scpi_dev_inst *scpi)
67{
68 struct sr_dev_inst *sdi;
69 struct dev_context *devc;
70 struct sr_scpi_hw_info *hw_info;
71 char *model_name;
72 int model_index;
73
74 sdi = NULL;
75 devc = NULL;
76 hw_info = NULL;
77
78 if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {
79 sr_info("Couldn't get IDN response.");
80 goto fail;
81 }
82
83 if (strcmp(hw_info->manufacturer, MANUFACTURER_ID) != 0)
84 goto fail;
85
86 if (dlm_model_get(hw_info->model, &model_name, &model_index) != SR_OK)
87 goto fail;
88
aac29cc1 89 sdi = g_malloc0(sizeof(struct sr_dev_inst));
0af636be
UH
90 sdi->vendor = g_strdup(MANUFACTURER_NAME);
91 sdi->model = g_strdup(model_name);
92 sdi->version = g_strdup(hw_info->firmware_version);
8ab929d6 93
d1314831
SA
94 sdi->serial_num = g_strdup(hw_info->serial_number);
95
8ab929d6
SA
96 sr_scpi_hw_info_free(hw_info);
97 hw_info = NULL;
98
ac10a927 99 devc = g_malloc0(sizeof(struct dev_context));
8ab929d6 100
4f840ce9 101 sdi->driver = &yokogawa_dlm_driver_info;
8ab929d6
SA
102 sdi->priv = devc;
103 sdi->inst_type = SR_INST_SCPI;
104 sdi->conn = scpi;
105
106 if (dlm_device_init(sdi, model_index) != SR_OK)
107 goto fail;
108
8ab929d6
SA
109 return sdi;
110
111fail:
7b365c47 112 sr_scpi_hw_info_free(hw_info);
4bf93988 113 sr_dev_inst_free(sdi);
b1f83103 114 g_free(devc);
8ab929d6
SA
115
116 return NULL;
117}
118
4f840ce9 119static GSList *scan(struct sr_dev_driver *di, GSList *options)
8ab929d6 120{
41812aca 121 return sr_scpi_scan(di->context, options, probe_usbtmc_device);
8ab929d6
SA
122}
123
3553451f 124static void clear_helper(struct dev_context *devc)
8ab929d6 125{
8ab929d6 126 dlm_scope_state_destroy(devc->model_state);
8ab929d6
SA
127 g_free(devc->analog_groups);
128 g_free(devc->digital_groups);
8ab929d6
SA
129}
130
4f840ce9 131static int dev_clear(const struct sr_dev_driver *di)
8ab929d6 132{
3553451f 133 return std_dev_clear_with_callback(di, (std_dev_clear_callback)clear_helper);
8ab929d6
SA
134}
135
136static int dev_open(struct sr_dev_inst *sdi)
137{
6402c379 138 if (sr_scpi_open(sdi->conn) != SR_OK)
8ab929d6
SA
139 return SR_ERR;
140
141 if (dlm_scope_state_query(sdi) != SR_OK)
142 return SR_ERR;
143
8ab929d6
SA
144 return SR_OK;
145}
146
147static int dev_close(struct sr_dev_inst *sdi)
148{
f1ba6b4b 149 return sr_scpi_close(sdi->conn);
8ab929d6
SA
150}
151
8ab929d6
SA
152/**
153 * Check which category a given channel group belongs to.
154 *
155 * @param devc Our internal device context.
a9308652 156 * @param cg The channel group to check.
8ab929d6 157 *
a9308652
UH
158 * @retval CG_NONE cg is NULL
159 * @retval CG_ANALOG cg is an analog group
8ab929d6
SA
160 * @retval CG_DIGITAL cg is a digital group
161 * @retval CG_INVALID cg is something else
162 */
163static int check_channel_group(struct dev_context *devc,
ac10a927 164 const struct sr_channel_group *cg)
8ab929d6
SA
165{
166 unsigned int i;
329733d9 167 const struct scope_config *model;
8ab929d6
SA
168
169 model = devc->model_config;
170
171 if (!cg)
172 return CG_NONE;
173
a9308652 174 for (i = 0; i < model->analog_channels; i++)
8ab929d6
SA
175 if (cg == devc->analog_groups[i])
176 return CG_ANALOG;
177
a9308652 178 for (i = 0; i < model->pods; i++)
8ab929d6
SA
179 if (cg == devc->digital_groups[i])
180 return CG_DIGITAL;
181
182 sr_err("Invalid channel group specified.");
183 return CG_INVALID;
184}
185
584560f1 186static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
ac10a927 187 const struct sr_channel_group *cg)
8ab929d6
SA
188{
189 int ret, cg_type;
190 unsigned int i;
191 struct dev_context *devc;
329733d9 192 const struct scope_config *model;
8ab929d6
SA
193 struct scope_state *state;
194
709468ba 195 if (!sdi)
8ab929d6
SA
196 return SR_ERR_ARG;
197
709468ba
UH
198 devc = sdi->priv;
199
8ab929d6
SA
200 if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
201 return SR_ERR;
202
8ab929d6
SA
203 model = devc->model_config;
204 state = devc->model_state;
205
206 switch (key) {
bf622e6d 207 case SR_CONF_NUM_HDIV:
8ab929d6
SA
208 *data = g_variant_new_int32(model->num_xdivs);
209 ret = SR_OK;
210 break;
211 case SR_CONF_TIMEBASE:
212 *data = g_variant_new("(tt)",
f3c60fb6
SA
213 dlm_timebases[state->timebase][0],
214 dlm_timebases[state->timebase][1]);
8ab929d6
SA
215 ret = SR_OK;
216 break;
217 case SR_CONF_NUM_VDIV:
218 if (cg_type == CG_NONE) {
219 sr_err("No channel group specified.");
220 return SR_ERR_CHANNEL_GROUP;
221 } else if (cg_type == CG_ANALOG) {
222 *data = g_variant_new_int32(model->num_ydivs);
223 ret = SR_OK;
224 break;
225 } else {
226 ret = SR_ERR_NA;
227 }
228 break;
229 case SR_CONF_VDIV:
230 ret = SR_ERR_NA;
231 if (cg_type == CG_NONE) {
232 sr_err("No channel group specified.");
233 return SR_ERR_CHANNEL_GROUP;
234 } else if (cg_type != CG_ANALOG)
235 break;
236
a9308652 237 for (i = 0; i < model->analog_channels; i++) {
8ab929d6
SA
238 if (cg != devc->analog_groups[i])
239 continue;
240 *data = g_variant_new("(tt)",
f3c60fb6
SA
241 dlm_vdivs[state->analog_states[i].vdiv][0],
242 dlm_vdivs[state->analog_states[i].vdiv][1]);
8ab929d6
SA
243 ret = SR_OK;
244 break;
245 }
246 break;
247 case SR_CONF_TRIGGER_SOURCE:
248 *data = g_variant_new_string((*model->trigger_sources)[state->trigger_source]);
249 ret = SR_OK;
250 break;
251 case SR_CONF_TRIGGER_SLOPE:
f3c60fb6 252 *data = g_variant_new_string(dlm_trigger_slopes[state->trigger_slope]);
8ab929d6
SA
253 ret = SR_OK;
254 break;
255 case SR_CONF_HORIZ_TRIGGERPOS:
256 *data = g_variant_new_double(state->horiz_triggerpos);
257 ret = SR_OK;
258 break;
259 case SR_CONF_COUPLING:
260 ret = SR_ERR_NA;
261 if (cg_type == CG_NONE) {
262 sr_err("No channel group specified.");
263 return SR_ERR_CHANNEL_GROUP;
264 } else if (cg_type != CG_ANALOG)
265 break;
266
a9308652 267 for (i = 0; i < model->analog_channels; i++) {
8ab929d6
SA
268 if (cg != devc->analog_groups[i])
269 continue;
270 *data = g_variant_new_string((*model->coupling_options)[state->analog_states[i].coupling]);
271 ret = SR_OK;
272 break;
273 }
274 break;
275 case SR_CONF_SAMPLERATE:
276 *data = g_variant_new_uint64(state->sample_rate);
277 ret = SR_OK;
278 break;
279 default:
280 ret = SR_ERR_NA;
281 }
282
283 return ret;
284}
285
584560f1 286static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi,
ac10a927 287 const struct sr_channel_group *cg)
8ab929d6
SA
288{
289 int ret, cg_type;
290 unsigned int i, j;
291 char float_str[30];
292 struct dev_context *devc;
329733d9 293 const struct scope_config *model;
8ab929d6
SA
294 struct scope_state *state;
295 const char *tmp;
296 uint64_t p, q;
297 double tmp_d;
298 gboolean update_sample_rate;
299
300 if (!sdi || !(devc = sdi->priv))
301 return SR_ERR_ARG;
302
303 if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
304 return SR_ERR;
305
306 model = devc->model_config;
307 state = devc->model_state;
308 update_sample_rate = FALSE;
309
310 ret = SR_ERR_NA;
311
312 switch (key) {
313 case SR_CONF_LIMIT_FRAMES:
314 devc->frame_limit = g_variant_get_uint64(data);
315 ret = SR_OK;
316 break;
317 case SR_CONF_TRIGGER_SOURCE:
318 tmp = g_variant_get_string(data, NULL);
319 for (i = 0; (*model->trigger_sources)[i]; i++) {
320 if (g_strcmp0(tmp, (*model->trigger_sources)[i]) != 0)
321 continue;
322 state->trigger_source = i;
323 /* TODO: A and B trigger support possible? */
324 ret = dlm_trigger_source_set(sdi->conn, (*model->trigger_sources)[i]);
325 break;
326 }
327 break;
328 case SR_CONF_VDIV:
329 if (cg_type == CG_NONE) {
330 sr_err("No channel group specified.");
331 return SR_ERR_CHANNEL_GROUP;
332 }
333
334 g_variant_get(data, "(tt)", &p, &q);
335
f3c60fb6
SA
336 for (i = 0; i < ARRAY_SIZE(dlm_vdivs); i++) {
337 if (p != dlm_vdivs[i][0] ||
338 q != dlm_vdivs[i][1])
8ab929d6 339 continue;
a9308652 340 for (j = 1; j <= model->analog_channels; j++) {
8ab929d6
SA
341 if (cg != devc->analog_groups[j - 1])
342 continue;
343 state->analog_states[j - 1].vdiv = i;
344 g_ascii_formatd(float_str, sizeof(float_str),
345 "%E", (float) p / q);
346 if (dlm_analog_chan_vdiv_set(sdi->conn, j, float_str) != SR_OK ||
ac10a927 347 sr_scpi_get_opc(sdi->conn) != SR_OK)
8ab929d6
SA
348 return SR_ERR;
349
350 break;
351 }
352
353 ret = SR_OK;
354 break;
355 }
356 break;
357 case SR_CONF_TIMEBASE:
358 g_variant_get(data, "(tt)", &p, &q);
359
f3c60fb6
SA
360 for (i = 0; i < ARRAY_SIZE(dlm_timebases); i++) {
361 if (p != dlm_timebases[i][0] ||
362 q != dlm_timebases[i][1])
8ab929d6
SA
363 continue;
364 state->timebase = i;
365 g_ascii_formatd(float_str, sizeof(float_str),
366 "%E", (float) p / q);
367 ret = dlm_timebase_set(sdi->conn, float_str);
368 update_sample_rate = TRUE;
369 break;
370 }
371 break;
372 case SR_CONF_HORIZ_TRIGGERPOS:
373 tmp_d = g_variant_get_double(data);
374
375 /* TODO: Check if the calculation makes sense for the DLM. */
376 if (tmp_d < 0.0 || tmp_d > 1.0)
377 return SR_ERR;
378
379 state->horiz_triggerpos = tmp_d;
380 tmp_d = -(tmp_d - 0.5) *
f3c60fb6
SA
381 ((double) dlm_timebases[state->timebase][0] /
382 dlm_timebases[state->timebase][1])
ac10a927 383 * model->num_xdivs;
8ab929d6
SA
384
385 g_ascii_formatd(float_str, sizeof(float_str), "%E", tmp_d);
386 ret = dlm_horiz_trigger_pos_set(sdi->conn, float_str);
387 break;
388 case SR_CONF_TRIGGER_SLOPE:
389 tmp = g_variant_get_string(data, NULL);
390
391 if (!tmp || !(tmp[0] == 'f' || tmp[0] == 'r'))
392 return SR_ERR_ARG;
393
394 /* Note: See dlm_trigger_slopes[] in protocol.c. */
395 state->trigger_slope = (tmp[0] == 'r') ?
396 SLOPE_POSITIVE : SLOPE_NEGATIVE;
397
398 ret = dlm_trigger_slope_set(sdi->conn, state->trigger_slope);
399 break;
400 case SR_CONF_COUPLING:
401 if (cg_type == CG_NONE) {
402 sr_err("No channel group specified.");
403 return SR_ERR_CHANNEL_GROUP;
404 }
405
406 tmp = g_variant_get_string(data, NULL);
407
408 for (i = 0; (*model->coupling_options)[i]; i++) {
409 if (strcmp(tmp, (*model->coupling_options)[i]) != 0)
410 continue;
a9308652 411 for (j = 1; j <= model->analog_channels; j++) {
8ab929d6
SA
412 if (cg != devc->analog_groups[j - 1])
413 continue;
414 state->analog_states[j-1].coupling = i;
415
416 if (dlm_analog_chan_coupl_set(sdi->conn, j, tmp) != SR_OK ||
ac10a927 417 sr_scpi_get_opc(sdi->conn) != SR_OK)
8ab929d6
SA
418 return SR_ERR;
419 break;
420 }
421
422 ret = SR_OK;
423 break;
424 }
425 break;
426 default:
427 ret = SR_ERR_NA;
428 break;
429 }
430
431 if (ret == SR_OK)
432 ret = sr_scpi_get_opc(sdi->conn);
433
434 if (ret == SR_OK && update_sample_rate)
435 ret = dlm_sample_rate_query(sdi);
436
437 return ret;
438}
439
c65a021c
SA
440static int config_channel_set(const struct sr_dev_inst *sdi,
441 struct sr_channel *ch, unsigned int changes)
442{
a9308652 443 /* Currently we only handle SR_CHANNEL_SET_ENABLED. */
c65a021c
SA
444 if (changes != SR_CHANNEL_SET_ENABLED)
445 return SR_ERR_NA;
446
447 return dlm_channel_state_set(sdi, ch->index, ch->enabled);
448}
449
584560f1 450static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,
ac10a927 451 const struct sr_channel_group *cg)
8ab929d6 452{
cf0280fa 453 int cg_type = CG_NONE;
e66d1892
UH
454 struct dev_context *devc;
455 const struct scope_config *model;
f3c60fb6 456
e66d1892
UH
457 devc = (sdi) ? sdi->priv : NULL;
458 model = (devc) ? devc->model_config : NULL;
f3c60fb6 459
f3c60fb6
SA
460 if (!cg) {
461 switch (key) {
e66d1892 462 case SR_CONF_SCAN_OPTIONS:
f3c60fb6 463 case SR_CONF_DEVICE_OPTIONS:
4b25cbff 464 return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts);
f3c60fb6 465 case SR_CONF_TIMEBASE:
db944f16 466 *data = std_gvar_tuple_array(&dlm_timebases, ARRAY_SIZE(dlm_timebases));
f3c60fb6
SA
467 return SR_OK;
468 case SR_CONF_TRIGGER_SOURCE:
469 if (!model)
470 return SR_ERR_ARG;
471 *data = g_variant_new_strv(*model->trigger_sources,
472 g_strv_length((char **)*model->trigger_sources));
473 return SR_OK;
474 case SR_CONF_TRIGGER_SLOPE:
475 *data = g_variant_new_strv(dlm_trigger_slopes,
476 g_strv_length((char **)dlm_trigger_slopes));
477 return SR_OK;
478 case SR_CONF_NUM_HDIV:
49f49cb5 479 *data = g_variant_new_uint32(model->num_xdivs);
f3c60fb6
SA
480 return SR_OK;
481 default:
482 return SR_ERR_NA;
483 }
484 }
485
486 if ((cg_type = check_channel_group(devc, cg)) == CG_INVALID)
487 return SR_ERR;
488
8ab929d6 489 switch (key) {
8ab929d6 490 case SR_CONF_DEVICE_OPTIONS:
105df674
UH
491 if (cg_type == CG_ANALOG)
492 *data = std_gvar_array_u32(devopts_cg_analog, ARRAY_SIZE(devopts_cg_analog));
493 else if (cg_type == CG_DIGITAL)
494 *data = std_gvar_array_u32(devopts_cg_digital, ARRAY_SIZE(devopts_cg_digital));
495 else
496 *data = std_gvar_array_u32(NULL, 0);
8ab929d6
SA
497 break;
498 case SR_CONF_COUPLING:
499 if (cg_type == CG_NONE)
500 return SR_ERR_CHANNEL_GROUP;
501 *data = g_variant_new_strv(*model->coupling_options,
ac10a927 502 g_strv_length((char **)*model->coupling_options));
8ab929d6 503 break;
8ab929d6
SA
504 case SR_CONF_VDIV:
505 if (cg_type == CG_NONE)
506 return SR_ERR_CHANNEL_GROUP;
db944f16 507 *data = std_gvar_tuple_array(&dlm_vdivs, ARRAY_SIZE(dlm_vdivs));
8ab929d6
SA
508 break;
509 default:
510 return SR_ERR_NA;
511 }
512
513 return SR_OK;
514}
515
516static int dlm_check_channels(GSList *channels)
517{
518 GSList *l;
519 struct sr_channel *ch;
520 gboolean enabled_pod1, enabled_chan4;
521
522 enabled_pod1 = enabled_chan4 = FALSE;
523
524 /* Note: On the DLM2000, CH4 and Logic are shared. */
525 /* TODO Handle non-DLM2000 models. */
526 for (l = channels; l; l = l->next) {
527 ch = l->data;
528 switch (ch->type) {
529 case SR_CHANNEL_ANALOG:
530 if (ch->index == 3)
531 enabled_chan4 = TRUE;
532 break;
533 case SR_CHANNEL_LOGIC:
534 enabled_pod1 = TRUE;
535 break;
536 default:
537 return SR_ERR;
538 }
539 }
540
541 if (enabled_pod1 && enabled_chan4)
542 return SR_ERR;
543
544 return SR_OK;
545}
546
695dc859 547static int dev_acquisition_start(const struct sr_dev_inst *sdi)
8ab929d6
SA
548{
549 GSList *l;
550 gboolean digital_added;
551 struct sr_channel *ch;
552 struct dev_context *devc;
553 struct sr_scpi_dev_inst *scpi;
554
8ab929d6
SA
555 scpi = sdi->conn;
556 devc = sdi->priv;
557 digital_added = FALSE;
558
559 g_slist_free(devc->enabled_channels);
560 devc->enabled_channels = NULL;
561
562 for (l = sdi->channels; l; l = l->next) {
563 ch = l->data;
564 if (!ch->enabled)
565 continue;
566 /* Only add a single digital channel. */
567 if (ch->type != SR_CHANNEL_LOGIC || !digital_added) {
568 devc->enabled_channels = g_slist_append(
ac10a927
SA
569 devc->enabled_channels, ch);
570 if (ch->type == SR_CHANNEL_LOGIC)
571 digital_added = TRUE;
8ab929d6
SA
572 }
573 }
574
575 if (!devc->enabled_channels)
576 return SR_ERR;
577
578 if (dlm_check_channels(devc->enabled_channels) != SR_OK) {
579 sr_err("Invalid channel configuration specified!");
580 return SR_ERR_NA;
581 }
582
af3487ec
SA
583 /* Request data for the first enabled channel. */
584 devc->current_channel = devc->enabled_channels;
585 dlm_channel_data_request(sdi);
586
0028d5a1 587 sr_scpi_source_add(sdi->session, scpi, G_IO_IN, 5,
8ab929d6
SA
588 dlm_data_receive, (void *)sdi);
589
590 return SR_OK;
591}
592
695dc859 593static int dev_acquisition_stop(struct sr_dev_inst *sdi)
8ab929d6
SA
594{
595 struct dev_context *devc;
8ab929d6 596
bee2b016 597 std_session_send_df_end(sdi);
8ab929d6 598
8ab929d6
SA
599 devc = sdi->priv;
600
601 devc->num_frames = 0;
602 g_slist_free(devc->enabled_channels);
603 devc->enabled_channels = NULL;
af3487ec
SA
604
605 sr_scpi_source_remove(sdi->session, sdi->conn);
8ab929d6
SA
606
607 return SR_OK;
608}
10763937 609
dd5c48a6 610static struct sr_dev_driver yokogawa_dlm_driver_info = {
10763937 611 .name = "yokogawa-dlm",
ac10a927 612 .longname = "Yokogawa DL/DLM",
10763937 613 .api_version = 1,
c2fdcc25 614 .init = std_init,
700d6b64 615 .cleanup = std_cleanup,
8ab929d6 616 .scan = scan,
c01bf34c 617 .dev_list = std_dev_list,
8ab929d6
SA
618 .dev_clear = dev_clear,
619 .config_get = config_get,
620 .config_set = config_set,
c65a021c 621 .config_channel_set = config_channel_set,
8ab929d6
SA
622 .config_list = config_list,
623 .dev_open = dev_open,
624 .dev_close = dev_close,
625 .dev_acquisition_start = dev_acquisition_start,
626 .dev_acquisition_stop = dev_acquisition_stop,
41812aca 627 .context = NULL,
10763937 628};
dd5c48a6 629SR_REGISTER_DEV_DRIVER(yokogawa_dlm_driver_info);