Merge branch 'for-linus' into next
Conflicts: drivers/input/mouse/appletouch.c
This commit is contained in:
commit
15439dd37f
|
@ -807,6 +807,8 @@ static int atkbd_activate(struct atkbd *atkbd)
|
|||
static void atkbd_cleanup(struct serio *serio)
|
||||
{
|
||||
struct atkbd *atkbd = serio_get_drvdata(serio);
|
||||
|
||||
atkbd_disable(atkbd);
|
||||
ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT);
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,9 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad)
|
|||
set_bit(code, input_dev->keybit);
|
||||
}
|
||||
|
||||
for (i = 0; i < pdata->direct_key_num; i++)
|
||||
set_bit(pdata->direct_key_map[i], input_dev->keybit);
|
||||
|
||||
keypad->rotary_up_key[0] = pdata->rotary0_up_key;
|
||||
keypad->rotary_up_key[1] = pdata->rotary1_up_key;
|
||||
keypad->rotary_down_key[0] = pdata->rotary0_down_key;
|
||||
|
@ -145,17 +148,21 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad)
|
|||
keypad->rotary_rel_code[0] = pdata->rotary0_rel_code;
|
||||
keypad->rotary_rel_code[1] = pdata->rotary1_rel_code;
|
||||
|
||||
if (pdata->rotary0_up_key && pdata->rotary0_down_key) {
|
||||
set_bit(pdata->rotary0_up_key, input_dev->keybit);
|
||||
set_bit(pdata->rotary0_down_key, input_dev->keybit);
|
||||
} else
|
||||
set_bit(pdata->rotary0_rel_code, input_dev->relbit);
|
||||
if (pdata->enable_rotary0) {
|
||||
if (pdata->rotary0_up_key && pdata->rotary0_down_key) {
|
||||
set_bit(pdata->rotary0_up_key, input_dev->keybit);
|
||||
set_bit(pdata->rotary0_down_key, input_dev->keybit);
|
||||
} else
|
||||
set_bit(pdata->rotary0_rel_code, input_dev->relbit);
|
||||
}
|
||||
|
||||
if (pdata->rotary1_up_key && pdata->rotary1_down_key) {
|
||||
set_bit(pdata->rotary1_up_key, input_dev->keybit);
|
||||
set_bit(pdata->rotary1_down_key, input_dev->keybit);
|
||||
} else
|
||||
set_bit(pdata->rotary1_rel_code, input_dev->relbit);
|
||||
if (pdata->enable_rotary1) {
|
||||
if (pdata->rotary1_up_key && pdata->rotary1_down_key) {
|
||||
set_bit(pdata->rotary1_up_key, input_dev->keybit);
|
||||
set_bit(pdata->rotary1_down_key, input_dev->keybit);
|
||||
} else
|
||||
set_bit(pdata->rotary1_rel_code, input_dev->relbit);
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned int lookup_matrix_keycode(
|
||||
|
@ -493,8 +500,13 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev)
|
|||
keypad->input_dev = input_dev;
|
||||
input_set_drvdata(input_dev, keypad);
|
||||
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) |
|
||||
BIT_MASK(EV_REL);
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
|
||||
if ((keypad->pdata->enable_rotary0 &&
|
||||
keypad->pdata->rotary0_rel_code) ||
|
||||
(keypad->pdata->enable_rotary1 &&
|
||||
keypad->pdata->rotary1_rel_code)) {
|
||||
input_dev->evbit[0] |= BIT_MASK(EV_REL);
|
||||
}
|
||||
|
||||
pxa27x_keypad_build_keycode(keypad);
|
||||
platform_set_drvdata(pdev, keypad);
|
||||
|
|
|
@ -15,7 +15,6 @@ if INPUT_MISC
|
|||
config INPUT_PCSPKR
|
||||
tristate "PC Speaker support"
|
||||
depends on PCSPKR_PLATFORM
|
||||
depends on SND_PCSP=n
|
||||
help
|
||||
Say Y here if you want the standard PC Speaker to be used for
|
||||
bells and whistles.
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/input-polldev.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
|
|
@ -564,6 +564,21 @@ static void atp_close(struct input_dev *input)
|
|||
dev->open = 0;
|
||||
}
|
||||
|
||||
static int atp_handle_geyser(struct atp *dev)
|
||||
{
|
||||
struct usb_device *udev = dev->udev;
|
||||
|
||||
if (dev->type != ATP_FOUNTAIN) {
|
||||
/* switch to raw sensor mode */
|
||||
if (atp_geyser_init(udev))
|
||||
return -EIO;
|
||||
|
||||
printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int atp_probe(struct usb_interface *iface,
|
||||
const struct usb_device_id *id)
|
||||
{
|
||||
|
@ -608,14 +623,6 @@ static int atp_probe(struct usb_interface *iface,
|
|||
else
|
||||
dev->datalen = 64;
|
||||
|
||||
if (dev->type != ATP_FOUNTAIN) {
|
||||
/* switch to raw sensor mode */
|
||||
if (atp_geyser_init(udev))
|
||||
goto err_free_devs;
|
||||
|
||||
printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
|
||||
}
|
||||
|
||||
dev->urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (!dev->urb)
|
||||
goto err_free_devs;
|
||||
|
@ -629,6 +636,10 @@ static int atp_probe(struct usb_interface *iface,
|
|||
usb_rcvintpipe(udev, int_in_endpointAddr),
|
||||
dev->data, dev->datalen, atp_complete, dev, 1);
|
||||
|
||||
error = atp_handle_geyser(dev);
|
||||
if (error)
|
||||
goto err_free_buffer;
|
||||
|
||||
usb_make_path(udev, dev->phys, sizeof(dev->phys));
|
||||
strlcat(dev->phys, "/input0", sizeof(dev->phys));
|
||||
|
||||
|
@ -721,6 +732,20 @@ static void atp_disconnect(struct usb_interface *iface)
|
|||
printk(KERN_INFO "input: appletouch disconnected\n");
|
||||
}
|
||||
|
||||
static int atp_recover(struct atp *dev)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = atp_handle_geyser(dev);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC))
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int atp_suspend(struct usb_interface *iface, pm_message_t message)
|
||||
{
|
||||
struct atp *dev = usb_get_intfdata(iface);
|
||||
|
@ -741,12 +766,20 @@ static int atp_resume(struct usb_interface *iface)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int atp_reset_resume(struct usb_interface *iface)
|
||||
{
|
||||
struct atp *dev = usb_get_intfdata(iface);
|
||||
|
||||
return atp_recover(dev);
|
||||
}
|
||||
|
||||
static struct usb_driver atp_driver = {
|
||||
.name = "appletouch",
|
||||
.probe = atp_probe,
|
||||
.disconnect = atp_disconnect,
|
||||
.suspend = atp_suspend,
|
||||
.resume = atp_resume,
|
||||
.reset_resume = atp_reset_resume,
|
||||
.id_table = atp_table,
|
||||
};
|
||||
|
||||
|
|
|
@ -192,6 +192,13 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Fujitsu-Siemens Amilo Pro 2030",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* No data is coming from the touchscreen unless KBC
|
||||
|
@ -335,6 +342,13 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Acer TravelMate 660",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Acer TravelMate 2490",
|
||||
.matches = {
|
||||
|
|
|
@ -885,6 +885,20 @@ static long i8042_panic_blink(long count)
|
|||
|
||||
#undef DELAY
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
static void i8042_dritek_enable(void)
|
||||
{
|
||||
char param = 0x90;
|
||||
int error;
|
||||
|
||||
error = i8042_command(¶m, 0x1059);
|
||||
if (error)
|
||||
printk(KERN_WARNING
|
||||
"Failed to enable DRITEK extension: %d\n",
|
||||
error);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
/*
|
||||
* Here we try to restore the original BIOS settings. We only want to
|
||||
|
@ -938,10 +952,20 @@ static int i8042_resume(struct platform_device *dev)
|
|||
i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS;
|
||||
i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT);
|
||||
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
|
||||
printk(KERN_ERR "i8042: Can't write CTR to resume\n");
|
||||
return -EIO;
|
||||
printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n");
|
||||
msleep(50);
|
||||
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
|
||||
printk(KERN_ERR "i8042: CTR write retry failed\n");
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
if (i8042_dritek)
|
||||
i8042_dritek_enable();
|
||||
#endif
|
||||
|
||||
if (i8042_mux_present) {
|
||||
if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports())
|
||||
printk(KERN_WARNING
|
||||
|
@ -1160,6 +1184,11 @@ static int __devinit i8042_probe(struct platform_device *dev)
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
if (i8042_dritek)
|
||||
i8042_dritek_enable();
|
||||
#endif
|
||||
|
||||
if (!i8042_noaux) {
|
||||
error = i8042_setup_aux();
|
||||
if (error && error != -ENODEV && error != -EBUSY)
|
||||
|
@ -1171,14 +1200,6 @@ static int __devinit i8042_probe(struct platform_device *dev)
|
|||
if (error)
|
||||
goto out_fail;
|
||||
}
|
||||
#ifdef CONFIG_X86
|
||||
if (i8042_dritek) {
|
||||
char param = 0x90;
|
||||
error = i8042_command(¶m, 0x1059);
|
||||
if (error)
|
||||
goto out_fail;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Ok, everything is ready, let's register all serio ports
|
||||
*/
|
||||
|
|
|
@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
|
|||
struct gtco *gtco;
|
||||
struct input_dev *input_dev;
|
||||
struct hid_descriptor *hid_desc;
|
||||
char *report = NULL;
|
||||
char *report;
|
||||
int result = 0, retry;
|
||||
int error;
|
||||
struct usb_endpoint_descriptor *endpoint;
|
||||
|
@ -916,12 +916,16 @@ static int gtco_probe(struct usb_interface *usbinterface,
|
|||
le16_to_cpu(hid_desc->wDescriptorLength),
|
||||
5000); /* 5 secs */
|
||||
|
||||
if (result == le16_to_cpu(hid_desc->wDescriptorLength))
|
||||
dbg("usb_control_msg result: %d", result);
|
||||
if (result == le16_to_cpu(hid_desc->wDescriptorLength)) {
|
||||
parse_hid_report_descriptor(gtco, report, result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
kfree(report);
|
||||
|
||||
/* If we didn't get the report, fail */
|
||||
dbg("usb_control_msg result: :%d", result);
|
||||
if (result != le16_to_cpu(hid_desc->wDescriptorLength)) {
|
||||
err("Failed to get HID Report Descriptor of size: %d",
|
||||
hid_desc->wDescriptorLength);
|
||||
|
@ -929,12 +933,6 @@ static int gtco_probe(struct usb_interface *usbinterface,
|
|||
goto err_free_urb;
|
||||
}
|
||||
|
||||
/* Now we parse the report */
|
||||
parse_hid_report_descriptor(gtco, report, result);
|
||||
|
||||
/* Now we delete it */
|
||||
kfree(report);
|
||||
|
||||
/* Create a device file node */
|
||||
usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath));
|
||||
strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath));
|
||||
|
@ -988,7 +986,6 @@ static int gtco_probe(struct usb_interface *usbinterface,
|
|||
usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE,
|
||||
gtco->buffer, gtco->buf_dma);
|
||||
err_free_devs:
|
||||
kfree(report);
|
||||
input_free_device(input_dev);
|
||||
kfree(gtco);
|
||||
return error;
|
||||
|
|
|
@ -84,6 +84,15 @@ static int delay = 4;
|
|||
module_param(delay, int, 0);
|
||||
MODULE_PARM_DESC(delay, "Set adc sample delay.");
|
||||
|
||||
/*
|
||||
* Set five_wire = 1 to use a 5 wire touchscreen.
|
||||
*
|
||||
* NOTE: Five wire mode does not allow for readback of pressure.
|
||||
*/
|
||||
static int five_wire;
|
||||
module_param(five_wire, int, 0);
|
||||
MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen.");
|
||||
|
||||
/*
|
||||
* Set adc mask function.
|
||||
*
|
||||
|
@ -162,6 +171,19 @@ static void wm9713_phy_init(struct wm97xx *wm)
|
|||
64000 / rpu);
|
||||
}
|
||||
|
||||
/* Five wire panel? */
|
||||
if (five_wire) {
|
||||
dig3 |= WM9713_45W;
|
||||
dev_info(wm->dev, "setting 5-wire touchscreen mode.");
|
||||
|
||||
if (pil) {
|
||||
dev_warn(wm->dev,
|
||||
"Pressure measurement not supported in 5 "
|
||||
"wire mode, disabling\n");
|
||||
pil = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* touchpanel pressure */
|
||||
if (pil == 2) {
|
||||
dig3 |= WM9712_PIL;
|
||||
|
|
|
@ -608,6 +608,17 @@ static int wm97xx_probe(struct device *dev)
|
|||
goto alloc_err;
|
||||
}
|
||||
|
||||
/* set up physical characteristics */
|
||||
wm->codec->phy_init(wm);
|
||||
|
||||
/* load gpio cache */
|
||||
wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG);
|
||||
wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
|
||||
wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
|
||||
wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
|
||||
wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
|
||||
wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
|
||||
|
||||
wm->input_dev = input_allocate_device();
|
||||
if (wm->input_dev == NULL) {
|
||||
ret = -ENOMEM;
|
||||
|
@ -616,6 +627,7 @@ static int wm97xx_probe(struct device *dev)
|
|||
|
||||
/* set up touch configuration */
|
||||
wm->input_dev->name = "wm97xx touchscreen";
|
||||
wm->input_dev->phys = "wm97xx";
|
||||
wm->input_dev->open = wm97xx_ts_input_open;
|
||||
wm->input_dev->close = wm97xx_ts_input_close;
|
||||
set_bit(EV_ABS, wm->input_dev->evbit);
|
||||
|
@ -634,17 +646,6 @@ static int wm97xx_probe(struct device *dev)
|
|||
if (ret < 0)
|
||||
goto dev_alloc_err;
|
||||
|
||||
/* set up physical characteristics */
|
||||
wm->codec->phy_init(wm);
|
||||
|
||||
/* load gpio cache */
|
||||
wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG);
|
||||
wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
|
||||
wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
|
||||
wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
|
||||
wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
|
||||
wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
|
||||
|
||||
/* register our battery device */
|
||||
wm->battery_dev = platform_device_alloc("wm97xx-battery", -1);
|
||||
if (!wm->battery_dev) {
|
||||
|
@ -801,7 +802,7 @@ void wm97xx_unregister_mach_ops(struct wm97xx *wm)
|
|||
EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops);
|
||||
|
||||
static struct device_driver wm97xx_driver = {
|
||||
.name = "ac97",
|
||||
.name = "wm97xx-ts",
|
||||
.bus = &ac97_bus_type,
|
||||
.owner = THIS_MODULE,
|
||||
.probe = wm97xx_probe,
|
||||
|
|
|
@ -47,6 +47,9 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
/* Edirol SD-20 */
|
||||
{ USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* appletouch */
|
||||
{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
/* M-Systems Flash Disk Pioneers */
|
||||
{ USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
|
|
|
@ -639,7 +639,9 @@ struct input_absinfo {
|
|||
#define SW_LID 0x00 /* set = lid shut */
|
||||
#define SW_TABLET_MODE 0x01 /* set = tablet mode */
|
||||
#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
|
||||
#define SW_RADIO 0x03 /* set = radio enabled */
|
||||
#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any"
|
||||
set = radio enabled */
|
||||
#define SW_RADIO SW_RFKILL_ALL /* deprecated */
|
||||
#define SW_MAX 0x0f
|
||||
#define SW_CNT (SW_MAX+1)
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
#define WM9713_ADCSEL_Y 0x0004 /* Y measurement */
|
||||
#define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */
|
||||
#define WM9713_COO 0x0001 /* enable coordinate mode */
|
||||
#define WM9713_45W 0x1000 /* set for 5 wire panel */
|
||||
#define WM9713_PDEN 0x0800 /* measure only when pen down */
|
||||
#define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */
|
||||
#define WM9713_WAIT 0x0200 /* coordinate wait */
|
||||
|
|
Loading…
Reference in New Issue