blob: 13d2ca51cbe80c8ce3bd8cdda069142a8bbba910 [file] [log] [blame]
Greg Kroah-Hartman355b0502011-11-30 20:18:14 +09001/* 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
19struct timed_output_dev {
20 const char *name;
21
22 /* enable the output and set the timer */
Daeseok Youn0204c582014-02-10 14:38:05 +090023 void (*enable)(struct timed_output_dev *sdev, int timeout);
Greg Kroah-Hartman355b0502011-11-30 20:18:14 +090024
25 /* returns the current number of milliseconds remaining on the timer */
Daeseok Youn0204c582014-02-10 14:38:05 +090026 int (*get_time)(struct timed_output_dev *sdev);
Greg Kroah-Hartman355b0502011-11-30 20:18:14 +090027
28 /* private data */
29 struct device *dev;
30 int index;
31 int state;
32};
33
Bojan Prtvarcb75d532013-09-02 13:56:19 +020034int timed_output_dev_register(struct timed_output_dev *dev);
35void timed_output_dev_unregister(struct timed_output_dev *dev);
Greg Kroah-Hartman355b0502011-11-30 20:18:14 +090036
37#endif