diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-05-23 09:54:42 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-04-16 09:37:18 +0200 |
commit | 6a4142828fec8516551e60c90463abc03b2f6e57 (patch) | |
tree | 58ed229e1c4441baa2aa60b8a9764d7ce9d9153f | |
parent | 85ca819454b3c8eb5b607112b59e86793a2c3113 (diff) |
pinctrl: qcom: Enable device links to consumersconsumer-links
A recent core change makes it possible to create device links
between a pin controller and its consumers. This is necessary
to ascertain the right suspend/resume order for the devices:
if a device is using a certain pin control state and want
to switch that before/after going to suspend, then the pin
controller may not be suspended already, and conversely
on the resume path.
Make sure any qcom pin control consumers are suspended before
the qcom pin control is suspended.
Since Qualcomm is one of the few pin controllers implementing
suspend/resume I suppose you will see this problem sooner
or later so let's see if we can just fix it right now before
you run into it.
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Brian Masney <masneyb@onstation.org>
Cc: Lina Iyer <ilina@codeaurora.org>
Cc: Stephen Boyd <swboyd@chromium.org>
Cc: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
You can test this patch by pulling in this branch:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/log/?h=consumer-links
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-msm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 9a398a211d30..6c68dc89a171 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1300,6 +1300,7 @@ int msm_pinctrl_probe(struct platform_device *pdev, pctrl->desc.name = dev_name(&pdev->dev); pctrl->desc.pins = pctrl->soc->pins; pctrl->desc.npins = pctrl->soc->npins; + pctrl->desc.link_consumers = true; pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &pctrl->desc, pctrl); if (IS_ERR(pctrl->pctrl)) { |