qcom,hv-haptics.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020 The Linux Foundation. All rights reserved.
  4. */
  5. /* definitions for drive waveform shape */
  6. #define WF_SQUARE 0 /* LRA only */
  7. #define WF_SINE 1 /* LRA only */
  8. #define WF_NO_MODULATION 2 /* ERM only */
  9. /* definitions for brake mode */
  10. #define BRAKE_OPEN_LOOP 0
  11. #define BRAKE_CLOSE_LOOP 1
  12. #define BRAKE_PREDICTIVE 2
  13. #define BRAKE_AUTO 3
  14. /* definitions for brake sine signal gain */
  15. #define BRAKE_SINE_GAIN_X1 0
  16. #define BRAKE_SINE_GAIN_X2 1
  17. #define BRAKE_SINE_GAIN_X4 2
  18. #define BRAKE_SINE_GAIN_X8 3
  19. /* definitions for pattern sample period */
  20. #define S_PERIOD_T_LRA 0
  21. #define S_PERIOD_T_LRA_DIV_2 1
  22. #define S_PERIOD_T_LRA_DIV_4 2
  23. #define S_PERIOD_T_LRA_DIV_8 3
  24. #define S_PERIOD_T_LRA_X_2 4
  25. #define S_PERIOD_T_LRA_X_4 5
  26. #define S_PERIOD_T_LRA_X_8 6
  27. /* F_8KHZ to F_48KHZ periods can only be specified for FIFO based effects */
  28. #define S_PERIOD_F_8KHZ 8
  29. #define S_PERIOD_F_16KHZ 9
  30. #define S_PERIOD_F_24KHZ 10
  31. #define S_PERIOD_F_32KHZ 11
  32. #define S_PERIOD_F_44P1KHZ 12
  33. #define S_PERIOD_F_48KHZ 13