summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2019-02-01 16:00:13 +0100
committerPhilippe Schenker <philippe.schenker@toradex.com>2019-03-12 14:39:45 +0100
commita0c3c4a7ea99010be07de68dce38b0f4d1eb5e6c (patch)
tree62a62f96f76ffe7757a56f5cf203b63db5e76762 /drivers
parent5d329f9e3d048b0490dfcd9cce9ff9a334c0d504 (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')
-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 f971d3432f9c..35bcf97e0ce1 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -1779,6 +1779,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;
}
@@ -1788,6 +1789,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;