aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSherman Yin <syin@broadcom.com>2014-05-14 18:30:47 -0700
committerAlex Shi <alex.shi@linaro.org>2014-06-16 11:58:47 +0800
commit1881384399daa2df6cef8117bc133f8f37fcbe83 (patch)
treeace4ccef0fdcc2dcf619590826ea805c867a91d1
parent270cfc4788befe0e1a16bf1b3a7b80d9f4127c57 (diff)
downloadlinux-linaro-stable-v3.10/topic/pinctrl.tar.gz
pinctrl: Fix pin_config_*_set_bulk APIsv3.10/topic/pinctrl
In commit baeae2041e14d5b7a272b9941b88fb56d716f643, Linaro-specific APIs pin_config_set_bulk and pin_config_group_set_bulk were introduced. However, pinconf_check_ops was not updated, and the wrong function was used in the PIN_MAP_TYPE_CONFIGS_PIN case in pinconf_apply_setting. Change-Id: Idc4a802f3d0086b927b808f65270e548b5b927be Signed-off-by: Sherman Yin <syin@broadcom.com>
-rw-r--r--drivers/pinctrl/pinconf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index ad30263a..596a252 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -35,7 +35,9 @@ int pinconf_check_ops(struct pinctrl_dev *pctldev)
return -EINVAL;
}
/* We have to be able to config the pins in SOME way */
- if (!ops->pin_config_set && !ops->pin_config_group_set) {
+ if (!ops->pin_config_set && !ops->pin_config_group_set
+ && !ops->pin_config_set_bulk
+ && !ops->pin_config_group_set_bulk) {
dev_err(pctldev->dev,
"pinconf has to be able to set a pins config\n");
return -EINVAL;
@@ -171,14 +173,14 @@ int pinconf_apply_setting(struct pinctrl_setting const *setting)
dev_err(pctldev->dev, "missing pin_config_set op\n");
return -EINVAL;
}
- if (ops->pin_config_group_set_bulk) {
- ret = ops->pin_config_group_set_bulk(pctldev,
+ if (ops->pin_config_set_bulk) {
+ ret = ops->pin_config_set_bulk(pctldev,
setting->data.configs.group_or_pin,
setting->data.configs.configs,
setting->data.configs.num_configs);
if (ret < 0) {
dev_err(pctldev->dev,
- "pin_config_set op failed for pin %d\n",
+ "pin_config_set_bulk op failed for pin %d\n",
setting->data.configs.group_or_pin);
return ret;
}
@@ -211,7 +213,7 @@ int pinconf_apply_setting(struct pinctrl_setting const *setting)
setting->data.configs.num_configs);
if (ret < 0) {
dev_err(pctldev->dev,
- "pin_config_group_set op failed for group %d\n",
+ "pin_config_group_set_bulk op failed for group %d\n",
setting->data.configs.group_or_pin);
return ret;
}