Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
consumer.h
Go to the documentation of this file.
1 /*
2  * Industrial I/O in kernel consumer interface
3  *
4  * 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.
9  */
10 #ifndef _IIO_INKERN_CONSUMER_H_
11 #define _IIO_INKERN_CONSUMER_H_
12 #include <linux/iio/types.h>
13 
14 struct iio_dev;
15 struct iio_chan_spec;
16 
22 struct iio_channel {
23  struct iio_dev *indio_dev;
24  const struct iio_chan_spec *channel;
25 };
26 
36 struct iio_channel *iio_channel_get(const char *name,
37  const char *consumer_channel);
38 
44 
54 struct iio_channel *iio_channel_get_all(const char *name);
55 
61 
71  int *val);
72 
87 
96  enum iio_chan_type *type);
97 
108 int iio_read_channel_scale(struct iio_channel *chan, int *val,
109  int *val2);
110 
132  int *processed, unsigned int scale);
133 
134 #endif