1b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V/* 2b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * VTI CMA3000_Dxx Accelerometer driver 3b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * 4b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * Copyright (C) 2010 Texas Instruments 5b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * Author: Hemanth V <hemanthv@ti.com> 6b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * 7b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * This program is free software; you can redistribute it and/or modify it 8b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * under the terms of the GNU General Public License version 2 as published by 9b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * the Free Software Foundation. 10b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * 11b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * This program is distributed in the hope that it will be useful, but WITHOUT 12b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * more details. 15b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * 16b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * You should have received a copy of the GNU General Public License along with 17b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * this program. If not, see <http://www.gnu.org/licenses/>. 18b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V */ 19b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V 20b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#ifndef _LINUX_CMA3000_H 21b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define _LINUX_CMA3000_H 22b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V 23b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_DEFAULT 0 24b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_MEAS100 1 25b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_MEAS400 2 26b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_MEAS40 3 27b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_MOTDET 4 28b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_FF100 5 29b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_FF400 6 30b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMAMODE_POFF 7 31b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V 32b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMARANGE_2G 2000 33b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#define CMARANGE_8G 8000 34b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V 35b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V/** 36b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * struct cma3000_i2c_platform_data - CMA3000 Platform data 37b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @fuzz_x: Noise on X Axis 38b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @fuzz_y: Noise on Y Axis 39b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @fuzz_z: Noise on Z Axis 40b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @g_range: G range in milli g i.e 2000 or 8000 41b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @mode: Operating mode 42b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @mdthr: Motion detect threshold value 43b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @mdfftmr: Motion detect and free fall time value 44b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V * @ffthr: Free fall threshold value 45b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V */ 46b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V 47b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth Vstruct cma3000_platform_data { 48b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V int fuzz_x; 49b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V int fuzz_y; 50b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V int fuzz_z; 51b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V int g_range; 52b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V uint8_t mode; 53b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V uint8_t mdthr; 54b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V uint8_t mdfftmr; 55b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V uint8_t ffthr; 56b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V unsigned long irqflags; 57b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V}; 58b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V 59b029ffafe89cf4b97cf39e0225a5205cbbf9e02fHemanth V#endif 60