summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/iio/iio.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 21de272f1eb6..ac1cb8f1858c 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -41,7 +41,9 @@ enum iio_chan_info_enum {
enum iio_shared_by {
IIO_SEPARATE,
- IIO_SHARED_BY_TYPE
+ IIO_SHARED_BY_TYPE,
+ IIO_SHARED_BY_DIR,
+ IIO_SHARED_BY_ALL
};
enum iio_endian {
@@ -156,6 +158,10 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev,
* this channel.
* @info_mask_shared_by_type: What information is to be exported that is shared
* by all channels of the same type.
+ * @info_mask_shared_by_dir: What information is to be exported that is shared
+ * by all channels of the same direction.
+ * @info_mask_shared_by_all: What information is to be exported that is shared
+ * by all channels.
* @event_mask: What events can this channel produce.
* @ext_info: Array of extended info attributes for this channel.
* The array is NULL terminated, the last element should
@@ -192,6 +198,8 @@ struct iio_chan_spec {
} scan_type;
long info_mask_separate;
long info_mask_shared_by_type;
+ long info_mask_shared_by_dir;
+ long info_mask_shared_by_all;
long event_mask;
const struct iio_chan_spec_ext_info *ext_info;
const char *extend_name;
@@ -215,7 +223,9 @@ static inline bool iio_channel_has_info(const struct iio_chan_spec *chan,
enum iio_chan_info_enum type)
{
return (chan->info_mask_separate & BIT(type)) |
- (chan->info_mask_shared_by_type & BIT(type));
+ (chan->info_mask_shared_by_type & BIT(type)) |
+ (chan->info_mask_shared_by_dir & BIT(type)) |
+ (chan->info_mask_shared_by_all & BIT(type));
}
#define IIO_ST(si, rb, sb, sh) \