* [PATCH] can: m_can: select pinctrl state in each suspend/resume function
@ 2018-03-01 12:29 Bich HEMON
2018-03-12 8:50 ` Bich HEMON
0 siblings, 1 reply; 2+ messages in thread
From: Bich HEMON @ 2018-03-01 12:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Maxime Coquelin,
Alexandre TORGUE, Jiri Slaby, linux-serial, devicetree,
linux-arm-kernel, linux-kernel
Cc: Bich HEMON
Make sure to apply the correct pin state in suspend/resume callbacks.
Putting pins in sleep state saves power.
Signed-off-by: Bich Hemon <bich.hemon@st.com>
---
drivers/net/can/m_can/m_can.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index 2594f77..a86ef69 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1700,6 +1700,8 @@ static __maybe_unused int m_can_suspend(struct device *dev)
m_can_clk_stop(priv);
}
+ pinctrl_pm_select_sleep_state(dev);
+
priv->can.state = CAN_STATE_SLEEPING;
return 0;
@@ -1710,6 +1712,8 @@ static __maybe_unused int m_can_resume(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct m_can_priv *priv = netdev_priv(ndev);
+ pinctrl_pm_select_default_state(dev);
+
m_can_init_ram(priv);
priv->can.state = CAN_STATE_ERROR_ACTIVE;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] can: m_can: select pinctrl state in each suspend/resume function
2018-03-01 12:29 [PATCH] can: m_can: select pinctrl state in each suspend/resume function Bich HEMON
@ 2018-03-12 8:50 ` Bich HEMON
0 siblings, 0 replies; 2+ messages in thread
From: Bich HEMON @ 2018-03-12 8:50 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Mark Rutland, Maxime Coquelin,
Alexandre TORGUE, Jiri Slaby, linux-serial, devicetree,
linux-arm-kernel, linux-kernel
Hi all,
On 03/01/2018 01:29 PM, Bich HEMON wrote:
> Make sure to apply the correct pin state in suspend/resume callbacks.
> Putting pins in sleep state saves power.
>
> Signed-off-by: Bich Hemon <bich.hemon@st.com>
> ---
> drivers/net/can/m_can/m_can.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> index 2594f77..a86ef69 100644
> --- a/drivers/net/can/m_can/m_can.c
> +++ b/drivers/net/can/m_can/m_can.c
> @@ -1700,6 +1700,8 @@ static __maybe_unused int m_can_suspend(struct device *dev)
> m_can_clk_stop(priv);
> }
>
> + pinctrl_pm_select_sleep_state(dev);
> +
> priv->can.state = CAN_STATE_SLEEPING;
>
> return 0;
> @@ -1710,6 +1712,8 @@ static __maybe_unused int m_can_resume(struct device *dev)
> struct net_device *ndev = dev_get_drvdata(dev);
> struct m_can_priv *priv = netdev_priv(ndev);
>
> + pinctrl_pm_select_default_state(dev);
> +
> m_can_init_ram(priv);
>
> priv->can.state = CAN_STATE_ERROR_ACTIVE;
>
Sorry, my mistake. Of course this is the wrong mailing list. Please
ignore this patch.
Best regards,
Bich
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-12 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 12:29 [PATCH] can: m_can: select pinctrl state in each suspend/resume function Bich HEMON
2018-03-12 8:50 ` Bich HEMON
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).