mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 09:22:37 +00:00
b029ffafe8
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>
43 lines
1.2 KiB
C
43 lines
1.2 KiB
C
/*
|
|
* VTI CMA3000_D0x Accelerometer driver
|
|
*
|
|
* Copyright (C) 2010 Texas Instruments
|
|
* Author: Hemanth V <hemanthv@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
|
|
* the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef _INPUT_CMA3000_H
|
|
#define _INPUT_CMA3000_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/input.h>
|
|
|
|
struct device;
|
|
struct cma3000_accl_data;
|
|
|
|
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 *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 *);
|
|
|
|
#endif
|