All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Varadarajan, Charulatha" <charu@ti.com>
To: Kevin Hilman <khilman@ti.com>
Cc: Tarun Kanti DebBarma <tarun.kanti@ti.com>,
	linux-omap@vger.kernel.org,
	Santosh Shilimkar <santosh.shilimkar@ti.com>,
	Tony Lindgren <tony@atomide.com>
Subject: Re: [RFC PATCH 04/10] OMAP: GPIO: Remove dependency on gpio_bank_count
Date: Fri, 20 May 2011 14:00:15 +0530	[thread overview]
Message-ID: <BANLkTinSL0GYrjhM7BSQvMVKBS+EgdzPbw@mail.gmail.com> (raw)
In-Reply-To: <8739ka7igv.fsf@ti.com>

Kevin,

Thanks for the comments.

On Thu, May 19, 2011 at 22:09, Kevin Hilman <khilman@ti.com> wrote:
> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>
>> From: Charulatha V <charu@ti.com>
>>
>> gpio_bank_count is the count of number of GPIO devices
>> in a SoC. Remove this dependency from the driver. Also remove
>> the dependency on array of pointers to gpio_bank struct of
>> all GPIO devices.
>>
>> The cpu_is*() checks used in omap2_gpio_prepare_for_idle() and
>> omap2_gpio_resume_after_idle() would be removed in one of the
>> patches in this series
>>
>> Signed-off-by: Charulatha V <charu@ti.com>
>
> This is all in the right direction, but some comments about the
> save/restore context...
>
> [...]
>
>> @@ -1497,11 +1494,16 @@ void omap2_gpio_resume_after_idle(void)
>>  /* save the registers of bank 2-6 */
>>  void omap_gpio_save_context(void)
>>  {
>> -     int i;
>> +     struct gpio_bank *bank;
>> +     int i = 0;
>>
>>       /* saving banks from 2-6 only since GPIO1 is in WKUP */
>> -     for (i = 1; i < gpio_bank_count; i++) {
>> -             struct gpio_bank *bank = &gpio_bank[i];
>> +     list_for_each_entry(bank, &omap_gpio_list, node) {
>> +             i++;
>> +
>> +             if (bank->id == 0)
>> +                     continue;
>> +
>
> Rather than add a list iterator here, I'd rather see the save_context
> called from the prepare_for_idle, only for the specific banks needed
> (and then gpio_save_context can be removed from pm34xx.c.)
>
> Similar for restore.

Okay.

>
> If you prefer, you can do that in an additional patch on top of this
> one.

Yes. I am adding a couple of more patches to this series.

-V Charulatha

>
> Kevin
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-05-20  8:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 11:41 [RFC PATCH 00/10] OMAP: GPIO: cleanup GPIO driver Tarun Kanti DebBarma
2011-05-16 11:41 ` [RFC PATCH 01/10] OMAP: GPIO: Avoid cpu_is checks during module ena/disable Tarun Kanti DebBarma
2011-05-16 11:41 ` [RFC PATCH 02/10] ZOOM: QUART: Request reset GPIO Tarun Kanti DebBarma
2011-05-19 16:11   ` Kevin Hilman
2011-05-20  8:23     ` Varadarajan, Charulatha
2011-05-16 11:41 ` [RFC PATCH 03/10] OMAP2PLUS: GPIO: Fix non-wakeup GPIO and rev_ids Tarun Kanti DebBarma
2011-05-16 11:41 ` [RFC PATCH 04/10] OMAP: GPIO: Remove dependency on gpio_bank_count Tarun Kanti DebBarma
2011-05-19 15:42   ` Kevin Hilman
2011-05-20  8:27     ` Varadarajan, Charulatha
2011-05-19 16:39   ` Kevin Hilman
2011-05-20  8:30     ` Varadarajan, Charulatha [this message]
2011-05-16 11:41 ` [RFC PATCH 05/10] OMAP2PLUS: GPIO: Use flag to identify wkup dmn GPIO Tarun Kanti DebBarma
2011-05-19 16:34   ` Kevin Hilman
2011-05-16 11:41 ` [RFC PATCH 06/10] OMAP: GPIO: Use USHRT_MAX for rev offset instead of -1 Tarun Kanti DebBarma
2011-05-19 15:59   ` Kevin Hilman
2011-05-20  8:31     ` Varadarajan, Charulatha
2011-05-20  9:30       ` Kevin Hilman
2011-05-16 11:41 ` [RFC PATCH 07/10] OMAP: GPIO: cleanup suspend and resume functions Tarun Kanti DebBarma
2011-05-19 16:08   ` Kevin Hilman
2011-05-20  9:20   ` Varadarajan, Charulatha
2011-05-16 11:41 ` [RFC PATCH 08/10] OMAP: GPIO: cleanup prepare-for and resume-after idle functions Tarun Kanti DebBarma
2011-05-19 16:10   ` Kevin Hilman
2011-05-16 11:41 ` [RFC PATCH 09/10] OMAP: GPIO: cleanup omap_gpio_free and triggering functions Tarun Kanti DebBarma
2011-05-18 11:03   ` Varadarajan, Charulatha
2011-05-19 16:06   ` Kevin Hilman
2011-05-16 11:41 ` [RFC PATCH 10/10] OMAP: GPIO: remove harcoded offsets in context save and restore Tarun Kanti DebBarma

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=BANLkTinSL0GYrjhM7BSQvMVKBS+EgdzPbw@mail.gmail.com \
    --to=charu@ti.com \
    --cc=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.