From: Ludovic Desroches <ludovic.desroches@microchip.com>
To: Andrei Stefanescu - M50506 <Andrei.Stefanescu@microchip.com>
Cc: "wsa@the-dreams.de" <wsa@the-dreams.de>,
Nicolas Ferre - M43238 <Nicolas.Ferre@microchip.com>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
Cristian Birsan - M91496 <Cristian.Birsan@microchip.com>,
"linux-i2c@vger.kernel.org" <linux-i2c@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] i2c: at91: switched to resume/suspend callbacks.
Date: Wed, 7 Nov 2018 09:39:28 +0100 [thread overview]
Message-ID: <20181107083928.vqgnpw3mmczjn4el@M43218.corp.atmel.com> (raw)
In-Reply-To: <1540203006-805-1-git-send-email-andrei.stefanescu@microchip.com>
On Mon, Oct 22, 2018 at 12:17:47PM +0200, Andrei Stefanescu - M50506 wrote:
> In the previous version of the driver resume/suspend_noirq callbacks
> were used. Because of this, when resuming from suspend-to-ram,
> an I2C (belonging to a FLEXCOM) would resume before FLEXCOM.
> The first read on the I2C bus would then result in a timeout.
>
> This patch switches to resume/suspend callbacks which are
> called after FLEXCOM resumes. FLEXCOM, SPI and USART drivers use
> resume/suspend callbacks.
>
> Signed-off-by: Andrei Stefanescu <andrei.stefanescu@microchip.com>
I can't figure out why we use the _noirq variant. When patches for PM
stuff were sent, suspend/resume callbacks were used but in the latest
version it moved to the _noirq variant without explanation.
Excepting if someone has an argument to keep the _noirq variant,
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Thanks
Regards
Ludovic
> ---
> drivers/i2c/busses/i2c-at91.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
> index bfd1fdf..81f7b94 100644
> --- a/drivers/i2c/busses/i2c-at91.c
> +++ b/drivers/i2c/busses/i2c-at91.c
> @@ -1174,7 +1174,7 @@ static int at91_twi_runtime_resume(struct device *dev)
> return clk_prepare_enable(twi_dev->clk);
> }
>
> -static int at91_twi_suspend_noirq(struct device *dev)
> +static int at91_twi_suspend(struct device *dev)
> {
> if (!pm_runtime_status_suspended(dev))
> at91_twi_runtime_suspend(dev);
> @@ -1182,7 +1182,7 @@ static int at91_twi_suspend_noirq(struct device *dev)
> return 0;
> }
>
> -static int at91_twi_resume_noirq(struct device *dev)
> +static int at91_twi_resume(struct device *dev)
> {
> struct at91_twi_dev *twi_dev = dev_get_drvdata(dev);
> int ret;
> @@ -1202,8 +1202,8 @@ static int at91_twi_resume_noirq(struct device *dev)
> }
>
> static const struct dev_pm_ops at91_twi_pm = {
> - .suspend_noirq = at91_twi_suspend_noirq,
> - .resume_noirq = at91_twi_resume_noirq,
> + .suspend = at91_twi_suspend,
> + .resume = at91_twi_resume,
> .runtime_suspend = at91_twi_runtime_suspend,
> .runtime_resume = at91_twi_runtime_resume,
> };
> --
> 2.7.4
>
next prev parent reply other threads:[~2018-11-07 8:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-22 10:17 [PATCH] i2c: at91: switched to resume/suspend callbacks Andrei.Stefanescu
2018-11-07 8:39 ` Ludovic Desroches [this message]
2018-11-15 14:18 ` Andrei.Stefanescu
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=20181107083928.vqgnpw3mmczjn4el@M43218.corp.atmel.com \
--to=ludovic.desroches@microchip.com \
--cc=Andrei.Stefanescu@microchip.com \
--cc=Cristian.Birsan@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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).