Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * VTI CMA3000_Dxx Accelerometer driver
0004  *
0005  * Copyright (C) 2010 Texas Instruments
0006  * Author: Hemanth V <hemanthv@ti.com>
0007  */
0008 
0009 #ifndef _LINUX_CMA3000_H
0010 #define _LINUX_CMA3000_H
0011 
0012 #define CMAMODE_DEFAULT    0
0013 #define CMAMODE_MEAS100    1
0014 #define CMAMODE_MEAS400    2
0015 #define CMAMODE_MEAS40     3
0016 #define CMAMODE_MOTDET     4
0017 #define CMAMODE_FF100      5
0018 #define CMAMODE_FF400      6
0019 #define CMAMODE_POFF       7
0020 
0021 #define CMARANGE_2G   2000
0022 #define CMARANGE_8G   8000
0023 
0024 /**
0025  * struct cma3000_i2c_platform_data - CMA3000 Platform data
0026  * @fuzz_x: Noise on X Axis
0027  * @fuzz_y: Noise on Y Axis
0028  * @fuzz_z: Noise on Z Axis
0029  * @g_range: G range in milli g i.e 2000 or 8000
0030  * @mode: Operating mode
0031  * @mdthr: Motion detect threshold value
0032  * @mdfftmr: Motion detect and free fall time value
0033  * @ffthr: Free fall threshold value
0034  */
0035 
0036 struct cma3000_platform_data {
0037     int fuzz_x;
0038     int fuzz_y;
0039     int fuzz_z;
0040     int g_range;
0041     uint8_t mode;
0042     uint8_t mdthr;
0043     uint8_t mdfftmr;
0044     uint8_t ffthr;
0045     unsigned long irqflags;
0046 };
0047 
0048 #endif