pinctrl: madera: Return ENOTSUPP for unsupported pin attributes

The pin_config_[get|set] functions should return ENOTSUPP if
the requested attribute isn't supported.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Richard Fitzgerald 2018-08-07 10:32:25 +01:00 committed by Linus Walleij
parent 25cb9e5a0e
commit d2f7a82204
1 changed files with 2 additions and 2 deletions

View File

@ -801,7 +801,7 @@ static int madera_pin_conf_get(struct pinctrl_dev *pctldev, unsigned int pin,
result = 1;
break;
default:
break;
return -ENOTSUPP;
}
*config = pinconf_to_config_packed(param, result);
@ -905,7 +905,7 @@ static int madera_pin_conf_set(struct pinctrl_dev *pctldev, unsigned int pin,
conf[1] &= ~MADERA_GP1_DIR;
break;
default:
break;
return -ENOTSUPP;
}
++configs;