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: Thu, 30 Jun 2011 15:57:21 -0700 [thread overview]
Message-ID: <87y60jc4ha.fsf@ti.com> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB037BC164D8@dbde02.ent.ti.com> (Tarun Kanti DebBarma's message of "Thu, 30 Jun 2011 19:05:42 +0530")
"DebBarma, Tarun Kanti" <tarun.kanti@ti.com> writes:
> Kevin,
> [...]
>> > -#endif
>> > - default:
>> > - continue;
>> > - }
>> > + if (!bank->suspend_support)
>> > + return 0;
>>
>> Rather than check the flag here in every suspend, don't add a suspend
>> method in dev_pm_ops for banks that don't have the wkup_* registers.
> While trying to implement this comment I am facing issues:
>
> struct device_driver {
> ...
> const struct dev_pm_ops *pm;
>
> ...
> };
>
> Since *pm is constant we can not assign pm->suspend/resume dynamically.
Oh, right.
> Also, I am not sure if it is permissible to have following code in probe:
>
> ... omap_gpio_probe(...)
> {
> ...
> if (bank->regs->wkup_status) {
> pdrv->driver.pm->suspend = omap_gpio_suspend;
> pdrv->driver.pm->resume = omap_gpio_resume;
> }
> ...
>
OK, then I guess having a check for regs->wkup_status in the beginning
of the suspend/resume functions will be fine.
Thanks,
Kevin
next prev parent reply other threads:[~2011-06-30 22:57 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
2011-06-17 15:53 ` DebBarma, Tarun Kanti
2011-06-30 13:35 ` DebBarma, Tarun Kanti
2011-06-30 22:57 ` Kevin Hilman [this message]
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=87y60jc4ha.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