diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-04-23 02:35:25 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-04-23 02:35:25 -0400 |
| commit | 03351ff4d897098a590cb247b6eebc470b8ecb5a (patch) | |
| tree | aed7a98a3d035689364c9ad5d7623d954403681e /drivers/input/touchscreen | |
| parent | 8b86c1c28f569301aa1a113a060f9ed803300903 (diff) | |
| parent | f0e615c3cb72b42191b558c130409335812621d8 (diff) | |
Merge commit 'v2.6.39-rc4' into next
Diffstat (limited to 'drivers/input/touchscreen')
| -rw-r--r-- | drivers/input/touchscreen/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/ads7846.c | 38 | ||||
| -rw-r--r-- | drivers/input/touchscreen/h3600_ts_input.c | 19 | ||||
| -rw-r--r-- | drivers/input/touchscreen/intel-mid-touch.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/mainstone-wm97xx.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/tps6507x-ts.c | 12 | ||||
| -rw-r--r-- | drivers/input/touchscreen/tsc2005.c | 18 | ||||
| -rw-r--r-- | drivers/input/touchscreen/ucb1400_ts.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wacom_w8001.c | 13 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm9705.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm9712.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm9713.c | 2 | ||||
| -rw-r--r-- | drivers/input/touchscreen/wm97xx-core.c | 4 | ||||
| -rw-r--r-- | drivers/input/touchscreen/zylonite-wm97xx.c | 2 |
14 files changed, 71 insertions, 49 deletions
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 6b2d441a7dd..cabd9e54863 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig | |||
| @@ -653,7 +653,7 @@ config TOUCHSCREEN_TOUCHIT213 | |||
| 653 | 653 | ||
| 654 | config TOUCHSCREEN_TSC2005 | 654 | config TOUCHSCREEN_TSC2005 |
| 655 | tristate "TSC2005 based touchscreens" | 655 | tristate "TSC2005 based touchscreens" |
| 656 | depends on SPI_MASTER | 656 | depends on SPI_MASTER && GENERIC_HARDIRQS |
| 657 | help | 657 | help |
| 658 | Say Y here if you have a TSC2005 based touchscreen. | 658 | Say Y here if you have a TSC2005 based touchscreen. |
| 659 | 659 | ||
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index b31e90f0d44..c24946f5125 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
| @@ -946,28 +946,29 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784 | |||
| 946 | struct ads7846_platform_data *pdata = spi->dev.platform_data; | 946 | struct ads7846_platform_data *pdata = spi->dev.platform_data; |
| 947 | int err; | 947 | int err; |
| 948 | 948 | ||
| 949 | /* REVISIT when the irq can be triggered active-low, or if for some | 949 | /* |
| 950 | * REVISIT when the irq can be triggered active-low, or if for some | ||
| 950 | * reason the touchscreen isn't hooked up, we don't need to access | 951 | * reason the touchscreen isn't hooked up, we don't need to access |
| 951 | * the pendown state. | 952 | * the pendown state. |
| 952 | */ | 953 | */ |
| 953 | if (!pdata->get_pendown_state && !gpio_is_valid(pdata->gpio_pendown)) { | ||
| 954 | dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n"); | ||
| 955 | return -EINVAL; | ||
| 956 | } | ||
| 957 | 954 | ||
| 958 | if (pdata->get_pendown_state) { | 955 | if (pdata->get_pendown_state) { |
| 959 | ts->get_pendown_state = pdata->get_pendown_state; | 956 | ts->get_pendown_state = pdata->get_pendown_state; |
| 960 | return 0; | 957 | } else if (gpio_is_valid(pdata->gpio_pendown)) { |
| 961 | } | ||
| 962 | 958 | ||
| 963 | err = gpio_request(pdata->gpio_pendown, "ads7846_pendown"); | 959 | err = gpio_request(pdata->gpio_pendown, "ads7846_pendown"); |
| 964 | if (err) { | 960 | if (err) { |
| 965 | dev_err(&spi->dev, "failed to request pendown GPIO%d\n", | 961 | dev_err(&spi->dev, "failed to request pendown GPIO%d\n", |
| 966 | pdata->gpio_pendown); | 962 | pdata->gpio_pendown); |
| 967 | return err; | 963 | return err; |
| 968 | } | 964 | } |
| 969 | 965 | ||
| 970 | ts->gpio_pendown = pdata->gpio_pendown; | 966 | ts->gpio_pendown = pdata->gpio_pendown; |
| 967 | |||
| 968 | } else { | ||
| 969 | dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n"); | ||
| 970 | return -EINVAL; | ||
| 971 | } | ||
| 971 | 972 | ||
| 972 | return 0; | 973 | return 0; |
| 973 | } | 974 | } |
| @@ -1358,7 +1359,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
| 1358 | err_put_regulator: | 1359 | err_put_regulator: |
| 1359 | regulator_put(ts->reg); | 1360 | regulator_put(ts->reg); |
| 1360 | err_free_gpio: | 1361 | err_free_gpio: |
| 1361 | if (ts->gpio_pendown != -1) | 1362 | if (!ts->get_pendown_state) |
| 1362 | gpio_free(ts->gpio_pendown); | 1363 | gpio_free(ts->gpio_pendown); |
| 1363 | err_cleanup_filter: | 1364 | err_cleanup_filter: |
| 1364 | if (ts->filter_cleanup) | 1365 | if (ts->filter_cleanup) |
| @@ -1388,8 +1389,13 @@ static int __devexit ads7846_remove(struct spi_device *spi) | |||
| 1388 | regulator_disable(ts->reg); | 1389 | regulator_disable(ts->reg); |
| 1389 | regulator_put(ts->reg); | 1390 | regulator_put(ts->reg); |
| 1390 | 1391 | ||
| 1391 | if (ts->gpio_pendown != -1) | 1392 | if (!ts->get_pendown_state) { |
| 1393 | /* | ||
| 1394 | * If we are not using specialized pendown method we must | ||
| 1395 | * have been relying on gpio we set up ourselves. | ||
| 1396 | */ | ||
| 1392 | gpio_free(ts->gpio_pendown); | 1397 | gpio_free(ts->gpio_pendown); |
| 1398 | } | ||
| 1393 | 1399 | ||
| 1394 | if (ts->filter_cleanup) | 1400 | if (ts->filter_cleanup) |
| 1395 | ts->filter_cleanup(ts->filter_data); | 1401 | ts->filter_cleanup(ts->filter_data); |
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c index b4d7f63deff..45f93d0f559 100644 --- a/drivers/input/touchscreen/h3600_ts_input.c +++ b/drivers/input/touchscreen/h3600_ts_input.c | |||
| @@ -62,7 +62,7 @@ MODULE_LICENSE("GPL"); | |||
| 62 | Programmer has no control over these numbers. | 62 | Programmer has no control over these numbers. |
| 63 | TODO there are holes - specifically 1,7,0x0a | 63 | TODO there are holes - specifically 1,7,0x0a |
| 64 | */ | 64 | */ |
| 65 | #define VERSION_ID 0 /* Get Version (request/respose) */ | 65 | #define VERSION_ID 0 /* Get Version (request/response) */ |
| 66 | #define KEYBD_ID 2 /* Keyboard (event) */ | 66 | #define KEYBD_ID 2 /* Keyboard (event) */ |
| 67 | #define TOUCHS_ID 3 /* Touch Screen (event)*/ | 67 | #define TOUCHS_ID 3 /* Touch Screen (event)*/ |
| 68 | #define EEPROM_READ_ID 4 /* (request/response) */ | 68 | #define EEPROM_READ_ID 4 /* (request/response) */ |
| @@ -399,31 +399,34 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv) | |||
| 399 | IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) { | 399 | IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) { |
| 400 | printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); | 400 | printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); |
| 401 | err = -EBUSY; | 401 | err = -EBUSY; |
| 402 | goto fail2; | 402 | goto fail1; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, | 405 | if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, |
| 406 | IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) { | 406 | IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) { |
| 407 | printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); | 407 | printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); |
| 408 | err = -EBUSY; | 408 | err = -EBUSY; |
| 409 | goto fail3; | 409 | goto fail2; |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | serio_set_drvdata(serio, ts); | 412 | serio_set_drvdata(serio, ts); |
| 413 | 413 | ||
| 414 | err = serio_open(serio, drv); | 414 | err = serio_open(serio, drv); |
| 415 | if (err) | 415 | if (err) |
| 416 | return err; | 416 | goto fail3; |
| 417 | 417 | ||
| 418 | //h3600_flite_control(1, 25); /* default brightness */ | 418 | //h3600_flite_control(1, 25); /* default brightness */ |
| 419 | input_register_device(ts->dev); | 419 | err = input_register_device(ts->dev); |
| 420 | if (err) | ||
| 421 | goto fail4; | ||
| 420 | 422 | ||
| 421 | return 0; | 423 | return 0; |
| 422 | 424 | ||
| 423 | fail3: free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts->dev); | 425 | fail4: serio_close(serio); |
| 426 | fail3: serio_set_drvdata(serio, NULL); | ||
| 427 | free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts->dev); | ||
| 424 | fail2: free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts->dev); | 428 | fail2: free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts->dev); |
| 425 | fail1: serio_set_drvdata(serio, NULL); | 429 | fail1: input_free_device(input_dev); |
| 426 | input_free_device(input_dev); | ||
| 427 | kfree(ts); | 430 | kfree(ts); |
| 428 | return err; | 431 | return err; |
| 429 | } | 432 | } |
diff --git a/drivers/input/touchscreen/intel-mid-touch.c b/drivers/input/touchscreen/intel-mid-touch.c index c0307b22d86..66c96bfc552 100644 --- a/drivers/input/touchscreen/intel-mid-touch.c +++ b/drivers/input/touchscreen/intel-mid-touch.c | |||
| @@ -542,7 +542,7 @@ static int __devinit mrstouch_adc_init(struct mrstouch_dev *tsdev) | |||
| 542 | * ADC power on, start, enable PENDET and set loop delay | 542 | * ADC power on, start, enable PENDET and set loop delay |
| 543 | * ADC loop delay is set to 4.5 ms approximately | 543 | * ADC loop delay is set to 4.5 ms approximately |
| 544 | * Loop delay more than this results in jitter in adc readings | 544 | * Loop delay more than this results in jitter in adc readings |
| 545 | * Setting loop delay to 0 (continous loop) in MAXIM stops PENDET | 545 | * Setting loop delay to 0 (continuous loop) in MAXIM stops PENDET |
| 546 | * interrupt generation sometimes. | 546 | * interrupt generation sometimes. |
| 547 | */ | 547 | */ |
| 548 | 548 | ||
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c index b6b8b1c7ece..3242e707625 100644 --- a/drivers/input/touchscreen/mainstone-wm97xx.c +++ b/drivers/input/touchscreen/mainstone-wm97xx.c | |||
| @@ -219,7 +219,7 @@ static int wm97xx_acc_startup(struct wm97xx *wm) | |||
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | wm->pen_irq = gpio_to_irq(irq); | 221 | wm->pen_irq = gpio_to_irq(irq); |
| 222 | set_irq_type(wm->pen_irq, IRQ_TYPE_EDGE_BOTH); | 222 | irq_set_irq_type(wm->pen_irq, IRQ_TYPE_EDGE_BOTH); |
| 223 | } else /* pen irq not supported */ | 223 | } else /* pen irq not supported */ |
| 224 | pen_int = 0; | 224 | pen_int = 0; |
| 225 | 225 | ||
diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c index c8c136cf7bb..43031492d73 100644 --- a/drivers/input/touchscreen/tps6507x-ts.c +++ b/drivers/input/touchscreen/tps6507x-ts.c | |||
| @@ -43,7 +43,6 @@ struct tps6507x_ts { | |||
| 43 | struct input_dev *input_dev; | 43 | struct input_dev *input_dev; |
| 44 | struct device *dev; | 44 | struct device *dev; |
| 45 | char phys[32]; | 45 | char phys[32]; |
| 46 | struct workqueue_struct *wq; | ||
| 47 | struct delayed_work work; | 46 | struct delayed_work work; |
| 48 | unsigned polling; /* polling is active */ | 47 | unsigned polling; /* polling is active */ |
| 49 | struct ts_event tc; | 48 | struct ts_event tc; |
| @@ -220,8 +219,8 @@ done: | |||
| 220 | poll = 1; | 219 | poll = 1; |
| 221 | 220 | ||
| 222 | if (poll) { | 221 | if (poll) { |
| 223 | schd = queue_delayed_work(tsc->wq, &tsc->work, | 222 | schd = schedule_delayed_work(&tsc->work, |
| 224 | msecs_to_jiffies(tsc->poll_period)); | 223 | msecs_to_jiffies(tsc->poll_period)); |
| 225 | if (schd) | 224 | if (schd) |
| 226 | tsc->polling = 1; | 225 | tsc->polling = 1; |
| 227 | else { | 226 | else { |
| @@ -303,7 +302,6 @@ static int tps6507x_ts_probe(struct platform_device *pdev) | |||
| 303 | tsc->input_dev = input_dev; | 302 | tsc->input_dev = input_dev; |
| 304 | 303 | ||
| 305 | INIT_DELAYED_WORK(&tsc->work, tps6507x_ts_handler); | 304 | INIT_DELAYED_WORK(&tsc->work, tps6507x_ts_handler); |
| 306 | tsc->wq = create_workqueue("TPS6507x Touchscreen"); | ||
| 307 | 305 | ||
| 308 | if (init_data) { | 306 | if (init_data) { |
| 309 | tsc->poll_period = init_data->poll_period; | 307 | tsc->poll_period = init_data->poll_period; |
| @@ -325,8 +323,8 @@ static int tps6507x_ts_probe(struct platform_device *pdev) | |||
| 325 | if (error) | 323 | if (error) |
| 326 | goto err2; | 324 | goto err2; |
| 327 | 325 | ||
| 328 | schd = queue_delayed_work(tsc->wq, &tsc->work, | 326 | schd = schedule_delayed_work(&tsc->work, |
| 329 | msecs_to_jiffies(tsc->poll_period)); | 327 | msecs_to_jiffies(tsc->poll_period)); |
| 330 | 328 | ||
| 331 | if (schd) | 329 | if (schd) |
| 332 | tsc->polling = 1; | 330 | tsc->polling = 1; |
| @@ -341,7 +339,6 @@ static int tps6507x_ts_probe(struct platform_device *pdev) | |||
| 341 | 339 | ||
| 342 | err2: | 340 | err2: |
| 343 | cancel_delayed_work_sync(&tsc->work); | 341 | cancel_delayed_work_sync(&tsc->work); |
| 344 | destroy_workqueue(tsc->wq); | ||
| 345 | input_free_device(input_dev); | 342 | input_free_device(input_dev); |
| 346 | err1: | 343 | err1: |
| 347 | kfree(tsc); | 344 | kfree(tsc); |
| @@ -357,7 +354,6 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev) | |||
| 357 | struct input_dev *input_dev = tsc->input_dev; | 354 | struct input_dev *input_dev = tsc->input_dev; |
| 358 | 355 | ||
| 359 | cancel_delayed_work_sync(&tsc->work); | 356 | cancel_delayed_work_sync(&tsc->work); |
| 360 | destroy_workqueue(tsc->wq); | ||
| 361 | 357 | ||
| 362 | input_unregister_device(input_dev); | 358 | input_unregister_device(input_dev); |
| 363 | 359 | ||
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 87420616efa..cbf0ff32267 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c | |||
| @@ -358,7 +358,7 @@ static void __tsc2005_enable(struct tsc2005 *ts) | |||
| 358 | if (ts->esd_timeout && ts->set_reset) { | 358 | if (ts->esd_timeout && ts->set_reset) { |
| 359 | ts->last_valid_interrupt = jiffies; | 359 | ts->last_valid_interrupt = jiffies; |
| 360 | schedule_delayed_work(&ts->esd_work, | 360 | schedule_delayed_work(&ts->esd_work, |
| 361 | round_jiffies(jiffies + | 361 | round_jiffies_relative( |
| 362 | msecs_to_jiffies(ts->esd_timeout))); | 362 | msecs_to_jiffies(ts->esd_timeout))); |
| 363 | } | 363 | } |
| 364 | 364 | ||
| @@ -477,7 +477,14 @@ static void tsc2005_esd_work(struct work_struct *work) | |||
| 477 | int error; | 477 | int error; |
| 478 | u16 r; | 478 | u16 r; |
| 479 | 479 | ||
| 480 | mutex_lock(&ts->mutex); | 480 | if (!mutex_trylock(&ts->mutex)) { |
| 481 | /* | ||
| 482 | * If the mutex is taken, it means that disable or enable is in | ||
| 483 | * progress. In that case just reschedule the work. If the work | ||
| 484 | * is not needed, it will be canceled by disable. | ||
| 485 | */ | ||
| 486 | goto reschedule; | ||
| 487 | } | ||
| 481 | 488 | ||
| 482 | if (time_is_after_jiffies(ts->last_valid_interrupt + | 489 | if (time_is_after_jiffies(ts->last_valid_interrupt + |
| 483 | msecs_to_jiffies(ts->esd_timeout))) | 490 | msecs_to_jiffies(ts->esd_timeout))) |
| @@ -510,11 +517,12 @@ static void tsc2005_esd_work(struct work_struct *work) | |||
| 510 | tsc2005_start_scan(ts); | 517 | tsc2005_start_scan(ts); |
| 511 | 518 | ||
| 512 | out: | 519 | out: |
| 520 | mutex_unlock(&ts->mutex); | ||
| 521 | reschedule: | ||
| 513 | /* re-arm the watchdog */ | 522 | /* re-arm the watchdog */ |
| 514 | schedule_delayed_work(&ts->esd_work, | 523 | schedule_delayed_work(&ts->esd_work, |
| 515 | round_jiffies(jiffies + | 524 | round_jiffies_relative( |
| 516 | msecs_to_jiffies(ts->esd_timeout))); | 525 | msecs_to_jiffies(ts->esd_timeout))); |
| 517 | mutex_unlock(&ts->mutex); | ||
| 518 | } | 526 | } |
| 519 | 527 | ||
| 520 | static int tsc2005_open(struct input_dev *input) | 528 | static int tsc2005_open(struct input_dev *input) |
| @@ -663,7 +671,7 @@ static int __devinit tsc2005_probe(struct spi_device *spi) | |||
| 663 | goto err_remove_sysfs; | 671 | goto err_remove_sysfs; |
| 664 | } | 672 | } |
| 665 | 673 | ||
| 666 | set_irq_wake(spi->irq, 1); | 674 | irq_set_irq_wake(spi->irq, 1); |
| 667 | return 0; | 675 | return 0; |
| 668 | 676 | ||
| 669 | err_remove_sysfs: | 677 | err_remove_sysfs: |
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index 028a5363eea..3b5b5df04dd 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Copyright: MontaVista Software, Inc. | 6 | * Copyright: MontaVista Software, Inc. |
| 7 | * | 7 | * |
| 8 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> | 8 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> |
| 9 | * If something doesnt work and it worked before spliting, e-mail me, | 9 | * If something doesn't work and it worked before spliting, e-mail me, |
| 10 | * dont bother Nicolas please ;-) | 10 | * dont bother Nicolas please ;-) |
| 11 | * | 11 | * |
| 12 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c index 5cb8449c909..c14412ef464 100644 --- a/drivers/input/touchscreen/wacom_w8001.c +++ b/drivers/input/touchscreen/wacom_w8001.c | |||
| @@ -51,6 +51,10 @@ MODULE_LICENSE("GPL"); | |||
| 51 | #define W8001_PKTLEN_TPCCTL 11 /* control packet */ | 51 | #define W8001_PKTLEN_TPCCTL 11 /* control packet */ |
| 52 | #define W8001_PKTLEN_TOUCH2FG 13 | 52 | #define W8001_PKTLEN_TOUCH2FG 13 |
| 53 | 53 | ||
| 54 | /* resolution in points/mm */ | ||
| 55 | #define W8001_PEN_RESOLUTION 100 | ||
| 56 | #define W8001_TOUCH_RESOLUTION 10 | ||
| 57 | |||
| 54 | struct w8001_coord { | 58 | struct w8001_coord { |
| 55 | u8 rdy; | 59 | u8 rdy; |
| 56 | u8 tsw; | 60 | u8 tsw; |
| @@ -198,7 +202,7 @@ static void parse_touchquery(u8 *data, struct w8001_touch_query *query) | |||
| 198 | query->y = 1024; | 202 | query->y = 1024; |
| 199 | if (query->panel_res) | 203 | if (query->panel_res) |
| 200 | query->x = query->y = (1 << query->panel_res); | 204 | query->x = query->y = (1 << query->panel_res); |
| 201 | query->panel_res = 10; | 205 | query->panel_res = W8001_TOUCH_RESOLUTION; |
| 202 | } | 206 | } |
| 203 | } | 207 | } |
| 204 | 208 | ||
| @@ -394,6 +398,8 @@ static int w8001_setup(struct w8001 *w8001) | |||
| 394 | 398 | ||
| 395 | input_set_abs_params(dev, ABS_X, 0, coord.x, 0, 0); | 399 | input_set_abs_params(dev, ABS_X, 0, coord.x, 0, 0); |
| 396 | input_set_abs_params(dev, ABS_Y, 0, coord.y, 0, 0); | 400 | input_set_abs_params(dev, ABS_Y, 0, coord.y, 0, 0); |
| 401 | input_abs_set_res(dev, ABS_X, W8001_PEN_RESOLUTION); | ||
| 402 | input_abs_set_res(dev, ABS_Y, W8001_PEN_RESOLUTION); | ||
| 397 | input_set_abs_params(dev, ABS_PRESSURE, 0, coord.pen_pressure, 0, 0); | 403 | input_set_abs_params(dev, ABS_PRESSURE, 0, coord.pen_pressure, 0, 0); |
| 398 | if (coord.tilt_x && coord.tilt_y) { | 404 | if (coord.tilt_x && coord.tilt_y) { |
| 399 | input_set_abs_params(dev, ABS_TILT_X, 0, coord.tilt_x, 0, 0); | 405 | input_set_abs_params(dev, ABS_TILT_X, 0, coord.tilt_x, 0, 0); |
| @@ -418,14 +424,17 @@ static int w8001_setup(struct w8001 *w8001) | |||
| 418 | w8001->max_touch_x = touch.x; | 424 | w8001->max_touch_x = touch.x; |
| 419 | w8001->max_touch_y = touch.y; | 425 | w8001->max_touch_y = touch.y; |
| 420 | 426 | ||
| 421 | /* scale to pen maximum */ | ||
| 422 | if (w8001->max_pen_x && w8001->max_pen_y) { | 427 | if (w8001->max_pen_x && w8001->max_pen_y) { |
| 428 | /* if pen is supported scale to pen maximum */ | ||
| 423 | touch.x = w8001->max_pen_x; | 429 | touch.x = w8001->max_pen_x; |
| 424 | touch.y = w8001->max_pen_y; | 430 | touch.y = w8001->max_pen_y; |
| 431 | touch.panel_res = W8001_PEN_RESOLUTION; | ||
| 425 | } | 432 | } |
| 426 | 433 | ||
| 427 | input_set_abs_params(dev, ABS_X, 0, touch.x, 0, 0); | 434 | input_set_abs_params(dev, ABS_X, 0, touch.x, 0, 0); |
| 428 | input_set_abs_params(dev, ABS_Y, 0, touch.y, 0, 0); | 435 | input_set_abs_params(dev, ABS_Y, 0, touch.y, 0, 0); |
| 436 | input_abs_set_res(dev, ABS_X, touch.panel_res); | ||
| 437 | input_abs_set_res(dev, ABS_Y, touch.panel_res); | ||
| 429 | 438 | ||
| 430 | switch (touch.sensor_id) { | 439 | switch (touch.sensor_id) { |
| 431 | case 0: | 440 | case 0: |
diff --git a/drivers/input/touchscreen/wm9705.c b/drivers/input/touchscreen/wm9705.c index 6b5be742c27..98e61175d3f 100644 --- a/drivers/input/touchscreen/wm9705.c +++ b/drivers/input/touchscreen/wm9705.c | |||
| @@ -306,7 +306,7 @@ static int wm9705_acc_enable(struct wm97xx *wm, int enable) | |||
| 306 | dig2 = wm->dig[2]; | 306 | dig2 = wm->dig[2]; |
| 307 | 307 | ||
| 308 | if (enable) { | 308 | if (enable) { |
| 309 | /* continous mode */ | 309 | /* continuous mode */ |
| 310 | if (wm->mach_ops->acc_startup && | 310 | if (wm->mach_ops->acc_startup && |
| 311 | (ret = wm->mach_ops->acc_startup(wm)) < 0) | 311 | (ret = wm->mach_ops->acc_startup(wm)) < 0) |
| 312 | return ret; | 312 | return ret; |
diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c index 7490b05c356..2bc2fb80100 100644 --- a/drivers/input/touchscreen/wm9712.c +++ b/drivers/input/touchscreen/wm9712.c | |||
| @@ -419,7 +419,7 @@ static int wm9712_acc_enable(struct wm97xx *wm, int enable) | |||
| 419 | dig2 = wm->dig[2]; | 419 | dig2 = wm->dig[2]; |
| 420 | 420 | ||
| 421 | if (enable) { | 421 | if (enable) { |
| 422 | /* continous mode */ | 422 | /* continuous mode */ |
| 423 | if (wm->mach_ops->acc_startup) { | 423 | if (wm->mach_ops->acc_startup) { |
| 424 | ret = wm->mach_ops->acc_startup(wm); | 424 | ret = wm->mach_ops->acc_startup(wm); |
| 425 | if (ret < 0) | 425 | if (ret < 0) |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 238b5132712..73ec99568f1 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
| @@ -431,7 +431,7 @@ static int wm9713_acc_enable(struct wm97xx *wm, int enable) | |||
| 431 | dig3 = wm->dig[2]; | 431 | dig3 = wm->dig[2]; |
| 432 | 432 | ||
| 433 | if (enable) { | 433 | if (enable) { |
| 434 | /* continous mode */ | 434 | /* continuous mode */ |
| 435 | if (wm->mach_ops->acc_startup && | 435 | if (wm->mach_ops->acc_startup && |
| 436 | (ret = wm->mach_ops->acc_startup(wm)) < 0) | 436 | (ret = wm->mach_ops->acc_startup(wm)) < 0) |
| 437 | return ret; | 437 | return ret; |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index 6b75c9f660a..5dbe73af2f8 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
| @@ -335,7 +335,7 @@ static void wm97xx_pen_irq_worker(struct work_struct *work) | |||
| 335 | */ | 335 | */ |
| 336 | if (!wm->mach_ops->acc_enabled || wm->mach_ops->acc_pen_down) { | 336 | if (!wm->mach_ops->acc_enabled || wm->mach_ops->acc_pen_down) { |
| 337 | if (wm->pen_is_down && !pen_was_down) { | 337 | if (wm->pen_is_down && !pen_was_down) { |
| 338 | /* Data is not availiable immediately on pen down */ | 338 | /* Data is not available immediately on pen down */ |
| 339 | queue_delayed_work(wm->ts_workq, &wm->ts_reader, 1); | 339 | queue_delayed_work(wm->ts_workq, &wm->ts_reader, 1); |
| 340 | } | 340 | } |
| 341 | 341 | ||
| @@ -354,7 +354,7 @@ static void wm97xx_pen_irq_worker(struct work_struct *work) | |||
| 354 | * Codec PENDOWN irq handler | 354 | * Codec PENDOWN irq handler |
| 355 | * | 355 | * |
| 356 | * We have to disable the codec interrupt in the handler because it | 356 | * We have to disable the codec interrupt in the handler because it |
| 357 | * can take upto 1ms to clear the interrupt source. We schedule a task | 357 | * can take up to 1ms to clear the interrupt source. We schedule a task |
| 358 | * in a work queue to do the actual interaction with the chip. The | 358 | * in a work queue to do the actual interaction with the chip. The |
| 359 | * interrupt is then enabled again in the slow handler when the source | 359 | * interrupt is then enabled again in the slow handler when the source |
| 360 | * has been cleared. | 360 | * has been cleared. |
diff --git a/drivers/input/touchscreen/zylonite-wm97xx.c b/drivers/input/touchscreen/zylonite-wm97xx.c index 04884986764..5b0f15ec874 100644 --- a/drivers/input/touchscreen/zylonite-wm97xx.c +++ b/drivers/input/touchscreen/zylonite-wm97xx.c | |||
| @@ -193,7 +193,7 @@ static int zylonite_wm97xx_probe(struct platform_device *pdev) | |||
| 193 | gpio_touch_irq = mfp_to_gpio(MFP_PIN_GPIO26); | 193 | gpio_touch_irq = mfp_to_gpio(MFP_PIN_GPIO26); |
| 194 | 194 | ||
| 195 | wm->pen_irq = IRQ_GPIO(gpio_touch_irq); | 195 | wm->pen_irq = IRQ_GPIO(gpio_touch_irq); |
| 196 | set_irq_type(IRQ_GPIO(gpio_touch_irq), IRQ_TYPE_EDGE_BOTH); | 196 | irq_set_irq_type(IRQ_GPIO(gpio_touch_irq), IRQ_TYPE_EDGE_BOTH); |
| 197 | 197 | ||
| 198 | wm97xx_config_gpio(wm, WM97XX_GPIO_13, WM97XX_GPIO_IN, | 198 | wm97xx_config_gpio(wm, WM97XX_GPIO_13, WM97XX_GPIO_IN, |
| 199 | WM97XX_GPIO_POL_HIGH, | 199 | WM97XX_GPIO_POL_HIGH, |
