cma3000_d0x.txt 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. Kernel driver for CMA3000-D0x
  2. ============================
  3. Supported chips:
  4. * VTI CMA3000-D0x
  5. Datasheet:
  6. CMA3000-D0X Product Family Specification 8281000A.02.pdf
  7. <http://www.vti.fi/en/>
  8. Author: Hemanth V <hemanthv@ti.com>
  9. Description
  10. -----------
  11. CMA3000 Tri-axis accelerometer supports Motion detect, Measurement and
  12. Free fall modes.
  13. Motion Detect Mode: Its the low power mode where interrupts are generated only
  14. when motion exceeds the defined thresholds.
  15. Measurement Mode: This mode is used to read the acceleration data on X,Y,Z
  16. axis and supports 400, 100, 40 Hz sample frequency.
  17. Free fall Mode: This mode is intended to save system resources.
  18. Threshold values: Chip supports defining threshold values for above modes
  19. which includes time and g value. Refer product specifications for more details.
  20. CMA3000 chip supports mutually exclusive I2C and SPI interfaces for
  21. communication, currently the driver supports I2C based communication only.
  22. Initial configuration for bus mode is set in non volatile memory and can later
  23. be modified through bus interface command.
  24. Driver reports acceleration data through input subsystem. It generates ABS_MISC
  25. event with value 1 when free fall is detected.
  26. Platform data need to be configured for initial default values.
  27. Platform Data
  28. -------------
  29. fuzz_x: Noise on X Axis
  30. fuzz_y: Noise on Y Axis
  31. fuzz_z: Noise on Z Axis
  32. g_range: G range in milli g i.e 2000 or 8000
  33. mode: Default Operating mode
  34. mdthr: Motion detect g range threshold value
  35. mdfftmr: Motion detect and free fall time threshold value
  36. ffthr: Free fall g range threshold value
  37. Input Interface
  38. --------------
  39. Input driver version is 1.0.0
  40. Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
  41. Input device name: "cma3000-accelerometer"
  42. Supported events:
  43. Event type 0 (Sync)
  44. Event type 3 (Absolute)
  45. Event code 0 (X)
  46. Value 47
  47. Min -8000
  48. Max 8000
  49. Fuzz 200
  50. Event code 1 (Y)
  51. Value -28
  52. Min -8000
  53. Max 8000
  54. Fuzz 200
  55. Event code 2 (Z)
  56. Value 905
  57. Min -8000
  58. Max 8000
  59. Fuzz 200
  60. Event code 40 (Misc)
  61. Value 0
  62. Min 0
  63. Max 1
  64. Event type 4 (Misc)
  65. Register/Platform parameters Description
  66. ----------------------------------------
  67. mode:
  68. 0: power down mode
  69. 1: 100 Hz Measurement mode
  70. 2: 400 Hz Measurement mode
  71. 3: 40 Hz Measurement mode
  72. 4: Motion Detect mode (default)
  73. 5: 100 Hz Free fall mode
  74. 6: 40 Hz Free fall mode
  75. 7: Power off mode
  76. grange:
  77. 2000: 2000 mg or 2G Range
  78. 8000: 8000 mg or 8G Range
  79. mdthr:
  80. X: X * 71mg (8G Range)
  81. X: X * 18mg (2G Range)
  82. mdfftmr:
  83. X: (X & 0x70) * 100 ms (MDTMR)
  84. (X & 0x0F) * 2.5 ms (FFTMR 400 Hz)
  85. (X & 0x0F) * 10 ms (FFTMR 100 Hz)
  86. ffthr:
  87. X: (X >> 2) * 18mg (2G Range)
  88. X: (X & 0x0F) * 71 mg (8G Range)