aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/adxl34x.h
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2010-06-25 11:44:10 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-06-25 11:55:07 -0400
commite27c729219ad24c8ac9a4b34cf192e56917565c5 (patch)
treeb8cc2d09a31eac384aa90dd99304081e2ef95846 /drivers/input/misc/adxl34x.h
parent69a4af606ed4836faa2ec69b1d217f384b8235e7 (diff)
Input: add driver for ADXL345/346 Digital Accelerometers
This is a driver for the ADXL345/346 Three-Axis Digital Accelerometers. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Chris Verges <chrisv@cyberswitching.com> Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc/adxl34x.h')
-rw-r--r--drivers/input/misc/adxl34x.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/input/misc/adxl34x.h b/drivers/input/misc/adxl34x.h
new file mode 100644
index 000000000000..ea9093c15c81
--- /dev/null
+++ b/drivers/input/misc/adxl34x.h
@@ -0,0 +1,30 @@
1/*
2 * ADXL345/346 Three-Axis Digital Accelerometers (I2C/SPI Interface)
3 *
4 * Enter bugs at http://blackfin.uclinux.org/
5 *
6 * Copyright (C) 2009 Michael Hennerich, Analog Devices Inc.
7 * Licensed under the GPL-2 or later.
8 */
9
10#ifndef _ADXL34X_H_
11#define _ADXL34X_H_
12
13struct device;
14struct adxl34x;
15
16struct adxl34x_bus_ops {
17 u16 bustype;
18 int (*read)(struct device *, unsigned char);
19 int (*read_block)(struct device *, unsigned char, int, void *);
20 int (*write)(struct device *, unsigned char, unsigned char);
21};
22
23void adxl34x_disable(struct adxl34x *ac);
24void adxl34x_enable(struct adxl34x *ac);
25struct adxl34x *adxl34x_probe(struct device *dev, int irq,
26 bool fifo_delay_default,
27 const struct adxl34x_bus_ops *bops);
28int adxl34x_remove(struct adxl34x *ac);
29
30#endif