aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/iio/iio_core.h
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-08-12 17:56:03 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-23 13:34:24 -0700
commitdf9c1c42c26f9a516dd44c956cff301741a0884e (patch)
tree506c45b99a203e54d6de97692fa867426199cfa2 /drivers/staging/iio/iio_core.h
parent657b90473b925da471e92fd207b127d3059e8d5b (diff)
staging:iio: Introduce iio_core.h and move all core only stuff out of iio.h.
Also get rid of a few function defs where they are only now in one core file anyway. Whilst here add mask = 0 to get rid of warning. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/iio_core.h')
-rw-r--r--drivers/staging/iio/iio_core.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/staging/iio/iio_core.h b/drivers/staging/iio/iio_core.h
new file mode 100644
index 000000000000..00e894d50e74
--- /dev/null
+++ b/drivers/staging/iio/iio_core.h
@@ -0,0 +1,48 @@
+/* The industrial I/O core function defs.
+ *
+ * Copyright (c) 2008 Jonathan Cameron
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * These definitions are meant for use only within the IIO core, not indvidual
+ * drivers.
+ */
+
+/**
+ * iio_device_get_chrdev_minor() - get an unused minor number
+ **/
+int iio_device_get_chrdev_minor(void);
+void iio_device_free_chrdev_minor(int val);
+
+
+/**
+ * iio_put() - internal module reference count reduce
+ **/
+void iio_put(void);
+
+/**
+ * iio_get() - internal module reference count increase
+ **/
+void iio_get(void);
+
+extern dev_t iio_devt;
+
+int __iio_add_chan_devattr(const char *postfix,
+ const char *group,
+ struct iio_chan_spec const *chan,
+ ssize_t (*func)(struct device *dev,
+ struct device_attribute *attr,
+ char *buf),
+ ssize_t (*writefunc)(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf,
+ size_t len),
+ int mask,
+ bool generic,
+ struct device *dev,
+ struct list_head *attr_list);
+
+/* Event interface flags */
+#define IIO_BUSY_BIT_POS 1