[PATCH] pinctrl: sx150x: 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 SX150X consumers are suspended before the
SX150X is suspended.

The SX150X does not implement suspend/resume callbacks,
but the device links are hierarchical, and this also makes
sure that the I2C master where the SX150X is in turn
connected will not suspend before any clients of the pin
control settings are suspended (and conversely for resume).

Cc: Peter Rosin <peda@xxxxxxxxxx>
Cc: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
Cc: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
Cc: Benjamin Gaignard <benjamin.gaignard@xxxxxx>
Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
 drivers/pinctrl/pinctrl-sx150x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c
index 4d87d75b9c6e..8b954f74a63a 100644
--- a/drivers/pinctrl/pinctrl-sx150x.c
+++ b/drivers/pinctrl/pinctrl-sx150x.c
@@ -1151,6 +1151,7 @@ static int sx150x_probe(struct i2c_client *client,
 	pctl->pinctrl_desc.pins = pctl->data->pins;
 	pctl->pinctrl_desc.npins = pctl->data->npins;
 	pctl->pinctrl_desc.owner = THIS_MODULE;
+	pctl->pinctrl_desc.link_consumers = true;
 
 	ret = devm_pinctrl_register_and_init(dev, &pctl->pinctrl_desc,
 					     pctl, &pctl->pctldev);
-- 
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