timed_output.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* include/linux/timed_output.h
  2. *
  3. * Copyright (C) 2008 Google, Inc.
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. */
  15. #ifndef _LINUX_TIMED_OUTPUT_H
  16. #define _LINUX_TIMED_OUTPUT_H
  17. struct timed_output_dev {
  18. const char *name;
  19. /* enable the output and set the timer */
  20. void (*enable)(struct timed_output_dev *sdev, int timeout);
  21. /* returns the current number of milliseconds remaining on the timer */
  22. int (*get_time)(struct timed_output_dev *sdev);
  23. /* private data */
  24. struct device *dev;
  25. int index;
  26. int state;
  27. };
  28. extern int timed_output_dev_register(struct timed_output_dev *dev);
  29. extern void timed_output_dev_unregister(struct timed_output_dev *dev);
  30. #endif