Commit 21bd1ad5 authored by Federico Vaga's avatar Federico Vaga

kernel: temperature is a parameter

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent d8e2d330
......@@ -32,7 +32,6 @@ enum ft_zattr_dev_idx {
FT_ATTR_DEV_COARSE,
FT_ATTR_DEV_SEQUENCE,
FT_ATTR_DEV_COMMAND, /* see below for commands */
FT_ATTR_DEV_TEMP,
FT_ATTR_DEV_ENABLE_INPUTS,
FT_ATTR_DEV_RESERVE_7,
FT_ATTR_DEV__LAST,
......@@ -49,6 +48,10 @@ enum ft_zattr_in_idx {
FT_ATTR_TDC__LAST,
};
enum ft_zattr_paremeters {
FT_ATTR_PARAM_TEMP = FT_ATTR_TDC__LAST,
};
enum ft_command {
FT_CMD_WR_ENABLE = 0, /* Enable White Rabbit */
FT_CMD_WR_DISABLE, /* Disable it */
......
......@@ -43,7 +43,7 @@ static struct zio_attribute ft_zattr_dev[] = {
ZIO_ATTR_EXT("command", ZIO_WO_PERM, FT_ATTR_DEV_COMMAND, 0),
ZIO_ATTR_EXT("enable_inputs", ZIO_RW_PERM, FT_ATTR_DEV_ENABLE_INPUTS, 0),
ZIO_ATTR_EXT("sequence", ZIO_RW_PERM, FT_ATTR_DEV_SEQUENCE, 0),
ZIO_PARAM_EXT("temperature", ZIO_RO_PERM, FT_ATTR_DEV_TEMP, 0)
ZIO_PARAM_EXT("temperature", ZIO_RO_PERM, FT_ATTR_PARAM_TEMP, 0),
};
/* Extended attributes for the TDC (== input) cset */
......@@ -124,7 +124,7 @@ static int ft_zio_info_get(struct device *dev, struct zio_attribute *zattr,
case FT_ATTR_DEV_SEQUENCE:
*usr_val = ft->sequence;
break;
case FT_ATTR_DEV_TEMP:
case FT_ATTR_PARAM_TEMP:
ft_read_temp(ft, ft->verbose);
*usr_val = ft->temp;
break;
......
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