Commit 8ebd71c4 authored by Federico Vaga's avatar Federico Vaga

kernel: no time stamp in the attributes

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 15302e1e
......@@ -131,11 +131,6 @@ int ft_read_sw_fifo(struct fmctdc_dev *ft, int channel,
v[FT_ATTR_TDC_OFFSET] = ft->calib.zero_offset[channel - 1];
v[FT_ATTR_TDC_USER_OFFSET] = st->user_offset;
/* Only for sysfs debugging */
v[FT_ATTR_TDC_SECONDS] = ctrl->tstamp.secs;
v[FT_ATTR_TDC_COARSE] = ctrl->tstamp.ticks;
v[FT_ATTR_TDC_FRAC] = ctrl->tstamp.bins;
return 0;
}
......
......@@ -48,14 +48,14 @@ static struct zio_attribute ft_zattr_dev[] = {
/* Extended attributes for the TDC (== input) cset */
static struct zio_attribute ft_zattr_input[] = {
ZIO_ATTR_EXT("seconds", ZIO_RO_PERM, FT_ATTR_TDC_SECONDS, 0),
ZIO_ATTR_EXT("coarse", ZIO_RO_PERM, FT_ATTR_TDC_COARSE, 0),
ZIO_ATTR_EXT("frac", ZIO_RO_PERM, FT_ATTR_TDC_FRAC, 0),
ZIO_ATTR_EXT("termination", ZIO_RW_PERM, FT_ATTR_TDC_TERMINATION, 0),
ZIO_ATTR_EXT("offset", ZIO_RO_PERM, FT_ATTR_TDC_OFFSET, 0),
ZIO_ATTR_EXT("user-offset", ZIO_RW_PERM, FT_ATTR_TDC_USER_OFFSET, 0),
ZIO_ATTR_EXT("diff-reference", ZIO_RW_PERM, FT_ATTR_TDC_DELAY_REF, 0),
ZIO_ATTR_EXT("diff-reference-seq", ZIO_RO_PERM, FT_ATTR_TDC_DELAY_REF_SEQ, 0),
ZIO_PARAM_EXT("last_seconds", ZIO_RO_PERM, FT_ATTR_TDC_SECONDS, 0),
ZIO_PARAM_EXT("last_coarse", ZIO_RO_PERM, FT_ATTR_TDC_COARSE, 0),
ZIO_PARAM_EXT("last_frac", ZIO_RO_PERM, FT_ATTR_TDC_FRAC, 0),
};
/* This identifies if our "struct device" is device, input, output */
......@@ -105,6 +105,16 @@ static int ft_zio_info_channel(struct device *dev, struct zio_attribute *zattr,
case FT_ATTR_TDC_DELAY_REF:
*usr_val = st->delay_reference;
break;
/* Parameters */
case FT_ATTR_TDC_SECONDS:
*usr_val = st->last_ts.seconds;
break;
case FT_ATTR_TDC_COARSE:
*usr_val = st->last_ts.coarse;
break;
case FT_ATTR_TDC_FRAC:
*usr_val = st->last_ts.frac;
break;
}
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment