summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2019-02-01 16:00:13 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2020-02-09 22:45:39 +0100
commit0612630250610d4969a5116970126febad9bfd43 (patch)
tree12f07443b3a7d34af3b9ac751aea64fb38b56874 /drivers/net
parentf26cd04869e4a472e2e39199e2d37cbf70fbf02a (diff)
net: can: flexcan: Add pinmuxing in runtime_supsend
Due to the nature of CAN Tx/Rx pins have to be high when they are idle. After boot, CAN is put into runtime_suspend state. When using xceiver-supply in DT the power to the transceiver is turned off in this state. The Tx/Rx pins are then causing backfeeding. This patch adds selection of the sleep-state pins during runtime_suspend, so someone is able to define another muxing in this sate. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/flexcan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 3c8cf01838d4..550ae1f8b318 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1987,6 +1987,7 @@ static int __maybe_unused flexcan_runtime_suspend(struct device *device)
struct flexcan_priv *priv = netdev_priv(dev);
flexcan_clks_disable(priv);
+ pinctrl_pm_select_sleep_state(priv->dev);
return 0;
}
@@ -1996,6 +1997,7 @@ static int __maybe_unused flexcan_runtime_resume(struct device *device)
struct net_device *dev = dev_get_drvdata(device);
struct flexcan_priv *priv = netdev_priv(dev);
+ pinctrl_pm_select_default_state(priv->dev);
flexcan_clks_enable(priv);
return 0;