linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tarun.kanti@ti.com (DebBarma, Tarun Kanti)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 12/13] gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_resume
Date: Thu, 8 Mar 2012 09:28:53 +0530	[thread overview]
Message-ID: <CAC83ZvLFoSppTiPw-_a=z_Mnpmk6nHeaadTShdJP8RpDWh9TLg@mail.gmail.com> (raw)
In-Reply-To: <4F574F95.7090801@ti.com>

On Wed, Mar 7, 2012 at 5:37 PM, Santosh Shilimkar
<santosh.shilimkar@ti.com> wrote:
> On Wednesday 07 March 2012 12:16 PM, Tarun Kanti DebBarma wrote:
>> In omap_gpio_runtime_resume() the context restore should be independent
>> of bank->enabled_non_wakeup_gpios. This was preventing context restore
>> of GPIO lines which are not wakeup enabled.
>>
>> Reported-by: Govindraj Raja <govindraj.raja@ti.com>
>> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
>> ---
>> ?drivers/gpio/gpio-omap.c | ? ?2 +-
>> ?1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
>> index 2e8e476..ccfbae0 100644
>> --- a/drivers/gpio/gpio-omap.c
>> +++ b/drivers/gpio/gpio-omap.c
>> @@ -1227,7 +1227,7 @@ static int omap_gpio_runtime_resume(struct device *dev)
>> ? ? ? __raw_writel(bank->context.risingdetect,
>> ? ? ? ? ? ? ? ? ? ?bank->base + bank->regs->risingdetect);
>>
>> - ? ? if (!bank->enabled_non_wakeup_gpios || !bank->workaround_enabled) {
>> + ? ? if (!bank->workaround_enabled) {
> This doesn't seem to be right.
> Don't you want to avoid GPIO restore for banks which are in
> always on domain. Infact the purpose of "enabled_non_wakeup_gpios"
> is exactly that ? Isn't it.
>
> What am I missing ?
The bank->enabled_non_wakeup_gpios is set whenever a gpio line is programmed
as edge trigger as shown below.
(This is not meant to distinguish between gpios in WKUP domain vs
those in PER domain).
The context restore should happen irrespective of whether the trigger
type is edge or level.
In fact context restore was not happening for a gpio line because of
this condition while
testing suspend/resume.

[...]
                if (trigger & IRQ_TYPE_EDGE_BOTH)
                        bank->enabled_non_wakeup_gpios |= gpio_bit;
                else
                        bank->enabled_non_wakeup_gpios &= ~gpio_bit;
[...]
--
Tarun

>
> Regards
> Santosh

  reply	other threads:[~2012-03-08  3:58 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 11:15 [PATCH v3 00/13] gpio/omap: Some more driver cleanup and fixes Tarun Kanti DebBarma
2012-03-07 11:15 ` [PATCH v3 01/13] gpio/omap: remove saved_fallingdetect, saved_risingdetect fields Tarun Kanti DebBarma
2012-03-07 11:15 ` [PATCH v3 02/13] gpio/omap: fix wakeup_en register update in _set_gpio_wakeup() Tarun Kanti DebBarma
2012-03-07 11:59   ` Santosh Shilimkar
2012-03-07 11:15 ` [PATCH v3 03/13] gpio/omap: remove suspend_wakeup field from struct gpio_bank Tarun Kanti DebBarma
2012-03-07 11:15 ` [PATCH v3 04/13] gpio/omap: remove saved_wakeup " Tarun Kanti DebBarma
2012-03-07 11:15 ` [PATCH v3 05/13] gpio/omap: get rid of retrigger variable in gpio_irq_handler Tarun Kanti DebBarma
2012-03-09  8:46   ` DebBarma, Tarun Kanti
2012-03-12 18:53     ` Kevin Hilman
2012-03-12 18:52   ` Kevin Hilman
2012-03-07 11:15 ` [PATCH v3 06/13] gpio/omap: fix trigger type to unsigned Tarun Kanti DebBarma
2012-03-07 11:15 ` [PATCH v3 07/13] gpio/omap: fix _set_gpio_irqenable implementation Tarun Kanti DebBarma
2012-03-07 11:15 ` [PATCH v3 08/13] gpio/omap: remove redundant decoding of gpio offset Tarun Kanti DebBarma
2012-03-07 12:00   ` Santosh Shilimkar
2012-03-07 11:15 ` [PATCH v3 09/13] gpio/omap: remove suspend/resume callbacks Tarun Kanti DebBarma
2012-03-07 12:01   ` Santosh Shilimkar
2012-03-07 11:16 ` [PATCH v3 10/13] gpio/omap: fix missing dataout context save in _set_gpio_dataout_reg Tarun Kanti DebBarma
2012-03-07 12:03   ` Santosh Shilimkar
2012-03-08  3:34     ` DebBarma, Tarun Kanti
2012-03-07 11:16 ` [PATCH v3 11/13] gpio/omap: fix dataout register overwrite in _set_gpio_dataout_* Tarun Kanti DebBarma
2012-03-07 12:04   ` Santosh Shilimkar
2012-03-12 21:54   ` Kevin Hilman
2012-03-13  6:03     ` DebBarma, Tarun Kanti
2012-03-13  6:33       ` DebBarma, Tarun Kanti
2012-03-13  6:52         ` DebBarma, Tarun Kanti
2012-03-13 16:27           ` Kevin Hilman
2012-03-14  1:53             ` DebBarma, Tarun Kanti
2012-03-07 11:16 ` [PATCH v3 12/13] gpio/omap: fix incorrect context restore logic in omap_gpio_runtime_resume Tarun Kanti DebBarma
2012-03-07 12:07   ` Santosh Shilimkar
2012-03-08  3:58     ` DebBarma, Tarun Kanti [this message]
2012-03-08  7:19       ` Shilimkar, Santosh
2012-03-09  9:25         ` DebBarma, Tarun Kanti
2012-03-07 11:16 ` [PATCH v3 13/13] gpio/omap: fix incorrect update to context.irqenable1 Tarun Kanti DebBarma
2012-03-07 12:09   ` Santosh Shilimkar
2012-03-12 22:09   ` Kevin Hilman
2012-03-13  5:31     ` DebBarma, Tarun Kanti
2012-03-12 18:54 ` [PATCH v3 00/13] gpio/omap: Some more driver cleanup and fixes Kevin Hilman
2012-03-12 19:53   ` DebBarma, Tarun Kanti
2012-03-12 20:08     ` DebBarma, Tarun Kanti
2012-03-12 20:27       ` DebBarma, Tarun Kanti
2012-03-12 22:17         ` Kevin Hilman
2012-03-12 22:28         ` Kevin Hilman
2012-03-13  3:57           ` Grant Likely
2012-03-13  4:35             ` DebBarma, Tarun Kanti

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='CAC83ZvLFoSppTiPw-_a=z_Mnpmk6nHeaadTShdJP8RpDWh9TLg@mail.gmail.com' \
    --to=tarun.kanti@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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).