Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27016
b: refs/heads/master
c: d1b3f96
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 30, 2006
1 parent ae8a605 commit ec23aa4
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 28 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: 7114b0bb6df7b2db266ba4847e4dd8333fa98a9a
refs/heads/master: d1b3f96b0f9c1d9bc305a4d14bee0dc3509101a0
11 changes: 6 additions & 5 deletions trunk/drivers/input/joystick/sidewinder.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
struct sw *sw;
struct input_dev *input_dev;
int i, j, k, l;
int err;
int err = 0;
unsigned char *buf = NULL; /* [SW_LENGTH] */
unsigned char *idbuf = NULL; /* [SW_LENGTH] */
unsigned char m = 1;
Expand Down Expand Up @@ -776,17 +776,18 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
goto fail4;
}

return 0;
out: kfree(buf);
kfree(idbuf);

return err;

fail4: input_free_device(sw->dev[i]);
fail3: while (--i >= 0)
input_unregister_device(sw->dev[i]);
fail2: gameport_close(gameport);
fail1: gameport_set_drvdata(gameport, NULL);
kfree(sw);
kfree(buf);
kfree(idbuf);
return err;
goto out;
}

static void sw_disconnect(struct gameport *gameport)
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/input/keyboard/corgikbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ static void corgikbd_hinge_timer(unsigned long data)
if (hinge_count >= HINGE_STABLE_COUNT) {
spin_lock_irqsave(&corgikbd_data->lock, flags);

input_report_switch(corgikbd_data->input, SW_0, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0));
input_report_switch(corgikbd_data->input, SW_1, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0));
input_report_switch(corgikbd_data->input, SW_2, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0));
input_report_switch(corgikbd_data->input, SW_LID, ((sharpsl_hinge_state & CORGI_SCP_SWA) != 0));
input_report_switch(corgikbd_data->input, SW_TABLET_MODE, ((sharpsl_hinge_state & CORGI_SCP_SWB) != 0));
input_report_switch(corgikbd_data->input, SW_HEADPHONE_INSERT, (READ_GPIO_BIT(CORGI_GPIO_AK_INT) != 0));
input_sync(corgikbd_data->input);

spin_unlock_irqrestore(&corgikbd_data->lock, flags);
Expand Down Expand Up @@ -340,9 +340,9 @@ static int __init corgikbd_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(corgikbd_keycode); i++)
set_bit(corgikbd->keycode[i], input_dev->keybit);
clear_bit(0, input_dev->keybit);
set_bit(SW_0, input_dev->swbit);
set_bit(SW_1, input_dev->swbit);
set_bit(SW_2, input_dev->swbit);
set_bit(SW_LID, input_dev->swbit);
set_bit(SW_TABLET_MODE, input_dev->swbit);
set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);

input_register_device(corgikbd->input);

Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/input/keyboard/spitzkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ static void spitzkbd_hinge_timer(unsigned long data)
if (hinge_count >= HINGE_STABLE_COUNT) {
spin_lock_irqsave(&spitzkbd_data->lock, flags);

input_report_switch(spitzkbd_data->input, SW_0, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
input_report_switch(spitzkbd_data->input, SW_1, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
input_report_switch(spitzkbd_data->input, SW_2, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
input_sync(spitzkbd_data->input);

spin_unlock_irqrestore(&spitzkbd_data->lock, flags);
Expand Down Expand Up @@ -398,9 +398,9 @@ static int __init spitzkbd_probe(struct platform_device *dev)
for (i = 0; i < ARRAY_SIZE(spitzkbd_keycode); i++)
set_bit(spitzkbd->keycode[i], input_dev->keybit);
clear_bit(0, input_dev->keybit);
set_bit(SW_0, input_dev->swbit);
set_bit(SW_1, input_dev->swbit);
set_bit(SW_2, input_dev->swbit);
set_bit(SW_LID, input_dev->swbit);
set_bit(SW_TABLET_MODE, input_dev->swbit);
set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);

input_register_device(input_dev);

Expand Down
19 changes: 19 additions & 0 deletions trunk/drivers/input/misc/wistron_btns.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,16 @@ static struct key_entry keymap_acer_travelmate_240[] = {
{ KE_END, 0 }
};

static struct key_entry keymap_aopen_1559as[] = {
{ KE_KEY, 0x01, KEY_HELP },
{ KE_KEY, 0x06, KEY_PROG3 },
{ KE_KEY, 0x11, KEY_PROG1 },
{ KE_KEY, 0x12, KEY_PROG2 },
{ KE_WIFI, 0x30, 0 },
{ KE_KEY, 0x31, KEY_MAIL },
{ KE_KEY, 0x36, KEY_WWW },
};

/*
* If your machine is not here (which is currently rather likely), please send
* a list of buttons and their key codes (reported when loading this module
Expand Down Expand Up @@ -369,6 +379,15 @@ static struct dmi_system_id dmi_ids[] = {
},
.driver_data = keymap_acer_travelmate_240
},
{
.callback = dmi_matched,
.ident = "AOpen 1559AS",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "E2U"),
DMI_MATCH(DMI_BOARD_NAME, "E2U"),
},
.driver_data = keymap_aopen_1559as
},
{ NULL, }
};

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/input/mouse/alps.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ static void alps_process_packet(struct psmouse *psmouse, struct pt_regs *regs)
}

if (priv->i->flags & ALPS_OLDPROTO) {
left = packet[2] & 0x08;
right = packet[2] & 0x10;
left = packet[2] & 0x10;
right = packet[2] & 0x08;
middle = 0;
x = packet[1] | ((packet[0] & 0x07) << 7);
y = packet[4] | ((packet[3] & 0x07) << 7);
Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/input/mouse/lifebook.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,36 @@
#include "lifebook.h"

static struct dmi_system_id lifebook_dmi_table[] = {
{
.ident = "LifeBook B",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B Series"),
},
},
{
.ident = "Lifebook B",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK B Series"),
},
},
{
.ident = "Lifebook B213x/B2150",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook B2131/B2133/B2150"),
},
},
{
.ident = "Zephyr",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "ZEPHYR"),
},
},
{
.ident = "CF-18",
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"),
},
},
{
.ident = "Lifebook B142",
.matches = {
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/input/mouse/logips2pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define PS2PP_KIND_WHEEL 1
#define PS2PP_KIND_MX 2
#define PS2PP_KIND_TP3 3
#define PS2PP_KIND_TRACKMAN 4

/* Logitech mouse features */
#define PS2PP_WHEEL 0x01
Expand Down Expand Up @@ -223,6 +224,7 @@ static struct ps2pp_info *get_model_info(unsigned char model)
{ 73, 0, PS2PP_SIDE_BTN },
{ 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL },
{ 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL },
{ 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */
{ 80, PS2PP_KIND_WHEEL, PS2PP_SIDE_BTN | PS2PP_WHEEL },
{ 81, PS2PP_KIND_WHEEL, PS2PP_WHEEL },
{ 83, PS2PP_KIND_WHEEL, PS2PP_WHEEL },
Expand Down Expand Up @@ -298,6 +300,10 @@ static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_inf
psmouse->name = "TouchPad 3";
break;

case PS2PP_KIND_TRACKMAN:
psmouse->name = "TrackMan";
break;

default:
/*
* Set name to "Mouse" only when using PS2++,
Expand Down
13 changes: 5 additions & 8 deletions trunk/include/linux/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ struct input_absinfo {
#define KEY_SAVE 234
#define KEY_DOCUMENTS 235

#define KEY_BATTERY 236

#define KEY_UNKNOWN 240

#define BTN_MISC 0x100
Expand Down Expand Up @@ -577,14 +579,9 @@ struct input_absinfo {
* Switch events
*/

#define SW_0 0x00
#define SW_1 0x01
#define SW_2 0x02
#define SW_3 0x03
#define SW_4 0x04
#define SW_5 0x05
#define SW_6 0x06
#define SW_7 0x07
#define SW_LID 0x00 /* set = lid shut */
#define SW_TABLET_MODE 0x01 /* set = tablet mode */
#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
#define SW_MAX 0x0f

/*
Expand Down

0 comments on commit ec23aa4

Please sign in to comment.