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 */ |
Daeseok Youn | 0204c58 | 2014-02-10 14:38:05 +0900 | [diff] [blame] | 23 | void (*enable)(struct timed_output_dev *sdev, int timeout); |
Greg Kroah-Hartman | 355b050 | 2011-11-30 20:18:14 +0900 | [diff] [blame] | 24 | |
| 25 | /* returns the current number of milliseconds remaining on the timer */ |
Daeseok Youn | 0204c58 | 2014-02-10 14:38:05 +0900 | [diff] [blame] | 26 | int (*get_time)(struct timed_output_dev *sdev); |
Greg Kroah-Hartman | 355b050 | 2011-11-30 20:18:14 +0900 | [diff] [blame] | 27 | |
| 28 | /* private data */ |
| 29 | struct device *dev; |
| 30 | int index; |
| 31 | int state; |
| 32 | }; |
| 33 | |
Bojan Prtvar | cb75d53 | 2013-09-02 13:56:19 +0200 | [diff] [blame] | 34 | int timed_output_dev_register(struct timed_output_dev *dev); |
| 35 | void timed_output_dev_unregister(struct timed_output_dev *dev); |
Greg Kroah-Hartman | 355b050 | 2011-11-30 20:18:14 +0900 | [diff] [blame] | 36 | |
| 37 | #endif |