Linux Power Management development
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@baylibre.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume
Date: Thu, 03 Mar 2016 12:24:23 -0800	[thread overview]
Message-ID: <7h60x3wbrc.fsf@baylibre.com> (raw)
In-Reply-To: <1456874438-26330-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> (Laurent Pinchart's message of "Wed, 2 Mar 2016 01:20:38 +0200")

Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> writes:

> During runtime resume the return values of the start and restore steps
> are ignored. As a result drivers are not notified of runtime resume
> failures and can't propagate them up. Fix it by returning an error if
> either the start or restore step fails, and clean up properly in the
> error path.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/base/power/domain.c | 20 ++++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
>
> This fixes an issue I've noticed with my driver's .runtime_resume() handler
> returning an error that was never propagated out of pm_runtime_get_sync().

Acked-by: Kevin Hilman <khilman@baylibre.com>

> A second issue then appeared. The device .runtime_error field is set to the
> error code returned by my .runtime_resume() handler, but it never reset. Any
> subsequent try to resume the device fails with -EINVAL. I'm not sure what the
> right way to solve that is, advices are welcome.

Probably setting it (back) to zero after each successful runtime_suspend
or runtime_resume is the right way.  Rafael?

Kevin

  reply	other threads:[~2016-03-03 20:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 23:20 [PATCH] PM / Domains: Propagate start and restore errors during runtime resume Laurent Pinchart
2016-03-03 20:24 ` Kevin Hilman [this message]
2016-03-03 20:32   ` Rafael J. Wysocki
2016-03-03 20:34     ` Rafael J. Wysocki
2016-03-03 20:40       ` Laurent Pinchart
2016-03-03 20:32   ` Laurent Pinchart
2016-03-04 10:22 ` Ulf Hansson
2016-03-04 20:38   ` Laurent Pinchart
2016-03-04 21:22     ` Rafael J. Wysocki

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=7h60x3wbrc.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.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