public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: "DebBarma, Tarun Kanti" <tarun.kanti@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
	"tony@atomide.com" <tony@atomide.com>
Subject: Re: [PATCH v2 08/18] GPIO: OMAP: Use wkup regs off/suspend support flag
Date: Fri, 17 Jun 2011 08:52:04 -0700	[thread overview]
Message-ID: <87lix0cv6j.fsf@ti.com> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB037B9AC59F@dbde02.ent.ti.com> (Tarun Kanti DebBarma's message of "Fri, 17 Jun 2011 11:04:25 +0530")

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

[...]

>> > diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-
>> omap1/gpio16xx.c
>> > index 9a97e60..d1da7c8 100644
>> > --- a/arch/arm/mach-omap1/gpio16xx.c
>> > +++ b/arch/arm/mach-omap1/gpio16xx.c
>> > @@ -52,6 +52,7 @@ static struct __initdata omap_gpio_platform_data
>> omap16xx_mpu_gpio_config = {
>> >     .bank_type              = METHOD_MPUIO,
>> >     .bank_width             = 16,
>> >     .bank_stride            = 1,
>> > +   .suspend_support        = true,
>> >     .regs                   = &omap16xx_mpuio_regs,
>> >  };
>> >
>> > @@ -89,12 +90,16 @@ static struct omap_gpio_reg_offs omap16xx_gpio_regs
>> = {
>> >     .irqenable      = OMAP1610_GPIO_IRQENABLE1,
>> >     .set_irqenable  = OMAP1610_GPIO_SET_IRQENABLE1,
>> >     .clr_irqenable  = OMAP1610_GPIO_CLEAR_IRQENABLE1,
>> > +   .wkup_status    = OMAP1610_GPIO_WAKEUPENABLE,
>> > +   .wkup_clear     = OMAP1610_GPIO_CLEAR_WAKEUPENA,
>> > +   .wkup_set       = OMAP1610_GPIO_SET_WAKEUPENA,
>> >  };
>> >
>> >  static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config
>> = {
>> >     .virtual_irq_start      = IH_GPIO_BASE,
>> >     .bank_type              = METHOD_GPIO_1610,
>> >     .bank_width             = 16,
>> > +   .suspend_support        = true,
>> >     .regs                   = &omap16xx_gpio_regs,
>> >  };
>> >
>> > @@ -125,6 +130,7 @@ static struct __initdata omap_gpio_platform_data
>> omap16xx_gpio2_config = {
>> >     .virtual_irq_start      = IH_GPIO_BASE + 16,
>> >     .bank_type              = METHOD_GPIO_1610,
>> >     .bank_width             = 16,
>> > +   .suspend_support        = true,
>> >     .regs                   = &omap16xx_gpio_regs,
>> >  };
>> >
>> > @@ -155,6 +161,7 @@ static struct __initdata omap_gpio_platform_data
>> omap16xx_gpio3_config = {
>> >     .virtual_irq_start      = IH_GPIO_BASE + 32,
>> >     .bank_type              = METHOD_GPIO_1610,
>> >     .bank_width             = 16,
>> > +   .suspend_support        = true,
>> >     .regs                   = &omap16xx_gpio_regs,
>> >  };
>> >
>> > @@ -185,6 +192,7 @@ static struct __initdata omap_gpio_platform_data
>> omap16xx_gpio4_config = {
>> >     .virtual_irq_start      = IH_GPIO_BASE + 48,
>> >     .bank_type              = METHOD_GPIO_1610,
>> >     .bank_width             = 16,
>> > +   .suspend_support        = true,
>> >     .regs                   = &omap16xx_gpio_regs,
>> >  };
>>
>> Notice that you add a 'suspend_support = true' everywhere you add a the
>> wkup_* registers.  This suggests to me that checking for the presence of
>> one of those registers would tell you the same thing.
>
> Agreed!
>

Specifically, I recommend checking for wake_status, since wake_set and
wake_clear are legacy registers and may not be recommended (or present)
on OMAP4+.

Kevin

  reply	other threads:[~2011-06-17 15:52 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
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 [this message]
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=87lix0cv6j.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox