lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <405c95e3-00e4-ad2a-f5b5-c5e7e2e5abdf@st.com>
Date:   Mon, 12 Mar 2018 08:50:03 +0000
From:   Bich HEMON <bich.hemon@...com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre TORGUE <alexandre.torgue@...com>,
        "Jiri Slaby" <jslaby@...e.com>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] can: m_can: select pinctrl state in each suspend/resume
 function

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@...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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ