All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Cc: linux-omap@vger.kernel.org, santosh.shilimkar@ti.com, tony@atomide.com
Subject: Re: [PATCH v2 05/18] GPIO: OMAP: Handle save/restore ctx in GPIO driver
Date: Thu, 16 Jun 2011 09:34:53 -0700	[thread overview]
Message-ID: <8739j9raz6.fsf@ti.com> (raw)
In-Reply-To: <1308111776-29130-4-git-send-email-tarun.kanti@ti.com> (Tarun Kanti DebBarma's message of "Wed, 15 Jun 2011 09:52:52 +0530")

Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:

> From: Charulatha V <charu@ti.com>
>
> Modify omap_gpio_prepare_for_idle() & omap_gpio_resume_after_idle() functions
> to handle save context & restore context respectively in the OMAP GPIO driver
> itself instead of calling these functions from pm specific files.
> For this, in gpio_prepare_for_idle(), call *_get_context_loss_count() and in
> gpio_resume_after_idle() call it again. If the count is different, do restore
> context. The workaround_enabled flag is no more required and is removed.
>
> Signed-off-by: Charulatha V <charu@ti.com>

[...]

> @@ -1396,8 +1399,12 @@ void omap2_gpio_resume_after_idle(void)
>  		for (j = 0; j < hweight_long(bank->dbck_enable_mask); j++)
>  			clk_enable(bank->dbck);
>  
> -		if (!workaround_enabled)
> -			continue;
> +		if (bank->get_context_loss_count) {
> +			ctx_lost_cnt_after =
> +				bank->get_context_loss_count(bank->dev);
> +			if (ctx_lost_cnt_after != bank->ctx_loss_count)
> +				omap_gpio_restore_context(bank);
> +		}

Context should be also be restored if you cant know if it's been lost.
IOW, it should also be restored if !bank->get_context_loss_count.

>  		if (!(bank->enabled_non_wakeup_gpios))
>  			continue;
> @@ -1475,74 +1482,50 @@ void omap2_gpio_resume_after_idle(void)
>  			}
>  		}
>  	}
> -
>  }
>  
> -#endif
> -
> -#ifdef CONFIG_ARCH_OMAP3
> -void omap_gpio_save_context(void)
> +void omap_gpio_save_context(struct gpio_bank *bank)

Should also be made static.  Same for restore below.

Kevin

  reply	other threads:[~2011-06-16 16:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15  4:22 [PATCH v2 02/18] GPIO: OMAP2+: Use flag to identify wakeup domain Tarun Kanti DebBarma
2011-06-15  4:22 ` [PATCH v2 03/18] GPIO: OMAP: Make gpio_context part of gpio_bank structure Tarun Kanti DebBarma
2011-06-15  4:22 ` [PATCH v2 04/18] GPIO: OMAP: Fix pwrdm_post_transition call sequence Tarun Kanti DebBarma
2011-06-15  4:22 ` [PATCH v2 05/18] GPIO: OMAP: Handle save/restore ctx in GPIO driver Tarun Kanti DebBarma
2011-06-16 16:34   ` Kevin Hilman [this message]
2011-06-17  5:41     ` DebBarma, Tarun Kanti
2011-06-15  4:22 ` [PATCH v2 06/18] GPIO: OMAP2+: Make non-wakeup GPIO part of pdata Tarun Kanti DebBarma
2011-06-16 16:35   ` Kevin Hilman
2011-06-15  4:22 ` [PATCH 07/18] GPIO: OMAP: Avoid cpu checks during module ena/disable Tarun Kanti DebBarma
2011-06-15  4:22 ` [PATCH v2 08/18] GPIO: OMAP: Use wkup regs off/suspend support flag Tarun Kanti DebBarma
2011-06-16 16:54   ` Kevin Hilman
2011-06-17  5:34     ` DebBarma, Tarun Kanti
2011-06-17 15:52       ` Kevin Hilman
2011-06-17 15:53         ` DebBarma, Tarun Kanti
2011-06-30 13:35     ` DebBarma, Tarun Kanti
2011-06-30 22:57       ` Kevin Hilman
2011-06-16 17:38   ` Kevin Hilman
2011-06-17  5:24     ` DebBarma, Tarun Kanti
2011-06-15  4:22 ` [PATCH v2 09/18] GPIO: OMAP: Use level/edge detect reg offsets Tarun Kanti DebBarma
2011-06-16 17:00   ` Kevin Hilman
2011-06-17  5:26     ` 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=8739j9raz6.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=tarun.kanti@ti.com \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.