Greg Kroah-Hartman | 355b050 | 2011-11-30 20:18:14 +0900 | [diff] [blame] | 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 | |
| 16 | #ifndef _LINUX_TIMED_OUTPUT_H |
| 17 | #define _LINUX_TIMED_OUTPUT_H |
| 18 | |
| 19 | struct timed_output_dev { |
| 20 | const char *name; |
| 21 | |
| 22 | /* enable the output and set the timer */ |
| 23 | void (*enable)(struct timed_output_dev *sdev, int timeout); |
| 24 | |
| 25 | /* returns the current number of milliseconds remaining on the timer */ |
| 26 | int (*get_time)(struct timed_output_dev *sdev); |
| 27 | |
| 28 | /* private data */ |
| 29 | struct device *dev; |
| 30 | int index; |
| 31 | int state; |
| 32 | }; |
| 33 | |
| 34 | extern int timed_output_dev_register(struct timed_output_dev *dev); |
| 35 | extern void timed_output_dev_unregister(struct timed_output_dev *dev); |
| 36 | |
| 37 | #endif |