bfin_simple_timer.h 949 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright 2006-2008 Analog Devices Inc.
  3. *
  4. * Licensed under the GPL-2 or later.
  5. */
  6. #ifndef _bfin_simple_timer_h_
  7. #define _bfin_simple_timer_h_
  8. #include <linux/ioctl.h>
  9. #define BFIN_SIMPLE_TIMER_IOCTL_MAGIC 't'
  10. #define BFIN_SIMPLE_TIMER_SET_PERIOD _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 2)
  11. #define BFIN_SIMPLE_TIMER_SET_WIDTH _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 3)
  12. #define BFIN_SIMPLE_TIMER_SET_MODE _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 4)
  13. #define BFIN_SIMPLE_TIMER_START _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 6)
  14. #define BFIN_SIMPLE_TIMER_STOP _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 8)
  15. #define BFIN_SIMPLE_TIMER_READ _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 10)
  16. #define BFIN_SIMPLE_TIMER_READ_COUNTER _IO(BFIN_SIMPLE_TIMER_IOCTL_MAGIC, 11)
  17. #define BFIN_SIMPLE_TIMER_MODE_PWM_ONESHOT 0
  18. #define BFIN_SIMPLE_TIMER_MODE_PWMOUT_CONT 1
  19. #define BFIN_SIMPLE_TIMER_MODE_WDTH_CAP 2
  20. #define BFIN_SIMPLE_TIMER_MODE_PWMOUT_CONT_NOIRQ 3
  21. #endif