forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/staging/comedi/comedidev.h
....@@ -516,6 +516,15 @@
516516 * called when @use_count changes from 0 to 1.
517517 * @close: Optional pointer to a function set by the low-level driver to be
518518 * called when @use_count changed from 1 to 0.
519
+ * @insn_device_config: Optional pointer to a handler for all sub-instructions
520
+ * except %INSN_DEVICE_CONFIG_GET_ROUTES of the %INSN_DEVICE_CONFIG
521
+ * instruction. If this is not initialized by the low-level driver, a
522
+ * default handler will be set during post-configuration.
523
+ * @get_valid_routes: Optional pointer to a handler for the
524
+ * %INSN_DEVICE_CONFIG_GET_ROUTES sub-instruction of the
525
+ * %INSN_DEVICE_CONFIG instruction set. If this is not initialized by the
526
+ * low-level driver, a default handler that copies zero routes back to the
527
+ * user will be used.
519528 *
520529 * This is the main control data structure for a COMEDI device (as far as the
521530 * COMEDI core is concerned). There are two groups of COMEDI devices -
....@@ -565,6 +574,11 @@
565574
566575 int (*open)(struct comedi_device *dev);
567576 void (*close)(struct comedi_device *dev);
577
+ int (*insn_device_config)(struct comedi_device *dev,
578
+ struct comedi_insn *insn, unsigned int *data);
579
+ unsigned int (*get_valid_routes)(struct comedi_device *dev,
580
+ unsigned int n_pairs,
581
+ unsigned int *pair_data);
568582 };
569583
570584 /*
....@@ -613,7 +627,7 @@
613627 * @range: Array of &struct comedi_krange, one for each range.
614628 *
615629 * Each element of @range[] describes the minimum and maximum physical range
616
- * range and the type of units. Typically, the type of unit is %UNIT_volt
630
+ * and the type of units. Typically, the type of unit is %UNIT_volt
617631 * (i.e. volts) and the minimum and maximum are in millionths of a volt.
618632 * There may also be a flag that indicates the minimum and maximum are merely
619633 * scale factors for an unknown, external reference.