Make compatible for another pinctrl name

Because pinctrl names are same with another touch driver and GPIO pin
numners are not same,so make compatible for another pinctrl name.

Change-Id: I42ad2a1f39f108384ee64585b24c5855a34f59e7
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2379912
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Wenge Zhu 2022-09-07 15:56:08 +08:00 • committed by zhuwg1
commit a0ecf91075

View file

@ -1346,24 +1346,34 @@ static int fts_pinctrl_init(struct fts_ts_data *ts)
ts->pins_active = pinctrl_lookup_state(ts->pinctrl, "pmx_ts_active");
if (IS_ERR_OR_NULL(ts->pins_active)) {
FTS_ERROR("Pin state[active] not found");
ret = PTR_ERR(ts->pins_active);
goto err_pinctrl_lookup;
ts->pins_active = pinctrl_lookup_state(ts->pinctrl, "cli_pmx_ts_active");
if (IS_ERR_OR_NULL(ts->pins_active)) {
FTS_ERROR("Pin state[active] not found");
ret = PTR_ERR(ts->pins_active);
goto err_pinctrl_lookup;
}
}
ts->pins_suspend = pinctrl_lookup_state(ts->pinctrl, "pmx_ts_suspend");
if (IS_ERR_OR_NULL(ts->pins_suspend)) {
FTS_ERROR("Pin state[suspend] not found");
ret = PTR_ERR(ts->pins_suspend);
goto err_pinctrl_lookup;
ts->pins_suspend = pinctrl_lookup_state(ts->pinctrl, "cli_pmx_ts_suspend");
if (IS_ERR_OR_NULL(ts->pins_suspend)) {
FTS_ERROR("Pin state[suspend] not found");
ret = PTR_ERR(ts->pins_suspend);
goto err_pinctrl_lookup;
}
}
ts->pins_release = pinctrl_lookup_state(ts->pinctrl, "pmx_ts_release");
if (IS_ERR_OR_NULL(ts->pins_release)) {
FTS_ERROR("Pin state[release] not found");
ret = PTR_ERR(ts->pins_release);
ts->pins_release = pinctrl_lookup_state(ts->pinctrl, "cli_pmx_ts_release");
if (IS_ERR_OR_NULL(ts->pins_release)) {
FTS_ERROR("Pin state[release] not found");
ret = PTR_ERR(ts->pins_release);
}
}
FTS_INFO("Pinctrl init success");
return 0;
err_pinctrl_lookup:
if (ts->pinctrl) {