aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinmux.c
diff options
context:
space:
mode:
authorDong Aisheng <dong.aisheng@linaro.org>2012-05-14 07:06:37 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-05-15 03:44:50 -0400
commit02b50ce4cb1b6aff7d9f1c0c5b4ceb44107bacb4 (patch)
tree1aabf2f9af80579bda0464c4546ac8370efebcf8 /drivers/pinctrl/pinmux.c
parentc95df2db2cb5a147b42374f391858232517c0576 (diff)
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>
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r--drivers/pinctrl/pinmux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 220fa492c9f0..3d5ac73bd5a7 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -41,8 +41,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev)
41 !ops->get_functions_count || 41 !ops->get_functions_count ||
42 !ops->get_function_name || 42 !ops->get_function_name ||
43 !ops->get_function_groups || 43 !ops->get_function_groups ||
44 !ops->enable || 44 !ops->enable) {
45 !ops->disable) {
46 dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n"); 45 dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n");
47 return -EINVAL; 46 return -EINVAL;
48 } 47 }
@@ -497,7 +496,8 @@ void pinmux_disable_setting(struct pinctrl_setting const *setting)
497 desc->mux_setting = NULL; 496 desc->mux_setting = NULL;
498 } 497 }
499 498
500 ops->disable(pctldev, setting->data.mux.func, setting->data.mux.group); 499 if (ops->disable)
500 ops->disable(pctldev, setting->data.mux.func, setting->data.mux.group);
501} 501}
502 502
503#ifdef CONFIG_DEBUG_FS 503#ifdef CONFIG_DEBUG_FS