From: Bich HEMON <bich.hemon@st.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre TORGUE <alexandre.torgue@st.com>,
Jiri Slaby <jslaby@suse.com>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] can: m_can: select pinctrl state in each suspend/resume function
Date: Mon, 12 Mar 2018 08:50:03 +0000 [thread overview]
Message-ID: <405c95e3-00e4-ad2a-f5b5-c5e7e2e5abdf@st.com> (raw)
In-Reply-To: <1519907380-15135-1-git-send-email-bich.hemon@st.com>
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
prev parent reply other threads:[~2018-03-12 8:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=405c95e3-00e4-ad2a-f5b5-c5e7e2e5abdf@st.com \
--to=bich.hemon@st.com \
--cc=alexandre.torgue@st.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).