History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov: "A fix for a panic in gpio-keys driver when set up with absolute events, a fixup to the new zforce driver and a new keycode definition" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: allocate absinfo data when setting ABS capability Input: define KEY_WWAN for Wireless WAN Input: zforce - fix possible driver hang during suspend

Linus Torvalds committed 12 years ago

Commit 6b8c9822 parents 03bdeda 28a2a2e3 files · +21 −7Browse files

Unified · Split

3 files
  1. drivers/input/input.c +4 −0
  2. drivers/input/touchscreen/zforce_ts.c +15 −6
  3. include/uapi/linux/input.h +2 −1
drivers/input/input.c+4−0
@@ -1871,6 +1871,10 @@ void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int · 1870 unmodified lines
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
drivers/input/touchscreen/zforce_ts.c+15−6
@@ -455,7 +455,18 @@ static void zforce_complete(struct zforce_ts *ts, int cmd, int result) · 454 unmodified lines
455 }455 }
456}456}
457 457
458static irqreturn_t zforce_interrupt(int irq, void *dev_id)458static 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
469static 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) · 3 unmodified lines
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, · 286 unmodified lines
763 * Therefore we can trigger the interrupt anytime it is low and do772 * 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) {
include/uapi/linux/input.h+2−1
@@ -464,7 +464,8 @@ struct input_keymap_entry { · 463 unmodified lines
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 246467#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 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t