/* * In the following table, "ATTR_EXT" are extended attributes that * end up in the control structure (i.e. they are metadata for the * acquisition), while PARAM_EXT are parameters: sysfs files that * don't end up in the control structure of ZIO blocks */ static struct zio_attribute zfad_cset_ext_zattr[] = { /* * sample-decimation * ADC acquire always at the maximum sample rate, to make "slower" * acquisition you can decimate samples. 0 is a forbidden value, 1 * for the maximum speed. */ ZIO_ATTR_EXT("sample-decimation", ZIO_RW_PERM, ZFAT_SR_DECI, 1), ZIO_ATTR_EXT("ch0-offset", ZIO_RW_PERM, ZFA_CH1_OFFSET, 0), ZIO_ATTR_EXT("ch1-offset", ZIO_RW_PERM, ZFA_CH2_OFFSET, 0), ZIO_ATTR_EXT("ch2-offset", ZIO_RW_PERM, ZFA_CH3_OFFSET, 0), ZIO_ATTR_EXT("ch3-offset", ZIO_RW_PERM, ZFA_CH4_OFFSET, 0), ZIO_ATTR_EXT("ch0-vref", ZIO_RW_PERM, ZFA_CH1_CTL_RANGE, 0), ZIO_ATTR_EXT("ch1-vref", ZIO_RW_PERM, ZFA_CH2_CTL_RANGE, 0), ZIO_ATTR_EXT("ch2-vref", ZIO_RW_PERM, ZFA_CH3_CTL_RANGE, 0), ZIO_ATTR_EXT("ch3-vref", ZIO_RW_PERM, ZFA_CH4_CTL_RANGE, 0), ZIO_ATTR_EXT("ch0-saturation", ZIO_RW_PERM, ZFA_CH1_SAT, 0), ZIO_ATTR_EXT("ch1-saturation", ZIO_RW_PERM, ZFA_CH2_SAT, 0), ZIO_ATTR_EXT("ch2-saturation", ZIO_RW_PERM, ZFA_CH3_SAT, 0), ZIO_ATTR_EXT("ch3-saturation", ZIO_RW_PERM, ZFA_CH4_SAT, 0),
#include <linux/delay.h> #include <linux/fmc.h> #include <linux/fmc-sdb.h> #include <linux/zio.h> #include <linux/zio-dma.h> #include <linux/zio-sysfs.h> #include <linux/zio-buffer.h> #include <linux/zio-trigger.h> #include "obsbox.h" /** * Parameters */ static struct zio_attribute ob_cset_ext_zattr[] = { ZIO_ATTR_EXT("aligned", ZIO_RO_PERM, OB_ALIGNED, 0), /* * 0: stop * 1: start/restart */ ZIO_PARAM_EXT("ob-run", ZIO_RW_PERM, OB_PARM_RUN, 0), /* * 0: single shot * 1: streaming */ ZIO_PARAM_EXT("ob-streaming-enable", ZIO_RW_PERM, OB_PARM_STREAM, 1), }; /** * Align the serdes