mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
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:
parent
e8ee2bd612
commit
a0ecf91075
1 changed files with 18 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue