Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: rpckbd - fix a leak of the IRQ during init failure
  Input: wacom - add support for Lenovo tablet ID (0xE6)
  Input: i8042 - downgrade selftest error message to dbg()
  Input: synaptics - fix crash in synaptics_module_init()
  Input: spear-keyboard - fix inverted condition in interrupt handler
  Input: uinput - allow for 0/0 min/max on absolute axes.
  Input: sparse-keymap - report KEY_UNKNOWN for unknown scan codes
  Input: sparse-keymap - report scancodes with key events
  Input: h3600_ts_input - fix a spelling error
  Input: wacom - report resolution for pen devices
  Input: wacom - constify wacom_features for a new missed Bamboo models
  • Loading branch information
torvalds committed Apr 5, 2011
2 parents 47e8979 + e28e1d9 commit 899631c
Show file tree
Hide file tree
Showing 9 changed files with 221 additions and 109 deletions.
2 changes: 1 addition & 1 deletion drivers/input/keyboard/spear-keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
u8 sts, val;

sts = readb(kbd->io_base + STATUS_REG);
if (sts & DATA_AVAIL)
if (!(sts & DATA_AVAIL))
return IRQ_NONE;

if (kbd->last_key != KEY_RESERVED) {
Expand Down
6 changes: 5 additions & 1 deletion drivers/input/misc/uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,14 @@ static int uinput_validate_absbits(struct input_dev *dev)
int retval = 0;

for (cnt = 0; cnt < ABS_CNT; cnt++) {
int min, max;
if (!test_bit(cnt, dev->absbit))
continue;

if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) {
min = input_abs_get_min(dev, cnt);
max = input_abs_get_max(dev, cnt);

if ((min != 0 || max != 0) && max <= min) {
printk(KERN_DEBUG
"%s: invalid abs[%02x] min:%d max:%d\n",
UINPUT_NAME, cnt,
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,8 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
},

},
{ }
#endif
{ }
};

static bool broken_olpc_ec;
Expand All @@ -851,8 +851,8 @@ static const struct dmi_system_id __initconst olpc_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
},
},
{ }
#endif
{ }
};

void __init synaptics_module_init(void)
Expand Down
7 changes: 4 additions & 3 deletions drivers/input/serio/i8042.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,15 +869,15 @@ static int i8042_controller_selftest(void)
do {

if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
pr_err("i8042 controller self test timeout\n");
pr_err("i8042 controller selftest timeout\n");
return -ENODEV;
}

if (param == I8042_RET_CTL_TEST)
return 0;

pr_err("i8042 controller selftest failed. (%#x != %#x)\n",
param, I8042_RET_CTL_TEST);
dbg("i8042 controller selftest: %#x != %#x\n",
param, I8042_RET_CTL_TEST);
msleep(50);
} while (i++ < 5);

Expand All @@ -891,6 +891,7 @@ static int i8042_controller_selftest(void)
pr_info("giving up on controller selftest, continuing anyway...\n");
return 0;
#else
pr_err("i8042 controller selftest failed\n");
return -EIO;
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/serio/rpckbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int rpckbd_open(struct serio *port)

if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) {
printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n");
free_irq(IRQ_KEYBOARDRX, NULL);
free_irq(IRQ_KEYBOARDRX, port);
return -EBUSY;
}

Expand Down
14 changes: 14 additions & 0 deletions drivers/input/sparse-keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ int sparse_keymap_setup(struct input_dev *dev,
}
}

if (test_bit(EV_KEY, dev->evbit)) {
__set_bit(KEY_UNKNOWN, dev->keybit);
__set_bit(EV_MSC, dev->evbit);
__set_bit(MSC_SCAN, dev->mscbit);
}

dev->keycode = map;
dev->keycodemax = map_size;
dev->getkeycode = sparse_keymap_getkeycode;
Expand Down Expand Up @@ -268,6 +274,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k
{
switch (ke->type) {
case KE_KEY:
input_event(dev, EV_MSC, MSC_SCAN, ke->code);
input_report_key(dev, ke->keycode, value);
input_sync(dev);
if (value && autorelease) {
Expand Down Expand Up @@ -305,12 +312,19 @@ bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code,
{
const struct key_entry *ke =
sparse_keymap_entry_from_scancode(dev, code);
struct key_entry unknown_ke;

if (ke) {
sparse_keymap_report_entry(dev, ke, value, autorelease);
return true;
}

/* Report an unknown key event as a debugging aid */
unknown_ke.type = KE_KEY;
unknown_ke.code = code;
unknown_ke.keycode = KEY_UNKNOWN;
sparse_keymap_report_entry(dev, &unknown_ke, value, true);

return false;
}
EXPORT_SYMBOL(sparse_keymap_report_event);
Expand Down
291 changes: 191 additions & 100 deletions drivers/input/tablet/wacom_wac.c

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions drivers/input/tablet/wacom_wac.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ struct wacom_features {
int pressure_max;
int distance_max;
int type;
int x_resolution;
int y_resolution;
int device_type;
int x_phy;
int y_phy;
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/h3600_ts_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ MODULE_LICENSE("GPL");
Programmer has no control over these numbers.
TODO there are holes - specifically 1,7,0x0a
*/
#define VERSION_ID 0 /* Get Version (request/respose) */
#define VERSION_ID 0 /* Get Version (request/response) */
#define KEYBD_ID 2 /* Keyboard (event) */
#define TOUCHS_ID 3 /* Touch Screen (event)*/
#define EEPROM_READ_ID 4 /* (request/response) */
Expand Down

0 comments on commit 899631c

Please sign in to comment.