diff options
author | Mike Lockwood | 2009-05-05 00:48:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2009-06-19 20:00:52 +0200 |
commit | 241e12879be74fdfadf3abc820a2e3c455599c3c (patch) | |
tree | 372fcd1160d940dae9487da97c8bee46da3791e3 /drivers/staging/android/timed_output.h | |
parent | Staging: android: lowmemorykiller: fix possible android low memory killer NUL... (diff) | |
download | kernel-qcow2-linux-241e12879be74fdfadf3abc820a2e3c455599c3c.tar.gz kernel-qcow2-linux-241e12879be74fdfadf3abc820a2e3c455599c3c.tar.xz kernel-qcow2-linux-241e12879be74fdfadf3abc820a2e3c455599c3c.zip |
Staging: android: timed_gpio: Separate timed_output class into a separate driver.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/android/timed_output.h')
-rw-r--r-- | drivers/staging/android/timed_output.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/staging/android/timed_output.h b/drivers/staging/android/timed_output.h new file mode 100644 index 000000000000..ec907ab2ff54 --- /dev/null +++ b/drivers/staging/android/timed_output.h @@ -0,0 +1,37 @@ +/* include/linux/timed_output.h + * + * Copyright (C) 2008 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +*/ + +#ifndef _LINUX_TIMED_OUTPUT_H +#define _LINUX_TIMED_OUTPUT_H + +struct timed_output_dev { + const char *name; + + /* enable the output and set the timer */ + void (*enable)(struct timed_output_dev *sdev, int timeout); + + /* returns the current number of milliseconds remaining on the timer */ + int (*get_time)(struct timed_output_dev *sdev); + + /* private data */ + struct device *dev; + int index; + int state; +}; + +extern int timed_output_dev_register(struct timed_output_dev *dev); +extern void timed_output_dev_unregister(struct timed_output_dev *dev); + +#endif |