aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/cma3000_d0x.h
diff options
context:
space:
mode:
authorHemanth V <hemanthv@ti.com>2010-12-01 02:03:54 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-12-01 02:05:21 -0500
commitb029ffafe89cf4b97cf39e0225a5205cbbf9e02f (patch)
tree3f5b9074c4b9b4cf35d930f057ed6a73559e1e0c /drivers/input/misc/cma3000_d0x.h
parent33e808c383477e821163f133c2e3e671879c28b6 (diff)
Input: add CMA3000 accelerometer driver
Add support for CMA3000 Tri-axis accelerometer, which supports Motion detect, Measurement and Free fall modes. CMA3000 supports both I2C/SPI bus for communication, currently the driver supports I2C based communication. Signed-off-by: Hemanth V <hemanthv@ti.com> Reviewed-by: Jonathan Cameron <jic23@cam.ac.uk> Reviewed-by: Sergio Aguirre <saaguirre@ti.com> Reviewed-by: Shubhrajyoti <Shubhrajyoti@ti.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc/cma3000_d0x.h')
-rw-r--r--drivers/input/misc/cma3000_d0x.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/input/misc/cma3000_d0x.h b/drivers/input/misc/cma3000_d0x.h
new file mode 100644
index 000000000000..2304ce306e1c
--- /dev/null
+++ b/drivers/input/misc/cma3000_d0x.h
@@ -0,0 +1,42 @@
1/*
2 * VTI CMA3000_D0x Accelerometer driver
3 *
4 * Copyright (C) 2010 Texas Instruments
5 * Author: Hemanth V <hemanthv@ti.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef _INPUT_CMA3000_H
21#define _INPUT_CMA3000_H
22
23#include <linux/types.h>
24#include <linux/input.h>
25
26struct device;
27struct cma3000_accl_data;
28
29struct cma3000_bus_ops {
30 u16 bustype;
31 u8 ctrl_mod;
32 int (*read)(struct device *, u8, char *);
33 int (*write)(struct device *, u8, u8, char *);
34};
35
36struct cma3000_accl_data *cma3000_init(struct device *dev, int irq,
37 const struct cma3000_bus_ops *bops);
38void cma3000_exit(struct cma3000_accl_data *);
39void cma3000_suspend(struct cma3000_accl_data *);
40void cma3000_resume(struct cma3000_accl_data *);
41
42#endif