diff options
author | Dan Murphy <dmurphy@ti.com> | 2011-06-08 12:18:14 -0500 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:59:58 +0200 |
commit | 05335720353d2c56f63a710aa56439789a34b20d (patch) | |
tree | ce820a4d06848c0e833bee4ea0a89f3065edc8a5 /drivers/input/misc/cma3000_d0x.h | |
parent | f97fd41bd9c2950d6476cddfac88bf66f6569d7e (diff) | |
download | kernel_samsung_tuna-05335720353d2c56f63a710aa56439789a34b20d.zip kernel_samsung_tuna-05335720353d2c56f63a710aa56439789a34b20d.tar.gz kernel_samsung_tuna-05335720353d2c56f63a710aa56439789a34b20d.tar.bz2 |
[Blaze] CMA3000 accelerometer:Port CMA3000 k39 driver to k3.0
Port CMA3000 k39 driver to k3.0
Change-Id: Iaf2ab4e6adccd1e8a0ea7209b41ca30ebfe6802b
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
Diffstat (limited to 'drivers/input/misc/cma3000_d0x.h')
-rw-r--r-- | drivers/input/misc/cma3000_d0x.h | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/drivers/input/misc/cma3000_d0x.h b/drivers/input/misc/cma3000_d0x.h index 2304ce3..a96c425 100644 --- a/drivers/input/misc/cma3000_d0x.h +++ b/drivers/input/misc/cma3000_d0x.h @@ -1,8 +1,10 @@ /* + * cma3000_d0x.h * VTI CMA3000_D0x Accelerometer driver * * Copyright (C) 2010 Texas Instruments * Author: Hemanth V <hemanthv@ti.com> + * Contributor: Dan Murphy <dmurphy@ti.com> * * 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 @@ -17,26 +19,35 @@ * this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _INPUT_CMA3000_H -#define _INPUT_CMA3000_H +#ifndef INPUT_CMA3000_H +#define INPUT_CMA3000_H -#include <linux/types.h> +#include <linux/i2c.h> #include <linux/input.h> +#include <linux/workqueue.h> -struct device; -struct cma3000_accl_data; +#include <linux/i2c/cma3000.h> -struct cma3000_bus_ops { - u16 bustype; - u8 ctrl_mod; - int (*read)(struct device *, u8, char *); - int (*write)(struct device *, u8, u8, char *); +struct cma3000_accl_data { +#ifdef CONFIG_INPUT_CMA3000_I2C + struct i2c_client *client; +#endif + struct input_dev *input_dev; + struct cma3000_platform_data pdata; + + struct delayed_work input_work; + + /* mutex for sysfs operations */ + struct mutex mutex; + int bit_to_mg; + int req_poll_rate; }; -struct cma3000_accl_data *cma3000_init(struct device *dev, int irq, - const struct cma3000_bus_ops *bops); -void cma3000_exit(struct cma3000_accl_data *); -void cma3000_suspend(struct cma3000_accl_data *); -void cma3000_resume(struct cma3000_accl_data *); +int cma3000_set(struct cma3000_accl_data *, u8, u8, char *); +int cma3000_read(struct cma3000_accl_data *, u8, char *); +int cma3000_init(struct cma3000_accl_data *); +int cma3000_exit(struct cma3000_accl_data *); +int cma3000_poweron(struct cma3000_accl_data *); +int cma3000_poweroff(struct cma3000_accl_data *); #endif |