hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/include/linux/iio/consumer.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Industrial I/O in kernel consumer interface
34 *
45 * Copyright (c) 2011 Jonathan Cameron
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License version 2 as published by
8
- * the Free Software Foundation.
96 */
107 #ifndef _IIO_INKERN_CONSUMER_H_
118 #define _IIO_INKERN_CONSUMER_H_
....@@ -67,15 +64,6 @@
6764 struct iio_channel *devm_iio_channel_get(struct device *dev,
6865 const char *consumer_channel);
6966 /**
70
- * devm_iio_channel_release() - Resource managed version of
71
- * iio_channel_release().
72
- * @dev: Pointer to consumer device for which resource
73
- * is allocared.
74
- * @chan: The channel to be released.
75
- */
76
-void devm_iio_channel_release(struct device *dev, struct iio_channel *chan);
77
-
78
-/**
7967 * iio_channel_get_all() - get all channels associated with a client
8068 * @dev: Pointer to consumer device.
8169 *
....@@ -108,15 +96,6 @@
10896 * unbounded.
10997 */
11098 struct iio_channel *devm_iio_channel_get_all(struct device *dev);
111
-
112
-/**
113
- * devm_iio_channel_release_all() - Resource managed version of
114
- * iio_channel_release_all().
115
- * @dev: Pointer to consumer device for which resource
116
- * is allocared.
117
- * @chan: Array channel to be released.
118
- */
119
-void devm_iio_channel_release_all(struct device *dev, struct iio_channel *chan);
12099
121100 struct iio_cb_buffer;
122101 /**
....@@ -291,6 +270,20 @@
291270 const int **vals, int *length);
292271
293272 /**
273
+ * iio_read_avail_channel_attribute() - read available channel attribute values
274
+ * @chan: The channel being queried.
275
+ * @vals: Available values read back.
276
+ * @type: Type of values read back.
277
+ * @length: Number of entries in vals.
278
+ * @attribute: info attribute to be read back.
279
+ *
280
+ * Returns an error code, IIO_AVAIL_RANGE or IIO_AVAIL_LIST.
281
+ */
282
+int iio_read_avail_channel_attribute(struct iio_channel *chan,
283
+ const int **vals, int *type, int *length,
284
+ enum iio_chan_info_enum attribute);
285
+
286
+/**
294287 * iio_get_channel_type() - get the type of a channel
295288 * @channel: The channel being queried.
296289 * @type: The type of the channel.