From: khilman@ti•com (Kevin Hilman)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v6 09/16] OMAP2+: UART: Add runtime pm support for omap-serial driver
Date: Mon, 10 Oct 2011 16:56:49 -0700 [thread overview]
Message-ID: <87botobdtq.fsf@ti.com> (raw)
In-Reply-To: <1317380495-584-9-git-send-email-govindraj.raja@ti.com> (Govindraj R.'s message of "Fri, 30 Sep 2011 16:31:35 +0530")
"Govindraj.R" <govindraj.raja@ti•com> writes:
> Adapts omap-serial driver to use pm_runtime API's.
>
> Use runtime runtime API's to handle uart clocks and obtain
> device_usage statics. Set runtime API's usage to irq_safe so that
> we can use get_sync from irq context. Auto-suspend for port specific
> activities and put for reg access. Use device_may_wakeup to check
> whether uart has wakeup capabilities and then enable uart runtime
> usage for the uart.
OK. Current patch should do only this part. The rest should be
separate patches with their own descriptive changelogs.
> Removing save_context/restore_context functions from serial.c
> Adding context restore to .runtime_suspend and using reg values from port
> structure to restore the uart port context based on context_loss_count.
> Maintain internal state machine using wakeups_enabled field for avoiding
> repeated enable/disable of uart port wakeup mechanism.
This part should be a separate patch that follows.
> Remove omap_uart_disable_wakeup and modify omap_uart_enable_wakeup
> to accept pdev and bool value to enable/disable the uart wakeup mechanism
> after uart clock's are cut.
>
> omap_hwmod_enable_wakeup is used to set
> pad wakeup for the uarts. PM_WKEN reg values are left to default.
> Removed omap_uart_enable/disable_clocks in serial.c now clock handling
> done with runtime API's.
As stated in previous reviews, this wakeup enable/disable needs more
description as the functionality is changing compared to current code.
Current version modifies wakeup enable/disable at both power-domain
level (PM_WKEN) and at the IO ring.
Updated version modifies wakeups at module-level (SYSCONFIG) and at IO
ring using omap_hwmod_enable_wakeup()
IMO, the updated version makes more sense, but needs a description as to
why that change in functionality will have equivalent results compared
to the existing one.
> By default uart autosuspend delay is set to -1 to avoid character loss
> if uart's are autoidled and woken up on rx pin.
OK, good.
> After boot up UART's can be autoidled by setting autosuspendi delay from sysfs.
>
> echo 3000 > /sys/devices/platform/omap/omap_uart.X/power/autosuspend_delay_ms
> X=0,1,2,3 for UART1/2/3/4. Number of uarts available may vary across omap_soc.
>
> Acked-by: Alan Cox <alan@linux•intel.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti•com>
Kevin
next prev parent reply other threads:[~2011-10-10 23:56 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 11:01 [PATCH v6 01/16] OMAP2+: hwmod: Add API to enable IO ring wakeup Govindraj.R
2011-09-30 11:01 ` [PATCH v6 02/16] OMAP2+: hwmod: Add API to check IO PAD wakeup status Govindraj.R
2011-10-01 14:33 ` Rajendra Nayak
2011-10-03 5:00 ` Govindraj
2011-10-03 5:23 ` Rajendra Nayak
2011-10-03 5:56 ` Govindraj
2011-10-10 22:24 ` Kevin Hilman
2011-10-11 6:17 ` Govindraj
2011-09-30 11:01 ` [PATCH v6 03/16] OMAP2+: UART: cleanup + remove uart pm specific API Govindraj.R
2011-09-30 11:01 ` [PATCH v6 04/16] OMAP2+: UART: cleanup 8250 console driver support Govindraj.R
2011-10-04 21:42 ` Kevin Hilman
2011-10-05 6:54 ` Govindraj
2011-10-05 18:42 ` Kevin Hilman
2011-10-06 8:16 ` Govindraj
2011-09-30 11:01 ` [PATCH v6 05/16] OMAP2+: UART: Cleanup part of clock gating mechanism for uart Govindraj.R
2011-10-10 22:30 ` Kevin Hilman
2011-10-11 6:45 ` Govindraj
2011-09-30 11:01 ` [PATCH v6 06/16] OMAP2+: UART: Remove certain feilds from omap_uart_state struct Govindraj.R
2011-10-10 23:31 ` Kevin Hilman
2011-10-12 10:25 ` Govindraj
2011-09-30 11:01 ` [PATCH v6 07/16] OMAP2+: UART: Add default mux for all uarts Govindraj.R
2011-10-05 19:04 ` Kevin Hilman
2011-10-06 8:21 ` Govindraj
2011-09-30 11:01 ` [PATCH v6 08/16] OMAP2+: UART: Store certain reg values to port structure Govindraj.R
2011-10-10 23:58 ` Kevin Hilman
2011-10-11 13:21 ` Govindraj
2011-09-30 11:01 ` [PATCH v6 09/16] OMAP2+: UART: Add runtime pm support for omap-serial driver Govindraj.R
2011-10-10 23:42 ` Kevin Hilman
2011-10-12 10:37 ` Govindraj
2011-10-10 23:56 ` Kevin Hilman [this message]
2011-10-12 10:35 ` Govindraj
2011-10-13 0:06 ` Kevin Hilman
2011-10-13 1:28 ` Govindraj
2011-10-13 21:22 ` Kevin Hilman
2011-10-14 12:32 ` Govindraj
2011-10-14 17:04 ` Kevin Hilman
2011-10-14 18:29 ` Govindraj
2011-10-01 13:41 ` [PATCH v6 01/16] OMAP2+: hwmod: Add API to enable IO ring wakeup Rajendra Nayak
2011-10-03 15:10 ` Vishwanath Sripathy
2011-10-04 21:03 ` Kevin Hilman
2011-10-05 11:57 ` Rajendra Nayak
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=87botobdtq.fsf@ti.com \
--to=khilman@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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