Input: atmel_mxt_ts - make CHG line high after enabling interrupts
authorIiro Valkonen <iiro.valkonen@atmel.com>
Wed, 13 Apr 2011 06:16:40 +0000 (23:16 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 13 Apr 2011 06:34:16 +0000 (23:34 -0700)
Make the CHG line (interrupt line) go high after the interrupts have been
enabled to make sure we don't miss the falling edge.

Signed-off-by: Iiro Valkonen <iiro.valkonen@atmel.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/atmel_mxt_ts.c

index a97905a17b72e1f84193b91f8c78f7f34677e7ec..2accf1dffee9befe6ea38de353484eb14b55d82c 100644 (file)
@@ -814,10 +814,6 @@ static int mxt_initialize(struct mxt_data *data)
        if (error)
                return error;
 
-       error = mxt_make_highchg(data);
-       if (error)
-               return error;
-
        mxt_handle_pdata(data);
 
        /* Backup to memory */
@@ -1005,6 +1001,10 @@ static ssize_t mxt_update_fw_store(struct device *dev,
 
        enable_irq(data->irq);
 
+       error = mxt_make_highchg(data);
+       if (error)
+               return error;
+
        return count;
 }
 
@@ -1115,6 +1115,10 @@ static int __devinit mxt_probe(struct i2c_client *client,
                goto err_free_object;
        }
 
+       error = mxt_make_highchg(data);
+       if (error)
+               goto err_free_irq;
+
        error = input_register_device(input_dev);
        if (error)
                goto err_free_irq;