From: Zorro Liu Date: Mon, 13 Mar 2017 09:12:09 +0000 (+0800) Subject: driver, touch, gt9xx: enable regulator default X-Git-Tag: firefly_0821_release~351 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=39d4073fe96621fde07bbffe4c9b112d869623cd;p=firefly-linux-kernel-4.4.55.git driver, touch, gt9xx: enable regulator default Change-Id: I6e3e7fe6102c83058078486104f88a31cdf1d65b Signed-off-by: Zorro Liu --- diff --git a/drivers/input/touchscreen/gt9xx/gt9xx.c b/drivers/input/touchscreen/gt9xx/gt9xx.c index b4a538f77289..9d4fb0170c92 100644 --- a/drivers/input/touchscreen/gt9xx/gt9xx.c +++ b/drivers/input/touchscreen/gt9xx/gt9xx.c @@ -2626,6 +2626,11 @@ static int goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id return PTR_ERR(ts->tp_regulator); } + ret = regulator_enable(ts->tp_regulator); + if (ret < 0) + GTP_ERROR("failed to enable tp regulator\n"); + msleep(20); + ts->irq_pin = of_get_named_gpio_flags(np, "touch-gpio", 0, (enum of_gpio_flags *)(&ts->irq_flags)); ts->rst_pin = of_get_named_gpio_flags(np, "reset-gpio", 0, &rst_flags); ts->pwr_pin = of_get_named_gpio_flags(np, "power-gpio", 0, &pwr_flags);