Commit 45b30105 authored by Linus Torvalds's avatar Linus Torvalds

Automatic merge of 'for-linus' branch from

	rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input
parents 6cf2b3fc 7d6064d4
...@@ -68,23 +68,3 @@ config GAMEPORT_CS461X ...@@ -68,23 +68,3 @@ config GAMEPORT_CS461X
depends on PCI depends on PCI
endif endif
# Yes, SOUND_GAMEPORT looks a bit odd. Yes, it ends up being turned on
# in every .config. Please don't touch it. It is here to handle an
# unusual dependency between GAMEPORT and sound drivers.
#
# Some sound drivers call gameport functions. If GAMEPORT is
# not selected, empty stubs are provided for the functions and all is
# well.
# If GAMEPORT is built in, everything is fine.
# If GAMEPORT is a module, however, it would need to be loaded for the
# sound driver to be able to link properly. Therefore, the sound
# driver must be a module as well in that case. Since there's no way
# to express that directly in Kconfig, we use SOUND_GAMEPORT to
# express it. SOUND_GAMEPORT boils down to "if GAMEPORT is 'm',
# anything that depends on SOUND_GAMEPORT must be 'm' as well. if
# GAMEPORT is 'y' or 'n', it can be anything".
config SOUND_GAMEPORT
tristate
default m if GAMEPORT=m
default y
...@@ -422,7 +422,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct ...@@ -422,7 +422,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
joydev->nkey++; joydev->nkey++;
} }
for (i = 0; i < BTN_JOYSTICK - BTN_MISC + 1; i++) for (i = 0; i < BTN_JOYSTICK - BTN_MISC; i++)
if (test_bit(i + BTN_MISC, dev->keybit)) { if (test_bit(i + BTN_MISC, dev->keybit)) {
joydev->keymap[i] = joydev->nkey; joydev->keymap[i] = joydev->nkey;
joydev->keypam[joydev->nkey] = i + BTN_MISC; joydev->keypam[joydev->nkey] = i + BTN_MISC;
......
...@@ -518,13 +518,16 @@ static int psmouse_probe(struct psmouse *psmouse) ...@@ -518,13 +518,16 @@ static int psmouse_probe(struct psmouse *psmouse)
/* /*
* First, we check if it's a mouse. It should send 0x00 or 0x03 * First, we check if it's a mouse. It should send 0x00 or 0x03
* in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer. * in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer.
* Sunrex K8561 IR Keyboard/Mouse reports 0xff on second and subsequent
* ID queries, probably due to a firmware bug.
*/ */
param[0] = 0xa5; param[0] = 0xa5;
if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID)) if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
return -1; return -1;
if (param[0] != 0x00 && param[0] != 0x03 && param[0] != 0x04) if (param[0] != 0x00 && param[0] != 0x03 &&
param[0] != 0x04 && param[0] != 0xff)
return -1; return -1;
/* /*
...@@ -972,7 +975,7 @@ static int psmouse_set_maxproto(const char *val, struct kernel_param *kp) ...@@ -972,7 +975,7 @@ static int psmouse_set_maxproto(const char *val, struct kernel_param *kp)
return -EINVAL; return -EINVAL;
if (!strncmp(val, "any", 3)) { if (!strncmp(val, "any", 3)) {
*((unsigned int *)kp->arg) = -1UL; *((unsigned int *)kp->arg) = -1U;
return 0; return 0;
} }
......
...@@ -143,39 +143,6 @@ static int synaptics_identify(struct psmouse *psmouse) ...@@ -143,39 +143,6 @@ static int synaptics_identify(struct psmouse *psmouse)
return -1; return -1;
} }
static void print_ident(struct synaptics_data *priv)
{
printk(KERN_INFO "Synaptics Touchpad, model: %ld\n", SYN_ID_MODEL(priv->identity));
printk(KERN_INFO " Firmware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity),
SYN_ID_MINOR(priv->identity));
if (SYN_MODEL_ROT180(priv->model_id))
printk(KERN_INFO " 180 degree mounted touchpad\n");
if (SYN_MODEL_PORTRAIT(priv->model_id))
printk(KERN_INFO " portrait touchpad\n");
printk(KERN_INFO " Sensor: %ld\n", SYN_MODEL_SENSOR(priv->model_id));
if (SYN_MODEL_NEWABS(priv->model_id))
printk(KERN_INFO " new absolute packet format\n");
if (SYN_MODEL_PEN(priv->model_id))
printk(KERN_INFO " pen detection\n");
if (SYN_CAP_EXTENDED(priv->capabilities)) {
printk(KERN_INFO " Touchpad has extended capability bits\n");
if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap))
printk(KERN_INFO " -> %d multi-buttons, i.e. besides standard buttons\n",
(int)(SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap)));
if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
printk(KERN_INFO " -> middle button\n");
if (SYN_CAP_FOUR_BUTTON(priv->capabilities))
printk(KERN_INFO " -> four buttons\n");
if (SYN_CAP_MULTIFINGER(priv->capabilities))
printk(KERN_INFO " -> multifinger detection\n");
if (SYN_CAP_PALMDETECT(priv->capabilities))
printk(KERN_INFO " -> palm detection\n");
if (SYN_CAP_PASS_THROUGH(priv->capabilities))
printk(KERN_INFO " -> pass-through port\n");
}
}
static int synaptics_query_hardware(struct psmouse *psmouse) static int synaptics_query_hardware(struct psmouse *psmouse)
{ {
int retries = 0; int retries = 0;
...@@ -666,7 +633,11 @@ int synaptics_init(struct psmouse *psmouse) ...@@ -666,7 +633,11 @@ int synaptics_init(struct psmouse *psmouse)
priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS; priv->pkt_type = SYN_MODEL_NEWABS(priv->model_id) ? SYN_NEWABS : SYN_OLDABS;
print_ident(priv); printk(KERN_INFO "Synaptics Touchpad, model: %ld, fw: %ld.%ld, id: %#lx, caps: %#lx/%#lx\n",
SYN_ID_MODEL(priv->identity),
SYN_ID_MAJOR(priv->identity), SYN_ID_MINOR(priv->identity),
priv->model_id, priv->capabilities, priv->ext_cap);
set_input_params(&psmouse->dev, priv); set_input_params(&psmouse->dev, priv);
psmouse->protocol_handler = synaptics_process_byte; psmouse->protocol_handler = synaptics_process_byte;
......
...@@ -88,9 +88,11 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { ...@@ -88,9 +88,11 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = {
}; };
/* /*
* Some Fujitsu notebooks are ahving trouble with touhcpads if * Some Fujitsu notebooks are having trouble with touchpads if
* active multiplexing mode is activated. Luckily they don't have * active multiplexing mode is activated. Luckily they don't have
* external PS/2 ports so we can safely disable it. * external PS/2 ports so we can safely disable it.
* ... apparently some Toshibas don't like MUX mode either and
* die horrible death on reboot.
*/ */
static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
{ {
...@@ -114,6 +116,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { ...@@ -114,6 +116,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"), DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"),
}, },
}, },
{
.ident = "Fujitsu Lifebook S6230",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"),
},
},
{ {
.ident = "Fujitsu T70H", .ident = "Fujitsu T70H",
.matches = { .matches = {
...@@ -121,6 +130,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { ...@@ -121,6 +130,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"),
}, },
}, },
{
.ident = "Toshiba P10",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"),
},
},
{ } { }
}; };
...@@ -215,11 +231,15 @@ static struct pnp_driver i8042_pnp_aux_driver = { ...@@ -215,11 +231,15 @@ static struct pnp_driver i8042_pnp_aux_driver = {
static void i8042_pnp_exit(void) static void i8042_pnp_exit(void)
{ {
if (i8042_pnp_kbd_registered) if (i8042_pnp_kbd_registered) {
i8042_pnp_kbd_registered = 0;
pnp_unregister_driver(&i8042_pnp_kbd_driver); pnp_unregister_driver(&i8042_pnp_kbd_driver);
}
if (i8042_pnp_aux_registered) if (i8042_pnp_aux_registered) {
i8042_pnp_aux_registered = 0;
pnp_unregister_driver(&i8042_pnp_aux_driver); pnp_unregister_driver(&i8042_pnp_aux_driver);
}
} }
static int i8042_pnp_init(void) static int i8042_pnp_init(void)
...@@ -227,7 +247,7 @@ static int i8042_pnp_init(void) ...@@ -227,7 +247,7 @@ static int i8042_pnp_init(void)
int result_kbd, result_aux; int result_kbd, result_aux;
if (i8042_nopnp) { if (i8042_nopnp) {
printk("i8042: PNP detection disabled\n"); printk(KERN_INFO "i8042: PNP detection disabled\n");
return 0; return 0;
} }
...@@ -241,7 +261,7 @@ static int i8042_pnp_init(void) ...@@ -241,7 +261,7 @@ static int i8042_pnp_init(void)
#if defined(__ia64__) #if defined(__ia64__)
return -ENODEV; return -ENODEV;
#else #else
printk(KERN_WARNING "PNP: No PS/2 controller found. Probing ports directly.\n"); printk(KERN_INFO "PNP: No PS/2 controller found. Probing ports directly.\n");
return 0; return 0;
#endif #endif
} }
...@@ -265,7 +285,7 @@ static int i8042_pnp_init(void) ...@@ -265,7 +285,7 @@ static int i8042_pnp_init(void)
i8042_pnp_kbd_irq = i8042_kbd_irq; i8042_pnp_kbd_irq = i8042_kbd_irq;
} }
if (result_aux > 0 && !i8042_pnp_aux_irq) { if (!i8042_pnp_aux_irq) {
printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq); printk(KERN_WARNING "PNP: PS/2 controller doesn't have AUX irq; using default %#x\n", i8042_aux_irq);
i8042_pnp_aux_irq = i8042_aux_irq; i8042_pnp_aux_irq = i8042_aux_irq;
} }
......
...@@ -698,6 +698,26 @@ static void i8042_timer_func(unsigned long data) ...@@ -698,6 +698,26 @@ static void i8042_timer_func(unsigned long data)
i8042_interrupt(0, NULL, NULL); i8042_interrupt(0, NULL, NULL);
} }
static int i8042_ctl_test(void)
{
unsigned char param;
if (!i8042_reset)
return 0;
if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
return -1;
}
if (param != I8042_RET_CTL_TEST) {
printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
param, I8042_RET_CTL_TEST);
return -1;
}
return 0;
}
/* /*
* i8042_controller init initializes the i8042 controller, and, * i8042_controller init initializes the i8042 controller, and,
...@@ -719,21 +739,8 @@ static int i8042_controller_init(void) ...@@ -719,21 +739,8 @@ static int i8042_controller_init(void)
return -1; return -1;
} }
if (i8042_reset) { if (i8042_ctl_test())
unsigned char param;
if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
return -1;
}
if (param != I8042_RET_CTL_TEST) {
printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
param, I8042_RET_CTL_TEST);
return -1; return -1;
}
}
/* /*
* Save the CTR for restoral on unload / reboot. * Save the CTR for restoral on unload / reboot.
...@@ -802,15 +809,11 @@ static int i8042_controller_init(void) ...@@ -802,15 +809,11 @@ static int i8042_controller_init(void)
*/ */
static void i8042_controller_reset(void) static void i8042_controller_reset(void)
{ {
unsigned char param;
/* /*
* Reset the controller if requested. * Reset the controller if requested.
*/ */
if (i8042_reset) i8042_ctl_test();
if (i8042_command(&param, I8042_CMD_CTL_TEST))
printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
/* /*
* Disable MUX mode if present. * Disable MUX mode if present.
...@@ -922,8 +925,11 @@ static int i8042_resume(struct device *dev, u32 level) ...@@ -922,8 +925,11 @@ static int i8042_resume(struct device *dev, u32 level)
if (level != RESUME_ENABLE) if (level != RESUME_ENABLE)
return 0; return 0;
if (i8042_controller_init()) { if (i8042_ctl_test())
printk(KERN_ERR "i8042: resume failed\n"); return -1;
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
printk(KERN_ERR "i8042: Can't write CTR\n");
return -1; return -1;
} }
......
...@@ -68,8 +68,7 @@ static void gunze_process_packet(struct gunze* gunze, struct pt_regs *regs) ...@@ -68,8 +68,7 @@ static void gunze_process_packet(struct gunze* gunze, struct pt_regs *regs)
if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' || if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' ||
(gunze->data[0] != 'T' && gunze->data[0] != 'R')) { (gunze->data[0] != 'T' && gunze->data[0] != 'R')) {
gunze->data[10] = 0; printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data);
printk(KERN_WARNING "gunze.c: bad packet: >%s<\n", gunze->data);
return; return;
} }
......
...@@ -67,6 +67,8 @@ int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mo ...@@ -67,6 +67,8 @@ int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mo
void gameport_close(struct gameport *gameport); void gameport_close(struct gameport *gameport);
void gameport_rescan(struct gameport *gameport); void gameport_rescan(struct gameport *gameport);
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
void __gameport_register_port(struct gameport *gameport, struct module *owner); void __gameport_register_port(struct gameport *gameport, struct module *owner);
static inline void gameport_register_port(struct gameport *gameport) static inline void gameport_register_port(struct gameport *gameport)
{ {
...@@ -75,6 +77,29 @@ static inline void gameport_register_port(struct gameport *gameport) ...@@ -75,6 +77,29 @@ static inline void gameport_register_port(struct gameport *gameport)
void gameport_unregister_port(struct gameport *gameport); void gameport_unregister_port(struct gameport *gameport);
void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
#else
static inline void gameport_register_port(struct gameport *gameport)
{
return;
}
static inline void gameport_unregister_port(struct gameport *gameport)
{
return;
}
static inline void gameport_set_phys(struct gameport *gameport,
const char *fmt, ...)
{
return;
}
#endif
static inline struct gameport *gameport_allocate_port(void) static inline struct gameport *gameport_allocate_port(void)
{ {
struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL);
...@@ -92,9 +117,6 @@ static inline void gameport_set_name(struct gameport *gameport, const char *name ...@@ -92,9 +117,6 @@ static inline void gameport_set_name(struct gameport *gameport, const char *name
strlcpy(gameport->name, name, sizeof(gameport->name)); strlcpy(gameport->name, name, sizeof(gameport->name));
} }
void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
/* /*
* Use the following fucntions to manipulate gameport's per-port * Use the following fucntions to manipulate gameport's per-port
* driver-specific data. * driver-specific data.
......
...@@ -112,7 +112,7 @@ config SOUND_BCM_CS4297A ...@@ -112,7 +112,7 @@ config SOUND_BCM_CS4297A
config SOUND_ES1370 config SOUND_ES1370
tristate "Ensoniq AudioPCI (ES1370)" tristate "Ensoniq AudioPCI (ES1370)"
depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT depends on SOUND_PRIME!=n && SOUND && PCI
help help
Say Y or M if you have a PCI sound card utilizing the Ensoniq Say Y or M if you have a PCI sound card utilizing the Ensoniq
ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find ES1370 chipset, such as Ensoniq's AudioPCI (non-97). To find
...@@ -125,7 +125,7 @@ config SOUND_ES1370 ...@@ -125,7 +125,7 @@ config SOUND_ES1370
config SOUND_ES1371 config SOUND_ES1371
tristate "Creative Ensoniq AudioPCI 97 (ES1371)" tristate "Creative Ensoniq AudioPCI 97 (ES1371)"
depends on SOUND_PRIME!=n && SOUND && PCI && SOUND_GAMEPORT depends on SOUND_PRIME!=n && SOUND && PCI
help help
Say Y or M if you have a PCI sound card utilizing the Ensoniq Say Y or M if you have a PCI sound card utilizing the Ensoniq
ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if
...@@ -138,7 +138,7 @@ config SOUND_ES1371 ...@@ -138,7 +138,7 @@ config SOUND_ES1371
config SOUND_ESSSOLO1 config SOUND_ESSSOLO1
tristate "ESS Technology Solo1" tristate "ESS Technology Solo1"
depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT && PCI depends on SOUND_PRIME!=n && SOUND && PCI
help help
Say Y or M if you have a PCI sound card utilizing the ESS Technology Say Y or M if you have a PCI sound card utilizing the ESS Technology
Solo1 chip. To find out if your sound card uses a Solo1 chip. To find out if your sound card uses a
...@@ -179,7 +179,7 @@ config SOUND_HARMONY ...@@ -179,7 +179,7 @@ config SOUND_HARMONY
config SOUND_SONICVIBES config SOUND_SONICVIBES
tristate "S3 SonicVibes" tristate "S3 SonicVibes"
depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT depends on SOUND_PRIME!=n && SOUND
help help
Say Y or M if you have a PCI sound card utilizing the S3 Say Y or M if you have a PCI sound card utilizing the S3
SonicVibes chipset. To find out if your sound card uses a SonicVibes chipset. To find out if your sound card uses a
...@@ -226,7 +226,7 @@ config SOUND_AU1550_AC97 ...@@ -226,7 +226,7 @@ config SOUND_AU1550_AC97
config SOUND_TRIDENT config SOUND_TRIDENT
tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core" tristate "Trident 4DWave DX/NX, SiS 7018 or ALi 5451 PCI Audio Core"
depends on SOUND_PRIME!=n && SOUND && SOUND_GAMEPORT depends on SOUND_PRIME!=n && SOUND
---help--- ---help---
Say Y or M if you have a PCI sound card utilizing the Trident Say Y or M if you have a PCI sound card utilizing the Trident
4DWave-DX/NX chipset or your mother board chipset has SiS 7018 4DWave-DX/NX chipset or your mother board chipset has SiS 7018
...@@ -739,7 +739,7 @@ config SOUND_NM256 ...@@ -739,7 +739,7 @@ config SOUND_NM256
config SOUND_MAD16 config SOUND_MAD16
tristate "OPTi MAD16 and/or Mozart based cards" tristate "OPTi MAD16 and/or Mozart based cards"
depends on SOUND_OSS && SOUND_GAMEPORT depends on SOUND_OSS
---help--- ---help---
Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi Answer Y if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
82C928 or 82C929 or 82C931) audio interface chip. These chips are 82C928 or 82C929 or 82C931) audio interface chip. These chips are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment