* apm for individual devices
@ 2006-03-07 0:44 Tehn Yit Chin
2006-03-07 1:30 ` Tehn Yit Chin
2006-03-07 3:50 ` Adam Belay
0 siblings, 2 replies; 10+ messages in thread
From: Tehn Yit Chin @ 2006-03-07 0:44 UTC (permalink / raw)
To: linux-pm
Hi all,
How does one use the sysfs entry of power/state that I can find for each
registered device? Eg, for the i2c device on my s3c2410 cpu, I find the
following entry,
/sys/devices/platform/s3c2410-i2c/power/state
I tried echoing "mem" into it, but nothing seems to happen.
What I am looking for is a way of suspending and resuming individual
devices within the PM architecture?
Any pointers would be greatly appreciated.
--
Tehn Yit Chin
Software Engineer, Grey Innovation Pty. Ltd.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-07 0:44 apm for individual devices Tehn Yit Chin
@ 2006-03-07 1:30 ` Tehn Yit Chin
2006-03-07 2:58 ` Patrick Mochel
2006-03-08 15:50 ` Pavel Machek
2006-03-07 3:50 ` Adam Belay
1 sibling, 2 replies; 10+ messages in thread
From: Tehn Yit Chin @ 2006-03-07 1:30 UTC (permalink / raw)
To: Tehn Yit Chin; +Cc: linux-pm
Tehn Yit Chin wrote:
> Hi all,
>
> How does one use the sysfs entry of power/state that I can find for each
> registered device? Eg, for the i2c device on my s3c2410 cpu, I find the
> following entry,
>
> /sys/devices/platform/s3c2410-i2c/power/state
>
> I tried echoing "mem" into it, but nothing seems to happen.
>
> What I am looking for is a way of suspending and resuming individual
> devices within the PM architecture?
>
> Any pointers would be greatly appreciated.
After reading through the mailing list archives, I sort of work it out. ie
echo -n 1 > /sys/devices/platform/s3c2410-i2c/power/state
puts the device into suspend mode.
However, the driver's behaviour doesn't change if I echo a different
number into it. What does this number suppose to do?
Tehn Yit Chin
Software Engineer, Grey Innovation Pty. Ltd.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-07 1:30 ` Tehn Yit Chin
@ 2006-03-07 2:58 ` Patrick Mochel
2006-03-08 15:50 ` Pavel Machek
1 sibling, 0 replies; 10+ messages in thread
From: Patrick Mochel @ 2006-03-07 2:58 UTC (permalink / raw)
To: Tehn Yit Chin; +Cc: linux-pm
[-- Attachment #1: Type: TEXT/PLAIN, Size: 607 bytes --]
On Tue, 7 Mar 2006, Tehn Yit Chin wrote:
> After reading through the mailing list archives, I sort of work it out. ie
>
> echo -n 1 > /sys/devices/platform/s3c2410-i2c/power/state
>
> puts the device into suspend mode.
>
> However, the driver's behaviour doesn't change if I echo a different
> number into it. What does this number suppose to do?
It depends on how the i2c subsystem (and possibly the driver) treats the
number. It might have only 2 states - on (0) and off (1). But, you'll have
to check the i2c documentation, the code, and possibly the developers to
know for sure..
Thanks,
Patrick
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-07 1:30 ` Tehn Yit Chin
2006-03-07 2:58 ` Patrick Mochel
@ 2006-03-08 15:50 ` Pavel Machek
1 sibling, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2006-03-08 15:50 UTC (permalink / raw)
To: Tehn Yit Chin; +Cc: linux-pm
On Út 07-03-06 12:30:22, Tehn Yit Chin wrote:
>
> Tehn Yit Chin wrote:
> >Hi all,
> >
> >How does one use the sysfs entry of power/state that I can find for each
> >registered device? Eg, for the i2c device on my s3c2410 cpu, I find the
> >following entry,
> >
> >/sys/devices/platform/s3c2410-i2c/power/state
> >
> >I tried echoing "mem" into it, but nothing seems to happen.
> >
> >What I am looking for is a way of suspending and resuming individual
> >devices within the PM architecture?
> >
> >Any pointers would be greatly appreciated.
>
> After reading through the mailing list archives, I sort of work it out. ie
>
> echo -n 1 > /sys/devices/platform/s3c2410-i2c/power/state
Actually, it is controlled by 0 and 3 these days. (0 == on, 3 == off).
Pavel
--
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-07 0:44 apm for individual devices Tehn Yit Chin
2006-03-07 1:30 ` Tehn Yit Chin
@ 2006-03-07 3:50 ` Adam Belay
2006-03-07 4:06 ` Tehn Yit Chin
1 sibling, 1 reply; 10+ messages in thread
From: Adam Belay @ 2006-03-07 3:50 UTC (permalink / raw)
To: Tehn Yit Chin; +Cc: linux-pm
[-- Attachment #1: Type: text/plain, Size: 770 bytes --]
On Tue, Mar 07, 2006 at 11:44:35AM +1100, Tehn Yit Chin wrote:
> Hi all,
>
> How does one use the sysfs entry of power/state that I can find for each
> registered device? Eg, for the i2c device on my s3c2410 cpu, I find the
> following entry,
>
> /sys/devices/platform/s3c2410-i2c/power/state
>
> I tried echoing "mem" into it, but nothing seems to happen.
>
> What I am looking for is a way of suspending and resuming individual
> devices within the PM architecture?
>
> Any pointers would be greatly appreciated.
> --
Out of curiousity, why do you need to suspend this individual device?
In other words, what practical runtime power management gains would this
sort of low level and specific power management control provide for your
purposes?
Thanks,
Adam
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-07 3:50 ` Adam Belay
@ 2006-03-07 4:06 ` Tehn Yit Chin
0 siblings, 0 replies; 10+ messages in thread
From: Tehn Yit Chin @ 2006-03-07 4:06 UTC (permalink / raw)
To: Adam Belay; +Cc: linux-pm
Adam Belay wrote:
> On Tue, Mar 07, 2006 at 11:44:35AM +1100, Tehn Yit Chin wrote:
>
>>Hi all,
>>
>>How does one use the sysfs entry of power/state that I can find for each
>>registered device? Eg, for the i2c device on my s3c2410 cpu, I find the
>>following entry,
>>
>>/sys/devices/platform/s3c2410-i2c/power/state
>>
>>I tried echoing "mem" into it, but nothing seems to happen.
>>
>>What I am looking for is a way of suspending and resuming individual
>>devices within the PM architecture?
>>
>>Any pointers would be greatly appreciated.
>>--
>
>
> Out of curiousity, why do you need to suspend this individual device?
> In other words, what practical runtime power management gains would this
> sort of low level and specific power management control provide for your
> purposes?
>
> Thanks,
> Adam
>
>
The example that I use is probably a bad example.
We are developing a consumer electronic product where we need to shut
down various devices in the product's several operating mode to maximise
battery life. Eg: in one of its operating mode, we are not using the
audio codec so we should suspend it to maximise battery life. There are
also several similar scenarios where this could apply.
A better example might have been
echo -n 1 > /dev/devices/platform/product-codec/power/state
cheers,
tyc
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: apm for individual devices
@ 2006-03-07 2:11 Li Qiang-E3422C
2006-03-08 15:51 ` Pavel Machek
0 siblings, 1 reply; 10+ messages in thread
From: Li Qiang-E3422C @ 2006-03-07 2:11 UTC (permalink / raw)
To: Tehn Yit Chin; +Cc: linux-pm
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
'0' indicates the device is on. Other values (1-3) indicate the device
is in a low power state.
You can see ACPI's spec.
-----Original Message-----
From: linux-pm-bounces@lists.osdl.org
[mailto:linux-pm-bounces@lists.osdl.org] On Behalf Of Tehn Yit Chin
Sent: Tuesday, March 07, 2006 9:30 AM
To: Tehn Yit Chin
Cc: linux-pm@lists.osdl.org
Subject: Re: [linux-pm] apm for individual devices
Tehn Yit Chin wrote:
> Hi all,
>
> How does one use the sysfs entry of power/state that I can find for
> each registered device? Eg, for the i2c device on my s3c2410 cpu, I
> find the following entry,
>
> /sys/devices/platform/s3c2410-i2c/power/state
>
> I tried echoing "mem" into it, but nothing seems to happen.
>
> What I am looking for is a way of suspending and resuming individual
> devices within the PM architecture?
>
> Any pointers would be greatly appreciated.
After reading through the mailing list archives, I sort of work it out.
ie
echo -n 1 > /sys/devices/platform/s3c2410-i2c/power/state
puts the device into suspend mode.
However, the driver's behaviour doesn't change if I echo a different
number into it. What does this number suppose to do?
Tehn Yit Chin
Software Engineer, Grey Innovation Pty. Ltd.
_______________________________________________
linux-pm mailing list
linux-pm@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/linux-pm
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-07 2:11 Li Qiang-E3422C
@ 2006-03-08 15:51 ` Pavel Machek
2006-03-09 1:57 ` Tehn Yit Chin
0 siblings, 1 reply; 10+ messages in thread
From: Pavel Machek @ 2006-03-08 15:51 UTC (permalink / raw)
To: Li Qiang-E3422C; +Cc: linux-pm
On Út 07-03-06 10:11:31, Li Qiang-E3422C wrote:
> '0' indicates the device is on. Other values (1-3) indicate the device
> is in a low power state.
> You can see ACPI's spec.
Actually, no. This is broken interface, please do not use it. 0 == on,
2 or 3 == off. But do not use it.
Pavel
--
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-08 15:51 ` Pavel Machek
@ 2006-03-09 1:57 ` Tehn Yit Chin
2006-03-09 1:55 ` Pavel Machek
0 siblings, 1 reply; 10+ messages in thread
From: Tehn Yit Chin @ 2006-03-09 1:57 UTC (permalink / raw)
To: Pavel Machek; +Cc: Li Qiang-E3422C, linux-pm
Pavel Machek wrote:
> On Út 07-03-06 10:11:31, Li Qiang-E3422C wrote:
>
>>'0' indicates the device is on. Other values (1-3) indicate the device
>>is in a low power state.
>>You can see ACPI's spec.
>
>
> Actually, no. This is broken interface, please do not use it. 0 == on,
> 2 or 3 == off. But do not use it.
> Pavel
Are you saying not to the the power/state that is present in the
device's sysfs entry? What interface do you recommend that I use?
cheers,
tyc
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: apm for individual devices
2006-03-09 1:57 ` Tehn Yit Chin
@ 2006-03-09 1:55 ` Pavel Machek
0 siblings, 0 replies; 10+ messages in thread
From: Pavel Machek @ 2006-03-09 1:55 UTC (permalink / raw)
To: Tehn Yit Chin; +Cc: Li Qiang-E3422C, linux-pm
[-- Attachment #1: Type: text/plain, Size: 858 bytes --]
On Čt 09-03-06 12:57:42, Tehn Yit Chin wrote:
> Pavel Machek wrote:
> >On Út 07-03-06 10:11:31, Li Qiang-E3422C wrote:
> >
> >>'0' indicates the device is on. Other values (1-3) indicate the device
> >>is in a low power state.
> >>You can see ACPI's spec.
> >
> >
> >Actually, no. This is broken interface, please do not use it. 0 == on,
> >2 or 3 == off. But do not use it.
>
> Are you saying not to the the power/state that is present in the
> device's sysfs entry? What interface do you recommend that I use?
Parse error. But I'm trying to say that <device>/power/state should
not be used -- it is ugly/broken. Replacement interface is being
prepared by Patrick, I believe, but is not yet in mainline. Feel free
to help Patrick :-).
Pavel
--
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-03-09 1:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-07 0:44 apm for individual devices Tehn Yit Chin
2006-03-07 1:30 ` Tehn Yit Chin
2006-03-07 2:58 ` Patrick Mochel
2006-03-08 15:50 ` Pavel Machek
2006-03-07 3:50 ` Adam Belay
2006-03-07 4:06 ` Tehn Yit Chin
-- strict thread matches above, loose matches on Subject: below --
2006-03-07 2:11 Li Qiang-E3422C
2006-03-08 15:51 ` Pavel Machek
2006-03-09 1:57 ` Tehn Yit Chin
2006-03-09 1:55 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox