mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
add one interface to sending KEY_POWER event in rk29_key.c
This commit is contained in:
parent
0b96f0d2db
commit
2ecb4417dc
|
|
@ -59,6 +59,17 @@ struct rk29_keys_drvdata {
|
|||
|
||||
static struct input_dev *input_dev;
|
||||
|
||||
void rk29_send_power_key(void)
|
||||
{
|
||||
if (!input_dev)
|
||||
return;
|
||||
|
||||
input_report_key(input_dev, KEY_POWER, 1);
|
||||
input_sync(input_dev);
|
||||
input_report_key(input_dev, KEY_POWER, 0);
|
||||
input_sync(input_dev);
|
||||
}
|
||||
|
||||
void rk28_send_wakeup_key(void)
|
||||
{
|
||||
if (!input_dev)
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ static int wm831x_init(struct wm831x *wm831x)
|
|||
|
||||
}
|
||||
|
||||
extern void rk28_send_wakeup_key(void);
|
||||
extern void rk29_send_power_key(void);
|
||||
static int gNumInt = 0;
|
||||
|
||||
static void wm831x_irq_worker(struct work_struct *work)
|
||||
|
|
@ -542,7 +542,7 @@ static void wm831x_irq_worker(struct work_struct *work)
|
|||
|
||||
if(++ gNumInt >= 2)
|
||||
{
|
||||
rk28_send_wakeup_key();
|
||||
rk29_send_power_key();
|
||||
//wake_lock_timeout(&wm831x->irq_wake,msecs_to_jiffies(2000));
|
||||
gNumInt = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user