Commit ad8ad78a authored by Alessandro Rubini's avatar Alessandro Rubini

fd-zio: added version attr, fixed attribute enums

parent 5ad77722
......@@ -349,10 +349,10 @@ directory is @i{/sys/bus/zio/devices/zio-fd-0200}:
@smallexample
spusa# ls -Ff /sys/bus/zio/devices/zio-fd-0200/
./ enable coarse driver fd-ch3/
../ resolution-bits host-time fd-input/ fd-ch4/
uevent utc-h subsystem fd-ch1/
name utc-l power/ fd-ch2/
./ enable utc-l power/ fd-ch2/
../ resolution-bits coarse driver@ fd-ch3/
uevent version host-time fd-input/ fd-ch4/
name utc-h subsystem@ fd-ch1/
@end smallexample
@c ==========================================================================
......
......@@ -58,6 +58,8 @@ DEFINE_ZATTR_STD(ZDEV, fd_zattr_dev_std) = {
/* Extended attributes for the device */
static struct zio_attribute fd_zattr_dev[] = {
ZATTR_EXT_REG("version", S_IRUGO, FD_ATTR_DEV_VERSION,
FDELAY_VERSION),
ZATTR_EXT_REG("utc-h", S_IRUGO | S_IWUGO, FD_ATTR_DEV_UTC_H, 0),
ZATTR_EXT_REG("utc-l", S_IRUGO | S_IWUGO, FD_ATTR_DEV_UTC_L, 0),
ZATTR_EXT_REG("coarse", S_IRUGO | S_IWUGO, FD_ATTR_DEV_COARSE, 0),
......
......@@ -3,15 +3,19 @@
/* Device-wide ZIO attributes */
enum fd_zattr_dev_idx {
FD_ATTR_DEV_UTC_H = 0,
FD_ATTR_DEV_VERSION = 0,
FD_ATTR_DEV_UTC_H,
FD_ATTR_DEV_UTC_L,
FD_ATTR_DEV_COARSE,
FD_ATTR_DEV_HOST_T,
FD_ATTR_DEV__LAST,
};
#define FDELAY_VERSION 1 /* Used to handle incompatibilities */
/* Input ZIO attributes (actually, the internal time is represented as attrs */
enum fd_zattr_in_idx {
FD_ATTR_IN_UTC_H = 0,
FD_ATTR_IN_UTC_H = FD_ATTR_DEV__LAST,
FD_ATTR_IN_UTC_L,
FD_ATTR_IN_COARSE,
FD_ATTR_IN_FRAC,
......
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