cma3000.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * VTI CMA3000_Dxx Accelerometer driver
  4. *
  5. * Copyright (C) 2010 Texas Instruments
  6. * Author: Hemanth V <[email protected]>
  7. */
  8. #ifndef _LINUX_CMA3000_H
  9. #define _LINUX_CMA3000_H
  10. #define CMAMODE_DEFAULT 0
  11. #define CMAMODE_MEAS100 1
  12. #define CMAMODE_MEAS400 2
  13. #define CMAMODE_MEAS40 3
  14. #define CMAMODE_MOTDET 4
  15. #define CMAMODE_FF100 5
  16. #define CMAMODE_FF400 6
  17. #define CMAMODE_POFF 7
  18. #define CMARANGE_2G 2000
  19. #define CMARANGE_8G 8000
  20. /**
  21. * struct cma3000_i2c_platform_data - CMA3000 Platform data
  22. * @fuzz_x: Noise on X Axis
  23. * @fuzz_y: Noise on Y Axis
  24. * @fuzz_z: Noise on Z Axis
  25. * @g_range: G range in milli g i.e 2000 or 8000
  26. * @mode: Operating mode
  27. * @mdthr: Motion detect threshold value
  28. * @mdfftmr: Motion detect and free fall time value
  29. * @ffthr: Free fall threshold value
  30. */
  31. struct cma3000_platform_data {
  32. int fuzz_x;
  33. int fuzz_y;
  34. int fuzz_z;
  35. int g_range;
  36. uint8_t mode;
  37. uint8_t mdthr;
  38. uint8_t mdfftmr;
  39. uint8_t ffthr;
  40. unsigned long irqflags;
  41. };
  42. #endif