aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/auo-pixcir-ts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/auo-pixcir-ts.c')
-rw-r--r--drivers/input/touchscreen/auo-pixcir-ts.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c
index 813413eebab7..6317a9c7884c 100644
--- a/drivers/input/touchscreen/auo-pixcir-ts.c
+++ b/drivers/input/touchscreen/auo-pixcir-ts.c
@@ -511,8 +511,21 @@ static int auo_pixcir_probe(struct i2c_client *client,
511 goto err_gpio_dir; 511 goto err_gpio_dir;
512 } 512 }
513 513
514 if (pdata->init_hw) 514 ret = gpio_request(pdata->gpio_rst, "auo_pixcir_ts_rst");
515 pdata->init_hw(client); 515 if (ret) {
516 dev_err(&client->dev, "request of gpio %d failed, %d\n",
517 pdata->gpio_rst, ret);
518 goto err_gpio_dir;
519 }
520
521 ret = gpio_direction_output(pdata->gpio_rst, 1);
522 if (ret) {
523 dev_err(&client->dev, "setting direction of gpio %d failed %d\n",
524 pdata->gpio_rst, ret);
525 goto err_gpio_rst;
526 }
527
528 msleep(200);
516 529
517 ts->client = client; 530 ts->client = client;
518 ts->touch_ind_mode = 0; 531 ts->touch_ind_mode = 0;
@@ -597,8 +610,9 @@ err_input_register:
597err_fw_vers: 610err_fw_vers:
598 input_free_device(input_dev); 611 input_free_device(input_dev);
599err_input_alloc: 612err_input_alloc:
600 if (pdata->exit_hw) 613 gpio_set_value(pdata->gpio_rst, 0);
601 pdata->exit_hw(client); 614err_gpio_rst:
615 gpio_free(pdata->gpio_rst);
602err_gpio_dir: 616err_gpio_dir:
603 gpio_free(pdata->gpio_int); 617 gpio_free(pdata->gpio_int);
604err_gpio_int: 618err_gpio_int:
@@ -616,8 +630,8 @@ static int auo_pixcir_remove(struct i2c_client *client)
616 630
617 input_unregister_device(ts->input); 631 input_unregister_device(ts->input);
618 632
619 if (pdata->exit_hw) 633 gpio_set_value(pdata->gpio_rst, 0);
620 pdata->exit_hw(client); 634 gpio_free(pdata->gpio_rst);
621 635
622 gpio_free(pdata->gpio_int); 636 gpio_free(pdata->gpio_int);
623 637