mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
pinctrl: Fix pin_config_*_set_bulk APIs
In commit baeae2041e, 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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user