Commit e614a54b authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio:attrs - make address a u64 to allow event codes to be used.

Makes unusual event related attributes look a lot more like the core ones.

V2: Make sure the utils that set these up can handle the codes.
V3: rebase
Reported-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 26d25ae3
...@@ -22,7 +22,7 @@ int __iio_add_chan_devattr(const char *postfix, ...@@ -22,7 +22,7 @@ int __iio_add_chan_devattr(const char *postfix,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, const char *buf,
size_t len), size_t len),
int mask, u64 mask,
bool generic, bool generic,
struct device *dev, struct device *dev,
struct list_head *attr_list); struct list_head *attr_list);
......
...@@ -515,7 +515,7 @@ int __iio_add_chan_devattr(const char *postfix, ...@@ -515,7 +515,7 @@ int __iio_add_chan_devattr(const char *postfix,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, const char *buf,
size_t len), size_t len),
int mask, u64 mask,
bool generic, bool generic,
struct device *dev, struct device *dev,
struct list_head *attr_list) struct list_head *attr_list)
...@@ -783,7 +783,8 @@ static ssize_t iio_ev_value_store(struct device *dev, ...@@ -783,7 +783,8 @@ static ssize_t iio_ev_value_store(struct device *dev,
static int iio_device_add_event_sysfs(struct iio_dev *dev_info, static int iio_device_add_event_sysfs(struct iio_dev *dev_info,
struct iio_chan_spec const *chan) struct iio_chan_spec const *chan)
{ {
int ret = 0, i, mask = 0, attrcount = 0; int ret = 0, i, attrcount = 0;
u64 mask = 0;
char *postfix; char *postfix;
if (!chan->event_mask) if (!chan->event_mask)
return 0; return 0;
......
...@@ -22,7 +22,7 @@ struct iio_chan_spec; ...@@ -22,7 +22,7 @@ struct iio_chan_spec;
*/ */
struct iio_dev_attr { struct iio_dev_attr {
struct device_attribute dev_attr; struct device_attribute dev_attr;
int address; u64 address;
struct list_head l; struct list_head l;
struct iio_chan_spec const *c; struct iio_chan_spec const *c;
}; };
......
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