diff mbox

[0/4] Current ad7879 patches

Message ID 544AC56F16B56944AEC3BD4E3D5917712E66DFF408@LIMKCMBX1.ad.analog.com
State New, archived
Headers show

Commit Message

Hennerich, Michael June 29, 2010, 12:10 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/touchscreen/ad7879-i2c.c b/drivers/input/touchscreen/ad7879-i2c.c
index 79e3857..d82a38e 100644
--- a/drivers/input/touchscreen/ad7879-i2c.c
+++ b/drivers/input/touchscreen/ad7879-i2c.c
@@ -87,7 +87,7 @@  static int __devinit ad7879_i2c_probe(struct i2c_client *client,
                return -EIO;
        }

-       ts = ad7879_probe(&client->dev, client->irq, AD7879_DEVID,
+       ts = ad7879_probe(&client->dev, AD7879_DEVID, client->irq,
                          &ad7879_i2c_bus_ops);
        if (IS_ERR(ts))
                return PTR_ERR(ts);
diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c
index 6e32f3a..9fa8e5d 100644
--- a/drivers/input/touchscreen/ad7879-spi.c
+++ b/drivers/input/touchscreen/ad7879-spi.c
@@ -141,7 +141,7 @@  static int __devinit ad7879_spi_probe(struct spi_device *spi)
                return -EINVAL;
        }

-       ts = ad7879_probe(&spi->dev, spi->irq, AD7879_DEVID, &ad7879_spi_bus_ops);
+       ts = ad7879_probe(&spi->dev, AD7879_DEVID, spi->irq, &ad7879_spi_bus_ops);
        if (IS_ERR(ts))
                return PTR_ERR(ts);

diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index 4e2c1b7..1ac0713 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -315,7 +315,7 @@  static ssize_t ad7879_disable_store(struct device *dev,
        if (error)
                return error;

-       ad7879_toggle(ts, val);
+       ad7879_toggle(ts, !val);

        return count;
 }
@@ -557,6 +557,8 @@  struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq,
                goto err_free_mem;
        }

+       disable_irq(ts->irq);   /* request_irq returns with irqs enabled */
+
        err = sysfs_create_group(&dev->kobj, &ad7879_attr_group);
        if (err)
                goto err_free_irq;
@@ -565,6 +567,8 @@  struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq,
        if (err)
                goto err_remove_attr;

+       input_set_drvdata(input_dev, ts);
+
        err = input_register_device(input_dev);
        if (err)
                goto err_remove_gpio;