cma3000.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * VTI CMA3000_Dxx 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. #ifndef _LINUX_CMA3000_H
  20. #define _LINUX_CMA3000_H
  21. #define CMAMODE_DEFAULT 0
  22. #define CMAMODE_MEAS100 1
  23. #define CMAMODE_MEAS400 2
  24. #define CMAMODE_MEAS40 3
  25. #define CMAMODE_MOTDET 4
  26. #define CMAMODE_FF100 5
  27. #define CMAMODE_FF400 6
  28. #define CMAMODE_POFF 7
  29. #define CMARANGE_2G 2000
  30. #define CMARANGE_8G 8000
  31. /**
  32. * struct cma3000_i2c_platform_data - CMA3000 Platform data
  33. * @fuzz_x: Noise on X Axis
  34. * @fuzz_y: Noise on Y Axis
  35. * @fuzz_z: Noise on Z Axis
  36. * @g_range: G range in milli g i.e 2000 or 8000
  37. * @mode: Operating mode
  38. * @mdthr: Motion detect threshold value
  39. * @mdfftmr: Motion detect and free fall time value
  40. * @ffthr: Free fall threshold value
  41. */
  42. struct cma3000_platform_data {
  43. int fuzz_x;
  44. int fuzz_y;
  45. int fuzz_z;
  46. int g_range;
  47. uint8_t mode;
  48. uint8_t mdthr;
  49. uint8_t mdfftmr;
  50. uint8_t ffthr;
  51. unsigned long irqflags;
  52. };
  53. #endif