linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	Keerthy <j-keerthy@ti.com>, Tero Kristo <t-kristo@ti.com>,
	linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] gpio: omap: Add level wakeup handling for omap4 based SoCs
Date: Wed, 12 Sep 2018 10:09:15 -0700	[thread overview]
Message-ID: <20180912170915.GK5662@atomide.com> (raw)
In-Reply-To: <20180910200624.4494-1-tony@atomide.com>

* Tony Lindgren <tony@atomide.com> [180910 20:10]:
> +static void __maybe_unused
> +omap4_gpio_disable_level_quirk(struct gpio_bank *bank)
> +{
> +	/* Restore level registers after idle */
> +	writel_relaxed(bank->context.leveldetect0,
> +		       bank->base + bank->regs->leveldetect0);
> +	writel_relaxed(bank->context.leveldetect1,
> +		       bank->base + bank->regs->leveldetect1);
> +
> +	/* Clear wake after idle */
> +	writel_relaxed(0, bank->base + bank->regs->wkup_en);

	/* Reset saved wkup_en, it will be set for next idle again */
	bank->context.wake_en = 0;
> +}

Clearing the saved wkup_en is needed above I noticed
testing again with gpio4 which has pdata->loses_context
set.

Otherwise runtime_resume will write to wkup_en enabling
it for runtime which will the next idle fail.

Regards,

Tony

  parent reply	other threads:[~2018-09-12 17:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 20:06 [PATCH] gpio: omap: Add level wakeup handling for omap4 based SoCs Tony Lindgren
2018-09-11 16:58 ` Grygorii Strashko
2018-09-11 18:24   ` Tony Lindgren
2018-09-12  0:23     ` Grygorii Strashko
2018-09-12  0:42       ` Tony Lindgren
2018-09-12 16:08         ` Grygorii Strashko
2018-09-12 17:38           ` Tony Lindgren
2018-09-11 18:41 ` Tony Lindgren
2018-09-12 17:09 ` Tony Lindgren [this message]
2018-09-18 23:28 ` Linus Walleij
2018-09-19  0:28   ` Tony Lindgren

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=20180912170915.GK5662@atomide.com \
    --to=tony@atomide.com \
    --cc=gnurou@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=t-kristo@ti.com \
    /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).