pinctrl: make pinmux disable function optional

Some SoCs may not have pinmux disable function in HW.

Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Dong Aisheng 2012-05-14 19:06:37 +08:00 committed by Linus Walleij
parent c95df2db2c
commit 02b50ce4cb
1 changed files with 3 additions and 3 deletions

View File

@ -41,8 +41,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev)
!ops->get_functions_count ||
!ops->get_function_name ||
!ops->get_function_groups ||
!ops->enable ||
!ops->disable) {
!ops->enable) {
dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n");
return -EINVAL;
}
@ -497,6 +496,7 @@ void pinmux_disable_setting(struct pinctrl_setting const *setting)
desc->mux_setting = NULL;
}
if (ops->disable)
ops->disable(pctldev, setting->data.mux.func, setting->data.mux.group);
}