[PATCH] pinctrl: qcom: Enable device links to consumers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Cc: Brian Masney <masneyb@xxxxxxxxxxxxx>
Cc: Lina Iyer <ilina@xxxxxxxxxxxxxx>
Cc: Stephen Boyd <swboyd@xxxxxxxxxxxx>
Cc: Benjamin Gaignard <benjamin.gaignard@xxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
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
---
 drivers/pinctrl/qcom/pinctrl-msm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index ee8119879c4c..d4a6edbccdb9 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -1139,6 +1139,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)) {
-- 
2.20.1




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux