diff options
| -rw-r--r-- | drivers/input/input.c | 4 | ||||
| -rw-r--r-- | drivers/input/touchscreen/zforce_ts.c | 21 | ||||
| -rw-r--r-- | include/uapi/linux/input.h | 3 |
3 files changed, 21 insertions, 7 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 846ccdd905b1..d2965e4b3224 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
| @@ -1871,6 +1871,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int | |||
| 1871 | break; | 1871 | break; |
| 1872 | 1872 | ||
| 1873 | case EV_ABS: | 1873 | case EV_ABS: |
| 1874 | input_alloc_absinfo(dev); | ||
| 1875 | if (!dev->absinfo) | ||
| 1876 | return; | ||
| 1877 | |||
| 1874 | __set_bit(code, dev->absbit); | 1878 | __set_bit(code, dev->absbit); |
| 1875 | break; | 1879 | break; |
| 1876 | 1880 | ||
diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index 75762d6ff3ba..aa127ba392a4 100644 --- a/drivers/input/touchscreen/zforce_ts.c +++ b/drivers/input/touchscreen/zforce_ts.c | |||
| @@ -455,7 +455,18 @@ static void zforce_complete(struct zforce_ts *ts, int cmd, int result) | |||
| 455 | } | 455 | } |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | static irqreturn_t zforce_interrupt(int irq, void *dev_id) | 458 | static irqreturn_t zforce_irq(int irq, void *dev_id) |
| 459 | { | ||
| 460 | struct zforce_ts *ts = dev_id; | ||
| 461 | struct i2c_client *client = ts->client; | ||
| 462 | |||
| 463 | if (ts->suspended && device_may_wakeup(&client->dev)) | ||
| 464 | pm_wakeup_event(&client->dev, 500); | ||
| 465 | |||
| 466 | return IRQ_WAKE_THREAD; | ||
| 467 | } | ||
| 468 | |||
| 469 | static irqreturn_t zforce_irq_thread(int irq, void *dev_id) | ||
| 459 | { | 470 | { |
| 460 | struct zforce_ts *ts = dev_id; | 471 | struct zforce_ts *ts = dev_id; |
| 461 | struct i2c_client *client = ts->client; | 472 | struct i2c_client *client = ts->client; |
| @@ -465,12 +476,10 @@ static irqreturn_t zforce_interrupt(int irq, void *dev_id) | |||
| 465 | u8 *payload; | 476 | u8 *payload; |
| 466 | 477 | ||
| 467 | /* | 478 | /* |
| 468 | * When suspended, emit a wakeup signal if necessary and return. | 479 | * When still suspended, return. |
| 469 | * Due to the level-interrupt we will get re-triggered later. | 480 | * Due to the level-interrupt we will get re-triggered later. |
| 470 | */ | 481 | */ |
| 471 | if (ts->suspended) { | 482 | if (ts->suspended) { |
| 472 | if (device_may_wakeup(&client->dev)) | ||
| 473 | pm_wakeup_event(&client->dev, 500); | ||
| 474 | msleep(20); | 483 | msleep(20); |
| 475 | return IRQ_HANDLED; | 484 | return IRQ_HANDLED; |
| 476 | } | 485 | } |
| @@ -763,8 +772,8 @@ static int zforce_probe(struct i2c_client *client, | |||
| 763 | * Therefore we can trigger the interrupt anytime it is low and do | 772 | * Therefore we can trigger the interrupt anytime it is low and do |
| 764 | * not need to limit it to the interrupt edge. | 773 | * not need to limit it to the interrupt edge. |
| 765 | */ | 774 | */ |
| 766 | ret = devm_request_threaded_irq(&client->dev, client->irq, NULL, | 775 | ret = devm_request_threaded_irq(&client->dev, client->irq, |
| 767 | zforce_interrupt, | 776 | zforce_irq, zforce_irq_thread, |
| 768 | IRQF_TRIGGER_LOW | IRQF_ONESHOT, | 777 | IRQF_TRIGGER_LOW | IRQF_ONESHOT, |
| 769 | input_dev->name, ts); | 778 | input_dev->name, ts); |
| 770 | if (ret) { | 779 | if (ret) { |
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index ecc88592ecbe..bd24470d24a2 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h | |||
| @@ -464,7 +464,8 @@ struct input_keymap_entry { | |||
| 464 | #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ | 464 | #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ |
| 465 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | 465 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ |
| 466 | 466 | ||
| 467 | #define KEY_WIMAX 246 | 467 | #define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ |
| 468 | #define KEY_WIMAX KEY_WWAN | ||
| 468 | #define KEY_RFKILL 247 /* Key that controls all radios */ | 469 | #define KEY_RFKILL 247 /* Key that controls all radios */ |
| 469 | 470 | ||
| 470 | #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ | 471 | #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ |
