diff options
author | Roshni Shah <roshni.shah@timesys.com> | 2014-01-05 10:23:02 -0500 |
---|---|---|
committer | Roshni Shah <roshni.shah@timesys.com> | 2014-01-05 13:12:54 -0500 |
commit | 81d90159c6aa14b6c713a1280d19a7ba6f8b9e0c (patch) | |
tree | 312d54d3ac7044d725f50517c4f08ae51a85c2cf /drivers | |
parent | f2a0b753bc57f2d40119762879071cbdd0a215fe (diff) |
Quartz: Added Resistive Touch Screen support
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/touchscreen/crtouch_ts.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/crtouch_ts.c b/drivers/input/touchscreen/crtouch_ts.c index e5e23b8d5d78..9d6357be278b 100644 --- a/drivers/input/touchscreen/crtouch_ts.c +++ b/drivers/input/touchscreen/crtouch_ts.c @@ -19,6 +19,7 @@ #include <linux/slab.h> #include <linux/bitops.h> #include <linux/gpio.h> +#include <linux/fsl_devices.h> /* Resistive touch sense status registers */ #define RES_STA_ERROR 0x00 @@ -171,6 +172,7 @@ static int __devinit crtouch_ts_probe(struct i2c_client *client, struct crtouch_ts_data *data; struct input_dev *input_dev; int error; + struct crtouch_platform_data *crtouch_pdata = client->dev.platform_data; data = kzalloc(sizeof(struct crtouch_ts_data), GFP_KERNEL); input_dev = input_allocate_device(); @@ -204,13 +206,13 @@ static int __devinit crtouch_ts_probe(struct i2c_client *client, crtouch_ts_reg_init(data); - error = gpio_request_one(21, GPIOF_IN, "TS_IRQ"); + error = gpio_request_one(crtouch_pdata->irq_gpio, GPIOF_IN, "TS_IRQ"); if (error) { dev_err(&client->dev, "Failed to request gpio\n"); goto err_free_mem; } - error = request_threaded_irq(gpio_to_irq(21), NULL, + error = request_threaded_irq(gpio_to_irq(crtouch_pdata->irq_gpio), NULL, crtouch_ts_interrupt, IRQF_TRIGGER_FALLING, "crtouch_ts", data); if (error) { dev_err(&client->dev, "Failed to register interrupt\n"); |