twl4030-pwrbutton.c (681e4a5e13c1c8315694eb4f44e0cdd84c9082d2) twl4030-pwrbutton.c (112b51cfa21714d001e5b3e3f7c1f13146906a5d)
1/**
2 * twl4030-pwrbutton.c - TWL4030 Power Button Input Driver
3 *
4 * Copyright (C) 2008-2009 Nokia Corporation
5 *
6 * Written by Peter De Schrijver <peter.de-schrijver@nokia.com>
7 * Several fixes by Felipe Balbi <felipe.balbi@nokia.com>
8 *

--- 28 unchanged lines hidden (view full) ---

37{
38 struct input_dev *pwr = _pwr;
39 int err;
40 u8 value;
41
42 err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
43 STS_HW_CONDITIONS);
44 if (!err) {
1/**
2 * twl4030-pwrbutton.c - TWL4030 Power Button Input Driver
3 *
4 * Copyright (C) 2008-2009 Nokia Corporation
5 *
6 * Written by Peter De Schrijver <peter.de-schrijver@nokia.com>
7 * Several fixes by Felipe Balbi <felipe.balbi@nokia.com>
8 *

--- 28 unchanged lines hidden (view full) ---

37{
38 struct input_dev *pwr = _pwr;
39 int err;
40 u8 value;
41
42 err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
43 STS_HW_CONDITIONS);
44 if (!err) {
45 pm_wakeup_event(pwr->dev.parent, 0);
45 input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ);
46 input_sync(pwr);
47 } else {
48 dev_err(pwr->dev.parent, "twl4030: i2c error %d while reading"
49 " TWL4030 PM_MASTER STS_HW_CONDITIONS register\n", err);
50 }
51
52 return IRQ_HANDLED;

--- 83 unchanged lines hidden ---
46 input_report_key(pwr, KEY_POWER, value & PWR_PWRON_IRQ);
47 input_sync(pwr);
48 } else {
49 dev_err(pwr->dev.parent, "twl4030: i2c error %d while reading"
50 " TWL4030 PM_MASTER STS_HW_CONDITIONS register\n", err);
51 }
52
53 return IRQ_HANDLED;

--- 83 unchanged lines hidden ---