Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186911
b: refs/heads/master
c: 2afa62e
h: refs/heads/master
i:
  186909: ca5be59
  186907: bc47122
  186903: cb15789
  186895: e06c041
  186879: a1f85e1
v: v3
  • Loading branch information
Haojian Zhuang authored and Samuel Ortiz committed Mar 7, 2010
1 parent df1f1ba commit b5a1f54
Show file tree
Hide file tree
Showing 4 changed files with 312 additions and 143 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: 7731074ab21745cde00578148ce760df107eaf27
refs/heads/master: 2afa62ea76027b00e472ddb672191e6e15425b43
15 changes: 5 additions & 10 deletions trunk/drivers/input/touchscreen/88pm860x-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ static irqreturn_t pm860x_touch_handler(int irq, void *data)
int z1, z2, rt = 0;
int ret;

pm860x_mask_irq(chip, irq);
ret = pm860x_bulk_read(touch->i2c, MEAS_TSIX_1, MEAS_LEN, buf);
if (ret < 0)
goto out;
Expand Down Expand Up @@ -83,7 +82,6 @@ static irqreturn_t pm860x_touch_handler(int irq, void *data)
dev_dbg(chip->dev, "pen release\n");
}
input_sync(touch->idev);
pm860x_unmask_irq(chip, irq);

out:
return IRQ_HANDLED;
Expand All @@ -92,15 +90,13 @@ static irqreturn_t pm860x_touch_handler(int irq, void *data)
static int pm860x_touch_open(struct input_dev *dev)
{
struct pm860x_touch *touch = input_get_drvdata(dev);
struct pm860x_chip *chip = touch->chip;
int data, ret;

data = MEAS_PD_EN | MEAS_TSIX_EN | MEAS_TSIY_EN
| MEAS_TSIZ1_EN | MEAS_TSIZ2_EN;
ret = pm860x_set_bits(touch->i2c, MEAS_EN3, data, data);
if (ret < 0)
goto out;
pm860x_unmask_irq(chip, touch->irq);
return 0;
out:
return ret;
Expand All @@ -109,13 +105,11 @@ static int pm860x_touch_open(struct input_dev *dev)
static void pm860x_touch_close(struct input_dev *dev)
{
struct pm860x_touch *touch = input_get_drvdata(dev);
struct pm860x_chip *chip = touch->chip;
int data;

data = MEAS_PD_EN | MEAS_TSIX_EN | MEAS_TSIY_EN
| MEAS_TSIZ1_EN | MEAS_TSIZ2_EN;
pm860x_set_bits(touch->i2c, MEAS_EN3, data, 0);
pm860x_mask_irq(chip, touch->irq);
}

static int __devinit pm860x_touch_probe(struct platform_device *pdev)
Expand Down Expand Up @@ -164,11 +158,12 @@ static int __devinit pm860x_touch_probe(struct platform_device *pdev)
touch->idev->close = pm860x_touch_close;
touch->chip = chip;
touch->i2c = (chip->id == CHIP_PM8607) ? chip->client : chip->companion;
touch->irq = irq;
touch->irq = irq + chip->irq_base;
touch->res_x = pdata->res_x;
input_set_drvdata(touch->idev, touch);

ret = pm860x_request_irq(chip, irq, pm860x_touch_handler, touch);
ret = request_threaded_irq(touch->irq, NULL, pm860x_touch_handler,
IRQF_ONESHOT, "touch", touch);
if (ret < 0)
goto out_irq;

Expand All @@ -194,7 +189,7 @@ static int __devinit pm860x_touch_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, touch);
return 0;
out_rg:
pm860x_free_irq(chip, irq);
free_irq(touch->irq, touch);
out_irq:
input_free_device(touch->idev);
out:
Expand All @@ -207,7 +202,7 @@ static int __devexit pm860x_touch_remove(struct platform_device *pdev)
struct pm860x_touch *touch = platform_get_drvdata(pdev);

input_unregister_device(touch->idev);
pm860x_free_irq(touch->chip, touch->irq);
free_irq(touch->irq, touch);
platform_set_drvdata(pdev, NULL);
kfree(touch);
return 0;
Expand Down
Loading

0 comments on commit b5a1f54

Please sign in to comment.