aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/iio/addac/adt7316.h
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2010-10-27 21:43:52 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-09 15:46:34 -0800
commit35f6b6b86ede34a9f8c029943842640b2ffbfa19 (patch)
tree5a94faf0f94a4ffab447cc795d1e363e3a7b2f59 /drivers/staging/iio/addac/adt7316.h
parentbb6f19eafe3a1a5dd937ce66668e70aeaa1b0bf4 (diff)
staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver
IIO driver for temperature sensor, ADC and DAC devices over SPI and I2C. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/addac/adt7316.h')
-rw-r--r--drivers/staging/iio/addac/adt7316.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/staging/iio/addac/adt7316.h b/drivers/staging/iio/addac/adt7316.h
new file mode 100644
index 000000000000..d34bd679bb4e
--- /dev/null
+++ b/drivers/staging/iio/addac/adt7316.h
@@ -0,0 +1,33 @@
+/*
+ * ADT7316 digital temperature sensor driver supporting ADT7316/7/8 ADT7516/7/9
+ *
+ * Copyright 2010 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef _ADT7316_H_
+#define _ADT7316_H_
+
+#include <linux/types.h>
+
+#define ADT7316_REG_MAX_ADDR 0x3F
+
+struct adt7316_bus {
+ void *client;
+ int irq;
+ int irq_flags;
+ int (*read) (void *client, u8 reg, u8 *data);
+ int (*write) (void *client, u8 reg, u8 val);
+ int (*multi_read) (void *client, u8 first_reg, u8 count, u8 *data);
+ int (*multi_write) (void *client, u8 first_reg, u8 count, u8 *data);
+};
+
+#ifdef CONFIG_PM
+int adt7316_disable(struct device *dev);
+int adt7316_enable(struct device *dev);
+#endif
+int adt7316_probe(struct device *dev, struct adt7316_bus *bus, const char *name);
+int adt7316_remove(struct device *dev);
+
+#endif