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
18711871 break;
18721872
18731873 case EV_ABS:
1874+ input_alloc_absinfo(dev);
1875+ if (!dev->absinfo)
1876+ return;
1877+
18741878 __set_bit(code, dev->absbit);
18751879 break;
18761880
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
455455 }
456456 }
457457
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)
459470 {
460471 struct zforce_ts *ts = dev_id;
461472 struct i2c_client *client = ts->client;
@@ -465,12 +476,10 @@ static irqreturn_t zforce_interrupt(int irq, void *dev_id) · 3 unmodified lines
465476 u8 *payload;
466477
467478 /*
468− * When suspended, emit a wakeup signal if necessary and return.
479+ * When still suspended, return.
469480 * Due to the level-interrupt we will get re-triggered later.
470481 */
471482 if (ts->suspended) {
472− if (device_may_wakeup(&client->dev))
473− pm_wakeup_event(&client->dev, 500);
474483 msleep(20);
475484 return IRQ_HANDLED;
476485 }
@@ -763,8 +772,8 @@ static int zforce_probe(struct i2c_client *client, · 286 unmodified lines
763772 * Therefore we can trigger the interrupt anytime it is low and do
764773 * not need to limit it to the interrupt edge.
765774 */
766− ret = devm_request_threaded_irq(&client->dev, client->irq, NULL,
767− zforce_interrupt,
775+ ret = devm_request_threaded_irq(&client->dev, client->irq,
776+ zforce_irq, zforce_irq_thread,
768777 IRQF_TRIGGER_LOW | IRQF_ONESHOT,
769778 input_dev->name, ts);
770779 if (ret) {
include/uapi/linux/input.h+2−1
@@ -464,7 +464,8 @@ struct input_keymap_entry { · 463 unmodified lines
464464 #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */
465465 #define KEY_DISPLAY_OFF 245 /* display device to off state */
466466
467−#define KEY_WIMAX 246
467+#define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */
468+#define KEY_WIMAX KEY_WWAN
468469 #define KEY_RFKILL 247 /* Key that controls all radios */
469470
470471 #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