ZIO_ATTR_EXT("tstamp-acq-str-b", ZIO_RO_PERM, ZFA_UTC_ACQ_START_FINE, 0), /* Timing base */ ZIO_ATTR_EXT("tstamp-base-s", ZIO_RW_PERM, ZFA_UTC_SECONDS, 0), ZIO_ATTR_EXT("tstamp-base-t", ZIO_RW_PERM, ZFA_UTC_COARSE, 0), /* Parameters (not attributes) follow */ /* * State machine commands * 1: start * 2: stop */ ZIO_PARAM_EXT("fsm-command", ZIO_WO_PERM, ZFA_CTL_FMS_CMD, 0), /* * Automatic start acquisition * 1: enabled * 0: disabled */ ZIO_PARAM_EXT("fsm-auto-start", ZIO_RW_PERM, ZFA_SW_R_NOADDERS_AUTO, 0), /* * fsm - status of the state machine: * 1: IDLE * 2: PRE_TRIG * 3: WAIT_TRIG * 4: POST_TRIG * 5: DECR_SHOT * 7: Illegal * */
#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 */ static void ob_align(struct ob_dev *ob) { ob_writel(ob, ob->base_obs_core, &ob_regs[ACQ_CTRL_RST_CDR], 1); udelay(2000);