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: wacom - add support for new USB Tablet PCs
  Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback
  Input: i8042 - add Compal Hel80 laptop to nomux blacklist
  Input: cm109 - add keymap for ATCom AU-100 phone
  Input: fix the example of an input device driver
  Input: psmouse - fix incorrect validate_byte check in OLPC protocol
  Input: atkbd - cancel delayed work before freeing its structure
  Input: atkbd - add keymap quirk for Inventec Symphony systems
  Input: i8042 - add Dell XPS M1530 to nomux list
  Input: elo - fix format string in elo driver
  • Loading branch information
Linus Torvalds committed Nov 30, 2008
2 parents 96b8936 + 545f4e9 commit b31a0fe
Show file tree
Hide file tree
Showing 10 changed files with 436 additions and 54 deletions.
3 changes: 2 additions & 1 deletion Documentation/input/input-programming.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ pressed or released a BUTTON_IRQ happens. The driver could look like:

static struct input_dev *button_dev;

static void button_interrupt(int irq, void *dummy, struct pt_regs *fp)
static irqreturn_t button_interrupt(int irq, void *dummy)
{
input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1);
input_sync(button_dev);
return IRQ_HANDLED;
}

static int __init button_init(void)
Expand Down
27 changes: 26 additions & 1 deletion drivers/input/keyboard/atkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ static void atkbd_disconnect(struct serio *serio)
atkbd_disable(atkbd);

/* make sure we don't have a command in flight */
flush_scheduled_work();
cancel_delayed_work_sync(&atkbd->event_work);

sysfs_remove_group(&serio->dev.kobj, &atkbd_attribute_group);
input_unregister_device(atkbd->dev);
Expand Down Expand Up @@ -867,6 +867,22 @@ static void atkbd_hp_keymap_fixup(struct atkbd *atkbd)
atkbd->force_release_mask);
}

/*
* Inventec system with broken key release on volume keys
*/
static void atkbd_inventec_keymap_fixup(struct atkbd *atkbd)
{
const unsigned int forced_release_keys[] = {
0xae, 0xb0,
};
int i;

if (atkbd->set == 2)
for (i = 0; i < ARRAY_SIZE(forced_release_keys); i++)
__set_bit(forced_release_keys[i],
atkbd->force_release_mask);
}

/*
* atkbd_set_keycode_table() initializes keyboard's keycode table
* according to the selected scancode set
Expand Down Expand Up @@ -1468,6 +1484,15 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = {
.callback = atkbd_setup_fixup,
.driver_data = atkbd_hp_keymap_fixup,
},
{
.ident = "Inventec Symphony",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "INVENTEC"),
DMI_MATCH(DMI_PRODUCT_NAME, "SYMPHONY 6.0/7.0"),
},
.callback = atkbd_setup_fixup,
.driver_data = atkbd_inventec_keymap_fixup,
},
{ }
};

Expand Down
37 changes: 36 additions & 1 deletion drivers/input/misc/cm109.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

static char *phone = "kip1000";
module_param(phone, charp, S_IRUSR);
MODULE_PARM_DESC(phone, "Phone name {kip1000, gtalk, usbph01}");
MODULE_PARM_DESC(phone, "Phone name {kip1000, gtalk, usbph01, atcom}");

enum {
/* HID Registers */
Expand Down Expand Up @@ -258,6 +258,37 @@ static unsigned short keymap_usbph01(int scancode)
}
}

/*
* Keymap for ATCom AU-100
* http://www.atcom.cn/En_products_AU100.html
* http://www.packetizer.com/products/au100/
* http://www.voip-info.org/wiki/view/AU-100
*
* Contributed by daniel@gimpelevich.san-francisco.ca.us
*/
static unsigned short keymap_atcom(int scancode)
{
switch (scancode) { /* phone key: */
case 0x82: return KEY_NUMERIC_0; /* 0 */
case 0x11: return KEY_NUMERIC_1; /* 1 */
case 0x12: return KEY_NUMERIC_2; /* 2 */
case 0x14: return KEY_NUMERIC_3; /* 3 */
case 0x21: return KEY_NUMERIC_4; /* 4 */
case 0x22: return KEY_NUMERIC_5; /* 5 */
case 0x24: return KEY_NUMERIC_6; /* 6 */
case 0x41: return KEY_NUMERIC_7; /* 7 */
case 0x42: return KEY_NUMERIC_8; /* 8 */
case 0x44: return KEY_NUMERIC_9; /* 9 */
case 0x84: return KEY_NUMERIC_POUND; /* # */
case 0x81: return KEY_NUMERIC_STAR; /* * */
case 0x18: return KEY_ENTER; /* pickup */
case 0x28: return KEY_ESC; /* hangup */
case 0x48: return KEY_LEFT; /* left arrow */
case 0x88: return KEY_RIGHT; /* right arrow */
default: return special_keymap(scancode);
}
}

static unsigned short (*keymap)(int) = keymap_kip1000;

/*
Expand Down Expand Up @@ -840,6 +871,10 @@ static int __init cm109_select_keymap(void)
keymap = keymap_usbph01;
printk(KERN_INFO KBUILD_MODNAME ": "
"Keymap for Allied-Telesis Corega USBPH01 phone loaded\n");
} else if (!strcasecmp(phone, "atcom")) {
keymap = keymap_atcom;
printk(KERN_INFO KBUILD_MODNAME ": "
"Keymap for ATCom AU-100 phone loaded\n");
} else {
printk(KERN_ERR KBUILD_MODNAME ": "
"Unsupported phone: %s\n", phone);
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/mouse/hgpk.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void hgpk_spewing_hack(struct psmouse *psmouse,
*/
static int hgpk_validate_byte(unsigned char *packet)
{
return (packet[0] & 0x0C) == 0x08;
return (packet[0] & 0x0C) != 0x08;
}

static void hgpk_process_packet(struct psmouse *psmouse)
Expand Down
14 changes: 14 additions & 0 deletions drivers/input/serio/i8042-x86ia64io.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,20 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "2656"),
},
},
{
.ident = "Dell XPS M1530",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"),
},
},
{
.ident = "Compal HEL80I",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"),
DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"),
},
},
{ }
};

Expand Down
13 changes: 7 additions & 6 deletions drivers/input/tablet/wacom.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
* - Support Intuos3 4x6
* v1.47 (pc) - Added support for Bamboo
* v1.48 (pc) - Added support for Bamboo1, BambooFun, and Cintiq 12WX
* v1.49 (pc) - Added support for USB Tablet PC (0x90, 0x93, and 0x9A)
*/

/*
Expand All @@ -86,7 +87,7 @@
/*
* Version Information
*/
#define DRIVER_VERSION "v1.48"
#define DRIVER_VERSION "v1.49"
#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
#define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
#define DRIVER_LICENSE "GPL"
Expand All @@ -103,15 +104,15 @@ struct wacom {
struct usb_device *usbdev;
struct usb_interface *intf;
struct urb *irq;
struct wacom_wac * wacom_wac;
struct wacom_wac *wacom_wac;
struct mutex lock;
unsigned int open:1;
char phys[32];
};

struct wacom_combo {
struct wacom * wacom;
struct urb * urb;
struct wacom *wacom;
struct urb *urb;
};

extern int wacom_wac_irq(struct wacom_wac * wacom_wac, void * wcombo);
Expand All @@ -132,7 +133,7 @@ extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wa
extern void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern __u16 wacom_le16_to_cpu(unsigned char *data);
extern __u16 wacom_be16_to_cpu(unsigned char *data);
extern struct wacom_features * get_wacom_feature(const struct usb_device_id *id);
extern const struct usb_device_id * get_device_table(void);
extern struct wacom_features *get_wacom_feature(const struct usb_device_id *id);
extern const struct usb_device_id *get_device_table(void);

#endif
Loading

0 comments on commit b31a0fe

Please sign in to comment.