lkml.org 
[lkml]   [2012]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 2/2] Input: twl4030-pwrbutton: report a wakeup_event on button press.
    As the power button causes a wake from suspend, we need to register
    the event with the pm sustem to avoid racing with suspend.

    As the input event is reported in the interrupt handler, as simple
    pm_wakeup_event() is sufficient.

    Signed-off-by: NeilBrown <neilb@suse.de>
    ---

    drivers/input/misc/twl4030-pwrbutton.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
    index 38e4b50..b3dd96d 100644
    --- a/drivers/input/misc/twl4030-pwrbutton.c
    +++ b/drivers/input/misc/twl4030-pwrbutton.c
    @@ -42,6 +42,7 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
    err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
    STS_HW_CONDITIONS);
    if (!err) {
    + pm_wakeup_event(pwr->dev.parent, 0);
    input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ);
    input_sync(pwr);
    } else {



    \
     
     \ /
      Last update: 2012-07-30 04:01    [W:0.023 / U:0.832 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site