Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93227
b: refs/heads/master
c: 8a0f83e
h: refs/heads/master
i:
  93225: 11ca75a
  93223: 2e1f3ac
v: v3
  • Loading branch information
Anssi Hannula authored and Dmitry Torokhov committed Apr 3, 2008
1 parent d92960d commit 7ce9708
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 2,843 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5550fbaeb3cc88fe2982e9b5351073173d733f30
refs/heads/master: 8a0f83eacc1bb8899094b17483de95ddf2d8fcc6
10 changes: 0 additions & 10 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4343,16 +4343,6 @@ L: linux-wireless@vger.kernel.org
W: http://oops.ghostprotocols.net:81/blog
S: Maintained

WM97XX TOUCHSCREEN DRIVERS
P: Mark Brown
M: broonie@opensource.wolfsonmicro.com
P: Liam Girdwood
M: liam.girdwood@wolfsonmicro.com
L: linux-input@vger.kernel.org
T: git git://opensource.wolfsonmicro.com/linux-2.6-touch
W: http://opensource.wolfsonmicro.com/node/7
S: Supported

X.25 NETWORK LAYER
P: Henner Eisen
M: eis@baty.hanse.de
Expand Down
21 changes: 16 additions & 5 deletions trunk/drivers/input/joystick/xpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@

#define XTYPE_XBOX 0
#define XTYPE_XBOX360 1
#define XTYPE_UNKNOWN 2

static int dpad_to_buttons;
module_param(dpad_to_buttons, bool, S_IRUGO);
Expand Down Expand Up @@ -138,7 +139,7 @@ static const struct xpad_device {
{ 0x1430, 0x8888, "TX6500+ Dance Pad (first generation)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX },
{ 0x045e, 0x028e, "Microsoft X-Box 360 pad", MAP_DPAD_TO_AXES, XTYPE_XBOX360 },
{ 0xffff, 0xffff, "Chinese-made Xbox Controller", MAP_DPAD_TO_AXES, XTYPE_XBOX },
{ 0x0000, 0x0000, "Generic X-Box pad", MAP_DPAD_UNKNOWN, XTYPE_XBOX }
{ 0x0000, 0x0000, "Generic X-Box pad", MAP_DPAD_UNKNOWN, XTYPE_UNKNOWN }
};

static const signed short xpad_btn[] = {
Expand Down Expand Up @@ -173,12 +174,20 @@ static const signed short xpad_abs_pad[] = {
-1 /* terminating entry */
};

/* Xbox 360 has a vendor-specific (sub)class, so we cannot match it with only
* USB_INTERFACE_INFO, more to that this device has 4 InterfaceProtocols,
* but we need only one of them. */
/* Xbox 360 has a vendor-specific class, so we cannot match it with only
* USB_INTERFACE_INFO (also specifically refused by USB subsystem), so we
* match against vendor id as well. Also, some Xbox 360 devices have multiple
* interface protocols, we only need protocol 1. */
#define XPAD_XBOX360_VENDOR(vend) \
.match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \
.idVendor = (vend), \
.bInterfaceClass = USB_CLASS_VENDOR_SPEC, \
.bInterfaceSubClass = 93, \
.bInterfaceProtocol = 1

static struct usb_device_id xpad_table [] = {
{ USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */
{ USB_DEVICE_INTERFACE_PROTOCOL(0x045e, 0x028e, 1) }, /* X-Box 360 controller */
{ XPAD_XBOX360_VENDOR(0x045e) }, /* Microsoft X-Box 360 controllers */
{ }
};

Expand Down Expand Up @@ -645,6 +654,8 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
xpad->xtype = xpad_device[i].xtype;
if (xpad->dpad_mapping == MAP_DPAD_UNKNOWN)
xpad->dpad_mapping = dpad_to_buttons;
if (xpad->xtype == XTYPE_UNKNOWN)
xpad->xtype = (intf->cur_altsetting->desc.bInterfaceClass == USB_CLASS_VENDOR_SPEC);
xpad->dev = input_dev;
usb_make_path(udev, xpad->phys, sizeof(xpad->phys));
strlcat(xpad->phys, "/input0", sizeof(xpad->phys));
Expand Down
73 changes: 25 additions & 48 deletions trunk/drivers/input/keyboard/locomokbd.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/*
* LoCoMo keyboard driver for Linux-based ARM PDAs:
* - SHARP Zaurus Collie (SL-5500)
* - SHARP Zaurus Poodle (SL-5600)
* Copyright (c) 2005 John Lenz
*
* Copyright (c) 2005 John Lenz
* Based on from xtkbd.c
*
*
*/

/*
* LoCoMo keyboard driver for Linux/ARM
*/

/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -45,8 +47,7 @@ MODULE_LICENSE("GPL");
#define KEY_CONTACT KEY_F18
#define KEY_CENTER KEY_F15

static const unsigned char
locomokbd_keycode[LOCOMOKBD_NUMKEYS] __devinitconst = {
static unsigned char locomokbd_keycode[LOCOMOKBD_NUMKEYS] = {
0, KEY_ESC, KEY_ACTIVITY, 0, 0, 0, 0, 0, 0, 0, /* 0 - 9 */
0, 0, 0, 0, 0, 0, 0, KEY_MENU, KEY_HOME, KEY_CONTACT, /* 10 - 19 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 20 - 29 */
Expand All @@ -66,21 +67,22 @@ locomokbd_keycode[LOCOMOKBD_NUMKEYS] __devinitconst = {
#define KB_COLS 8
#define KB_ROWMASK(r) (1 << (r))
#define SCANCODE(c,r) ( ((c)<<4) + (r) + 1 )
#define NR_SCANCODES 128

#define KB_DELAY 8
#define SCAN_INTERVAL (HZ/10)
#define LOCOMOKBD_PRESSED 1

struct locomokbd {
unsigned char keycode[LOCOMOKBD_NUMKEYS];
struct input_dev *input;
char phys[32];

struct locomo_dev *ldev;
unsigned long base;
spinlock_t lock;

struct timer_list timer;
unsigned long suspend_jiffies;
unsigned int count_cancel;
};

/* helper functions for reading the keyboard matrix */
Expand Down Expand Up @@ -126,7 +128,7 @@ static inline void locomokbd_reset_col(unsigned long membase, int col)
/* Scan the hardware keyboard and push any changes up through the input layer */
static void locomokbd_scankeyboard(struct locomokbd *locomokbd)
{
unsigned int row, col, rowd;
unsigned int row, col, rowd, scancode;
unsigned long flags;
unsigned int num_pressed;
unsigned long membase = locomokbd->base;
Expand All @@ -143,33 +145,13 @@ static void locomokbd_scankeyboard(struct locomokbd *locomokbd)

rowd = ~locomo_readl(membase + LOCOMO_KIB);
for (row = 0; row < KB_ROWS; row++) {
unsigned int scancode, pressed, key;

scancode = SCANCODE(col, row);
pressed = rowd & KB_ROWMASK(row);
key = locomokbd->keycode[scancode];

input_report_key(locomokbd->input, key, pressed);
if (likely(!pressed))
continue;

num_pressed++;

/* The "Cancel/ESC" key is labeled "On/Off" on
* Collie and Poodle and should suspend the device
* if it was pressed for more than a second. */
if (unlikely(key == KEY_ESC)) {
if (!time_after(jiffies,
locomokbd->suspend_jiffies + HZ))
continue;
if (locomokbd->count_cancel++
!= (HZ/SCAN_INTERVAL + 1))
continue;
input_event(locomokbd->input, EV_PWR,
KEY_SUSPEND, 1);
locomokbd->suspend_jiffies = jiffies;
} else
locomokbd->count_cancel = 0;
if (rowd & KB_ROWMASK(row)) {
num_pressed += 1;
input_report_key(locomokbd->input, locomokbd->keycode[scancode], 1);
} else {
input_report_key(locomokbd->input, locomokbd->keycode[scancode], 0);
}
}
locomokbd_reset_col(membase, col);
}
Expand All @@ -180,8 +162,6 @@ static void locomokbd_scankeyboard(struct locomokbd *locomokbd)
/* if any keys are pressed, enable the timer */
if (num_pressed)
mod_timer(&locomokbd->timer, jiffies + SCAN_INTERVAL);
else
locomokbd->count_cancel = 0;

spin_unlock_irqrestore(&locomokbd->lock, flags);
}
Expand All @@ -206,11 +186,10 @@ static irqreturn_t locomokbd_interrupt(int irq, void *dev_id)
static void locomokbd_timer_callback(unsigned long data)
{
struct locomokbd *locomokbd = (struct locomokbd *) data;

locomokbd_scankeyboard(locomokbd);
}

static int __devinit locomokbd_probe(struct locomo_dev *dev)
static int locomokbd_probe(struct locomo_dev *dev)
{
struct locomokbd *locomokbd;
struct input_dev *input_dev;
Expand All @@ -232,6 +211,7 @@ static int __devinit locomokbd_probe(struct locomo_dev *dev)
goto err_free_mem;
}

locomokbd->ldev = dev;
locomo_set_drvdata(dev, locomokbd);

locomokbd->base = (unsigned long) dev->mapbase;
Expand All @@ -242,8 +222,6 @@ static int __devinit locomokbd_probe(struct locomo_dev *dev)
locomokbd->timer.function = locomokbd_timer_callback;
locomokbd->timer.data = (unsigned long) locomokbd;

locomokbd->suspend_jiffies = jiffies;

locomokbd->input = input_dev;
strcpy(locomokbd->phys, "locomokbd/input0");

Expand All @@ -255,10 +233,9 @@ static int __devinit locomokbd_probe(struct locomo_dev *dev)
input_dev->id.version = 0x0100;
input_dev->dev.parent = &dev->dev;

input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) |
BIT_MASK(EV_PWR);
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
input_dev->keycode = locomokbd->keycode;
input_dev->keycodesize = sizeof(locomokbd_keycode[0]);
input_dev->keycodesize = sizeof(unsigned char);
input_dev->keycodemax = ARRAY_SIZE(locomokbd_keycode);

memcpy(locomokbd->keycode, locomokbd_keycode, sizeof(locomokbd->keycode));
Expand Down Expand Up @@ -291,7 +268,7 @@ static int __devinit locomokbd_probe(struct locomo_dev *dev)
return err;
}

static int __devexit locomokbd_remove(struct locomo_dev *dev)
static int locomokbd_remove(struct locomo_dev *dev)
{
struct locomokbd *locomokbd = locomo_get_drvdata(dev);

Expand All @@ -315,7 +292,7 @@ static struct locomo_driver keyboard_driver = {
},
.devid = LOCOMO_DEVID_KEYBOARD,
.probe = locomokbd_probe,
.remove = __devexit_p(locomokbd_remove),
.remove = locomokbd_remove,
};

static int __init locomokbd_init(void)
Expand Down
21 changes: 3 additions & 18 deletions trunk/drivers/input/keyboard/tosakbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ KEY_X, KEY_F, KEY_SPACE, KEY_APOSTROPHE, TOSA_KEY_MAIL, KEY_LEFT, KEY_DOWN, KEY_
struct tosakbd {
unsigned int keycode[ARRAY_SIZE(tosakbd_keycode)];
struct input_dev *input;
int suspended;

spinlock_t lock; /* protect kbd scanning */
struct timer_list timer;
};
Expand Down Expand Up @@ -133,9 +133,6 @@ static void tosakbd_scankeyboard(struct platform_device *dev)

spin_lock_irqsave(&tosakbd->lock, flags);

if (tosakbd->suspended)
goto out;

for (col = 0; col < TOSA_KEY_STROBE_NUM; col++) {
/*
* Discharge the output driver capacitatance
Expand Down Expand Up @@ -177,7 +174,6 @@ static void tosakbd_scankeyboard(struct platform_device *dev)
if (num_pressed)
mod_timer(&tosakbd->timer, jiffies + SCAN_INTERVAL);

out:
spin_unlock_irqrestore(&tosakbd->lock, flags);
}

Expand All @@ -204,21 +200,13 @@ static irqreturn_t tosakbd_interrupt(int irq, void *__dev)
static void tosakbd_timer_callback(unsigned long __dev)
{
struct platform_device *dev = (struct platform_device *)__dev;

tosakbd_scankeyboard(dev);
}

#ifdef CONFIG_PM
static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)
{
struct tosakbd *tosakbd = platform_get_drvdata(dev);
unsigned long flags;

spin_lock_irqsave(&tosakbd->lock, flags);
PGSR1 = (PGSR1 & ~TOSA_GPIO_LOW_STROBE_BIT);
PGSR2 = (PGSR2 & ~TOSA_GPIO_HIGH_STROBE_BIT);
tosakbd->suspended = 1;
spin_unlock_irqrestore(&tosakbd->lock, flags);

del_timer_sync(&tosakbd->timer);

Expand All @@ -227,9 +215,6 @@ static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)

static int tosakbd_resume(struct platform_device *dev)
{
struct tosakbd *tosakbd = platform_get_drvdata(dev);

tosakbd->suspended = 0;
tosakbd_scankeyboard(dev);

return 0;
Expand Down Expand Up @@ -380,8 +365,8 @@ static int __devinit tosakbd_probe(struct platform_device *pdev) {
return error;
}

static int __devexit tosakbd_remove(struct platform_device *dev)
{
static int __devexit tosakbd_remove(struct platform_device *dev) {

int i;
struct tosakbd *tosakbd = platform_get_drvdata(dev);

Expand Down
13 changes: 1 addition & 12 deletions trunk/drivers/input/mouse/appletouch.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@
#define GEYSER4_ISO_PRODUCT_ID 0x021B
#define GEYSER4_JIS_PRODUCT_ID 0x021C

#define GEYSER4_HF_ANSI_PRODUCT_ID 0x0229
#define GEYSER4_HF_ISO_PRODUCT_ID 0x022A
#define GEYSER4_HF_JIS_PRODUCT_ID 0x022B

#define ATP_DEVICE(prod) \
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
USB_DEVICE_ID_MATCH_INT_CLASS | \
Expand Down Expand Up @@ -97,10 +93,6 @@ static struct usb_device_id atp_table [] = {
{ ATP_DEVICE(GEYSER4_ISO_PRODUCT_ID) },
{ ATP_DEVICE(GEYSER4_JIS_PRODUCT_ID) },

{ ATP_DEVICE(GEYSER4_HF_ANSI_PRODUCT_ID) },
{ ATP_DEVICE(GEYSER4_HF_ISO_PRODUCT_ID) },
{ ATP_DEVICE(GEYSER4_HF_JIS_PRODUCT_ID) },

/* Terminating entry */
{ }
};
Expand Down Expand Up @@ -225,10 +217,7 @@ static inline int atp_is_geyser_3(struct atp *dev)
(productId == GEYSER3_JIS_PRODUCT_ID) ||
(productId == GEYSER4_ANSI_PRODUCT_ID) ||
(productId == GEYSER4_ISO_PRODUCT_ID) ||
(productId == GEYSER4_JIS_PRODUCT_ID) ||
(productId == GEYSER4_HF_ANSI_PRODUCT_ID) ||
(productId == GEYSER4_HF_ISO_PRODUCT_ID) ||
(productId == GEYSER4_HF_JIS_PRODUCT_ID);
(productId == GEYSER4_JIS_PRODUCT_ID);
}

/*
Expand Down
Loading

0 comments on commit 7ce9708

Please sign in to comment.