From: Tony Lindgren <tony@atomide.com>
To: Kevin Hilman <khilman@deeprootsystems.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/2] OMAP2/3: PM: remove /sys/power/clocks_off_while_idle
Date: Tue, 19 May 2009 10:16:29 -0700 [thread overview]
Message-ID: <20090519171629.GB19742@atomide.com> (raw)
In-Reply-To: <1242753264-12600-3-git-send-email-khilman@deeprootsystems.com>
* Kevin Hilman <khilman@deeprootsystems.com> [090519 10:15]:
> The sysfs control /sys/power/clocks_off_while_idle only affects
> the UART clocks. And these can now be controlled with a UART
> specific timeout sysfs control. The system default behavior
> is to have the equivalent of clocks_off_while_idle == 1 and
> a UART inactivity timeout of 5 seconds.
>
> Now one can use
>
> /sys/devices/platform/serial8250.<uart>/sleep_timeout
>
> to set the inactivity timer for the UART in seconds. Setting
> this value to zero disables the timout and is the equivalent
> of doing an
>
> echo 0 > /sys/power/clocks_off_while_idle
Sounds like a nice improvment to me!
Tony
>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---
> arch/arm/mach-omap2/pm.c | 12 ------------
> arch/arm/mach-omap2/pm.h | 1 -
> arch/arm/mach-omap2/serial.c | 3 ---
> 3 files changed, 0 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
> index 58ed520..8633f86 100644
> --- a/arch/arm/mach-omap2/pm.c
> +++ b/arch/arm/mach-omap2/pm.c
> @@ -39,7 +39,6 @@
> #include "pm.h"
>
> unsigned short enable_dyn_sleep;
> -unsigned short clocks_off_while_idle;
> unsigned short enable_off_mode;
> unsigned short voltage_off_while_idle;
> unsigned short wakeup_timer_seconds;
> @@ -52,9 +51,6 @@ static ssize_t idle_store(struct kobject *k, struct kobj_attribute *,
> static struct kobj_attribute sleep_while_idle_attr =
> __ATTR(sleep_while_idle, 0644, idle_show, idle_store);
>
> -static struct kobj_attribute clocks_off_while_idle_attr =
> - __ATTR(clocks_off_while_idle, 0644, idle_show, idle_store);
> -
> static struct kobj_attribute enable_off_mode_attr =
> __ATTR(enable_off_mode, 0644, idle_show, idle_store);
>
> @@ -85,8 +81,6 @@ static ssize_t idle_show(struct kobject *kobj, struct kobj_attribute *attr,
> {
> if (attr == &sleep_while_idle_attr)
> return sprintf(buf, "%hu\n", enable_dyn_sleep);
> - else if (attr == &clocks_off_while_idle_attr)
> - return sprintf(buf, "%hu\n", clocks_off_while_idle);
> else if (attr == &enable_off_mode_attr)
> return sprintf(buf, "%hu\n", enable_off_mode);
> else if (attr == &voltage_off_while_idle_attr)
> @@ -109,8 +103,6 @@ static ssize_t idle_store(struct kobject *kobj, struct kobj_attribute *attr,
>
> if (attr == &sleep_while_idle_attr) {
> enable_dyn_sleep = value;
> - } else if (attr == &clocks_off_while_idle_attr) {
> - clocks_off_while_idle = value;
> } else if (attr == &enable_off_mode_attr) {
> enable_off_mode = value;
> omap3_pm_off_mode_enable(enable_off_mode);
> @@ -255,10 +247,6 @@ static int __init omap_pm_init(void)
> if (error)
> printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
> error = sysfs_create_file(power_kobj,
> - &clocks_off_while_idle_attr.attr);
> - if (error)
> - printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
> - error = sysfs_create_file(power_kobj,
> &enable_off_mode_attr.attr);
> if (error) {
> printk(KERN_ERR "sysfs_create_file failed: %d\n", error);
> diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
> index e523d75..2547e1b 100644
> --- a/arch/arm/mach-omap2/pm.h
> +++ b/arch/arm/mach-omap2/pm.h
> @@ -24,7 +24,6 @@ static inline int omap3_idle_init(void) { return 0; }
> #endif
>
> extern unsigned short enable_dyn_sleep;
> -extern unsigned short clocks_off_while_idle;
> extern unsigned short enable_off_mode;
> extern unsigned short voltage_off_while_idle;
> extern atomic_t sleep_block;
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index c9059fd..8c27700 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -263,9 +263,6 @@ void omap_uart_prepare_idle(int num)
> struct omap_uart_state *uart;
>
> list_for_each_entry(uart, &uart_list, node) {
> - if (!clocks_off_while_idle)
> - continue;
> -
> if (num == uart->num && uart->can_sleep) {
> omap_uart_disable_clocks(uart);
> return;
> --
> 1.6.2.2
>
> --
> 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
next prev parent reply other threads:[~2009-05-19 17:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-19 17:14 [PATCH 0/2] PM: drop clocks_off_while_idle Kevin Hilman
2009-05-19 17:14 ` [PATCH 1/2] OMAP: PM: UART: zero sleep_timeout will disable timeout feature Kevin Hilman
2009-05-19 17:14 ` [PATCH 2/2] OMAP2/3: PM: remove /sys/power/clocks_off_while_idle Kevin Hilman
2009-05-19 17:16 ` Tony Lindgren [this message]
2009-05-19 22:40 ` [PATCH 0/2] PM: drop clocks_off_while_idle Woodruff, Richard
2009-05-19 22:58 ` Kevin Hilman
2009-05-20 16:12 ` Kevin Hilman
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=20090519171629.GB19742@atomide.com \
--to=tony@atomide.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
/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.