mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
input: touchscreen: ft5436: fix vdd can not be closed
Signed-off-by: Weixin Zhou <zwx@rock-chips.com> Change-Id: I69fb237e2bd23ce6061172a0df68e7c54efe647b
This commit is contained in:
@@ -1010,10 +1010,12 @@ static int fts_power_source_init(struct fts_ts_data *ts_data)
|
||||
fts_pinctrl_select_normal(ts_data);
|
||||
#endif
|
||||
|
||||
ts_data->power_disabled = true;
|
||||
ret = fts_power_source_ctrl(ts_data, ENABLE);
|
||||
if (ret) {
|
||||
FTS_ERROR("fail to enable power(regulator)");
|
||||
if (!regulator_is_enabled(ts_data->vdd)) {
|
||||
ts_data->power_disabled = true;
|
||||
ret = fts_power_source_ctrl(ts_data, ENABLE);
|
||||
if (ret) {
|
||||
FTS_ERROR("fail to enable power(regulator)");
|
||||
}
|
||||
}
|
||||
|
||||
FTS_FUNC_EXIT();
|
||||
@@ -1228,7 +1230,7 @@ static int fts_parse_dt(struct device *dev, struct fts_ts_platform_data *pdata)
|
||||
0, &pdata->irq_gpio_flags);
|
||||
if (pdata->pwr_gpio < 0)
|
||||
FTS_ERROR("Unable to get pwr_gpio");
|
||||
|
||||
else
|
||||
gpio_direction_output(pdata->pwr_gpio, 1);
|
||||
|
||||
ret = of_property_read_u32(np, "focaltech,max-touch-number", &temp_val);
|
||||
|
||||
@@ -114,11 +114,11 @@ struct ftxxxx_proc {
|
||||
};
|
||||
|
||||
struct fts_ts_platform_data {
|
||||
u32 irq_gpio;
|
||||
int irq_gpio;
|
||||
u32 irq_gpio_flags;
|
||||
u32 reset_gpio;
|
||||
int reset_gpio;
|
||||
u32 reset_gpio_flags;
|
||||
u32 pwr_gpio;
|
||||
int pwr_gpio;
|
||||
u32 pwr_gpio_flags;
|
||||
bool have_key;
|
||||
u32 key_number;
|
||||
|
||||
Reference in New Issue
Block a user