Input: auo-pixcir-ts - set input direction for interrupt gpio
authorHeiko Stübner <heiko@sntech.de>
Sat, 23 Feb 2013 20:06:34 +0000 (12:06 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 25 Feb 2013 03:10:06 +0000 (19:10 -0800)
Previously the gpio was not configured at all.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/auo-pixcir-ts.c

index c6e19a96348e332b67af3057c1ee86fe1e3b7a51..813413eebab7a456d5154e69c1d5d2e193df2da6 100644 (file)
@@ -504,6 +504,13 @@ static int auo_pixcir_probe(struct i2c_client *client,
                goto err_gpio_int;
        }
 
+       ret = gpio_direction_input(pdata->gpio_int);
+       if (ret) {
+               dev_err(&client->dev, "setting direction of gpio %d failed %d\n",
+                       pdata->gpio_int, ret);
+               goto err_gpio_dir;
+       }
+
        if (pdata->init_hw)
                pdata->init_hw(client);
 
@@ -592,6 +599,7 @@ err_fw_vers:
 err_input_alloc:
        if (pdata->exit_hw)
                pdata->exit_hw(client);
+err_gpio_dir:
        gpio_free(pdata->gpio_int);
 err_gpio_int:
        kfree(ts);