vibrator.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef __PMIC8XXX_VIBRATOR_H__
  13. #define __PMIC8XXX_VIBRATOR_H__
  14. #define PM8XXX_VIBRATOR_DEV_NAME "pm8xxx-vib"
  15. enum pm8xxx_vib_en_mode {
  16. PM8XXX_VIB_MANUAL,
  17. PM8XXX_VIB_DTEST1,
  18. PM8XXX_VIB_DTEST2,
  19. PM8XXX_VIB_DTEST3
  20. };
  21. struct pm8xxx_vib_config {
  22. u16 drive_mV;
  23. u8 active_low;
  24. enum pm8xxx_vib_en_mode enable_mode;
  25. };
  26. struct pm8xxx_vibrator_platform_data {
  27. int initial_vibrate_ms;
  28. int max_timeout_ms;
  29. int level_mV;
  30. };
  31. int pm8xxx_vibrator_config(struct pm8xxx_vib_config *vib_config);
  32. #endif /* __PMIC8XXX_VIBRATOR_H__ */