diff options
Diffstat (limited to 'drivers/input/touchscreen')
| -rw-r--r-- | drivers/input/touchscreen/jornada720_ts.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm9713.c | 22 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm97xx-core.c | 25 |
3 files changed, 36 insertions, 13 deletions
diff --git a/drivers/input/touchscreen/jornada720_ts.c b/drivers/input/touchscreen/jornada720_ts.c index 742242111bf1..1aca108b1031 100644 --- a/drivers/input/touchscreen/jornada720_ts.c +++ b/drivers/input/touchscreen/jornada720_ts.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); | 25 | MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); |
| 26 | MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); | 26 | MODULE_DESCRIPTION("HP Jornada 710/720/728 touchscreen driver"); |
| 27 | MODULE_LICENSE("GPLv2"); | 27 | MODULE_LICENSE("GPL v2"); |
| 28 | 28 | ||
| 29 | struct jornada_ts { | 29 | struct jornada_ts { |
| 30 | struct input_dev *dev; | 30 | struct input_dev *dev; |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 01278bd7e65c..838458792ea0 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
| @@ -85,6 +85,15 @@ module_param(delay, int, 0); | |||
| 85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); | 85 | MODULE_PARM_DESC(delay, "Set adc sample delay."); |
| 86 | 86 | ||
| 87 | /* | 87 | /* |
| 88 | * Set five_wire = 1 to use a 5 wire touchscreen. | ||
| 89 | * | ||
| 90 | * NOTE: Five wire mode does not allow for readback of pressure. | ||
| 91 | */ | ||
| 92 | static int five_wire; | ||
| 93 | module_param(five_wire, int, 0); | ||
| 94 | MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen."); | ||
| 95 | |||
| 96 | /* | ||
| 88 | * Set adc mask function. | 97 | * Set adc mask function. |
| 89 | * | 98 | * |
| 90 | * Sources of glitch noise, such as signals driving an LCD display, may feed | 99 | * Sources of glitch noise, such as signals driving an LCD display, may feed |
| @@ -162,6 +171,19 @@ static void wm9713_phy_init(struct wm97xx *wm) | |||
| 162 | 64000 / rpu); | 171 | 64000 / rpu); |
| 163 | } | 172 | } |
| 164 | 173 | ||
| 174 | /* Five wire panel? */ | ||
| 175 | if (five_wire) { | ||
| 176 | dig3 |= WM9713_45W; | ||
| 177 | dev_info(wm->dev, "setting 5-wire touchscreen mode."); | ||
| 178 | |||
| 179 | if (pil) { | ||
| 180 | dev_warn(wm->dev, | ||
| 181 | "Pressure measurement not supported in 5 " | ||
| 182 | "wire mode, disabling\n"); | ||
| 183 | pil = 0; | ||
| 184 | } | ||
| 185 | } | ||
| 186 | |||
| 165 | /* touchpanel pressure */ | 187 | /* touchpanel pressure */ |
| 166 | if (pil == 2) { | 188 | if (pil == 2) { |
| 167 | dig3 |= WM9712_PIL; | 189 | dig3 |= WM9712_PIL; |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index e9c7ea46b6e3..cdc24ad314e0 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
| @@ -608,6 +608,17 @@ static int wm97xx_probe(struct device *dev) | |||
| 608 | goto alloc_err; | 608 | goto alloc_err; |
| 609 | } | 609 | } |
| 610 | 610 | ||
| 611 | /* set up physical characteristics */ | ||
| 612 | wm->codec->phy_init(wm); | ||
| 613 | |||
| 614 | /* load gpio cache */ | ||
| 615 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
| 616 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
| 617 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
| 618 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
| 619 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
| 620 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
| 621 | |||
| 611 | wm->input_dev = input_allocate_device(); | 622 | wm->input_dev = input_allocate_device(); |
| 612 | if (wm->input_dev == NULL) { | 623 | if (wm->input_dev == NULL) { |
| 613 | ret = -ENOMEM; | 624 | ret = -ENOMEM; |
| @@ -616,6 +627,7 @@ static int wm97xx_probe(struct device *dev) | |||
| 616 | 627 | ||
| 617 | /* set up touch configuration */ | 628 | /* set up touch configuration */ |
| 618 | wm->input_dev->name = "wm97xx touchscreen"; | 629 | wm->input_dev->name = "wm97xx touchscreen"; |
| 630 | wm->input_dev->phys = "wm97xx"; | ||
| 619 | wm->input_dev->open = wm97xx_ts_input_open; | 631 | wm->input_dev->open = wm97xx_ts_input_open; |
| 620 | wm->input_dev->close = wm97xx_ts_input_close; | 632 | wm->input_dev->close = wm97xx_ts_input_close; |
| 621 | set_bit(EV_ABS, wm->input_dev->evbit); | 633 | set_bit(EV_ABS, wm->input_dev->evbit); |
| @@ -634,17 +646,6 @@ static int wm97xx_probe(struct device *dev) | |||
| 634 | if (ret < 0) | 646 | if (ret < 0) |
| 635 | goto dev_alloc_err; | 647 | goto dev_alloc_err; |
| 636 | 648 | ||
| 637 | /* set up physical characteristics */ | ||
| 638 | wm->codec->phy_init(wm); | ||
| 639 | |||
| 640 | /* load gpio cache */ | ||
| 641 | wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); | ||
| 642 | wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); | ||
| 643 | wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); | ||
| 644 | wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); | ||
| 645 | wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); | ||
| 646 | wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); | ||
| 647 | |||
| 648 | /* register our battery device */ | 649 | /* register our battery device */ |
| 649 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); | 650 | wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); |
| 650 | if (!wm->battery_dev) { | 651 | if (!wm->battery_dev) { |
| @@ -801,7 +802,7 @@ void wm97xx_unregister_mach_ops(struct wm97xx *wm) | |||
| 801 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); | 802 | EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); |
| 802 | 803 | ||
| 803 | static struct device_driver wm97xx_driver = { | 804 | static struct device_driver wm97xx_driver = { |
| 804 | .name = "ac97", | 805 | .name = "wm97xx-ts", |
| 805 | .bus = &ac97_bus_type, | 806 | .bus = &ac97_bus_type, |
| 806 | .owner = THIS_MODULE, | 807 | .owner = THIS_MODULE, |
| 807 | .probe = wm97xx_probe, | 808 | .probe = wm97xx_probe, |
