android_kernel_google_msm/include/linux/keyreset.h
Dima Zavin e60b38622e input: keyreset: add support for reset after timeout
If a timeout is requested, a delayed work item will be
scheduled to restart the device. If the keys are released
before the timeout expires, the reset is aborted.

As expected, the reset_fn can be used to reset the device
after the timeout.

Bug: 7344361
Change-Id: I1d77cdb3dcc63f579b1250506f0a30de1e033d67
Signed-off-by: Dima Zavin <dima@android.com>
2013-03-04 12:47:30 -08:00

29 lines
831 B
C

/*
* include/linux/keyreset.h - platform data structure for resetkeys driver
*
* 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_KEYRESET_H
#define _LINUX_KEYRESET_H
#define KEYRESET_NAME "keyreset"
struct keyreset_platform_data {
int (*reset_fn)(void);
int down_time_ms;
int *keys_up;
int keys_down[]; /* 0 terminated */
};
#endif /* _LINUX_KEYRESET_H */