summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-adi2.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2015-04-09 11:13:07 +0800
committerLinus Walleij <linus.walleij@linaro.org>2015-05-06 14:45:19 +0200
commitfa76a3db7093a527333c380df82a0f158d9b8299 (patch)
treeadd57323d26140a8e2358da9b93066d096c9c38d /drivers/pinctrl/pinctrl-adi2.c
parentc30024a6449070d6fde51a8bddf4c97f884db2cc (diff)
pinctrl: allow exlusive GPIO/mux pin allocation
Disallow simultaneous use of the the GPIO and peripheral mux functions by setting a flag "strict" in struct pinctrl_desc. The blackfin pinmux and gpio controller doesn't allow user to set up a pin for both GPIO and peripheral function. So, add flag strict in struct pinctrl_desc to check both gpio_owner and mux_owner before approving the pin request. v2-changes: - if strict flag is set, check gpio_owner and mux_onwer in if and else clause v3-changes: - add kerneldoc for this struct - augment Documentation/pinctrl.txt Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-adi2.c')
-rw-r--r--drivers/pinctrl/pinctrl-adi2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c
index 8434439c5017..fbd492668da1 100644
--- a/drivers/pinctrl/pinctrl-adi2.c
+++ b/drivers/pinctrl/pinctrl-adi2.c
@@ -710,6 +710,7 @@ static struct pinctrl_desc adi_pinmux_desc = {
.name = DRIVER_NAME,
.pctlops = &adi_pctrl_ops,
.pmxops = &adi_pinmux_ops,
+ .strict = true,
.owner = THIS_MODULE,
};