* PM for physmap.c ?
@ 2006-08-23 15:07 Steven Scholz
2006-08-30 14:04 ` Lennert Buytenhek
0 siblings, 1 reply; 3+ messages in thread
From: Steven Scholz @ 2006-08-23 15:07 UTC (permalink / raw)
To: linux-mtd
Hi all,
for quite some time physmap.c uses platform_{device,driver}.
I wonder why it does not contain any (generic) code for power management
yet, i.e. .suspend/.resume functions.
Is it correct that all I would need to survive a suspend/resume cycle is
something like
int physmap_flash_suspend(struct platform_device *dev, pm_message_t state)
{
struct sa_info *info = platform_get_drvdata(dev);
int ret = 0;
if (info)
ret = info->mtd->suspend(info->mtd);
return ret;
}
int physmap_flash_resume(struct platform_device *dev)
{
struct sa_info *info = platform_get_drvdata(dev);
if (info)
info->mtd->resume(info->mtd);
return 0;
}
as stolen from sa1100-flash.c? Or is PM done at some other/higher layer of
the MTD stuff?
Cheers,
--
Steven
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PM for physmap.c ?
2006-08-23 15:07 PM for physmap.c ? Steven Scholz
@ 2006-08-30 14:04 ` Lennert Buytenhek
2006-08-30 15:04 ` Steven Scholz
0 siblings, 1 reply; 3+ messages in thread
From: Lennert Buytenhek @ 2006-08-30 14:04 UTC (permalink / raw)
To: Steven Scholz; +Cc: linux-mtd
On Wed, Aug 23, 2006 at 05:07:27PM +0200, Steven Scholz wrote:
> Hi all,
Hello,
> for quite some time physmap.c uses platform_{device,driver}.
>
> I wonder why it does not contain any (generic) code for power management
> yet, i.e. .suspend/.resume functions.
>
> Is it correct that all I would need to survive a suspend/resume cycle is
> something like
>
> int physmap_flash_suspend(struct platform_device *dev, pm_message_t state)
> {
> struct sa_info *info = platform_get_drvdata(dev);
> int ret = 0;
> if (info)
> ret = info->mtd->suspend(info->mtd);
> return ret;
> }
>
> int physmap_flash_resume(struct platform_device *dev)
> {
> struct sa_info *info = platform_get_drvdata(dev);
> if (info)
> info->mtd->resume(info->mtd);
> return 0;
> }
>
> as stolen from sa1100-flash.c?
Looks OK to me, but that doesn't say much.
cheers,
Lennert
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PM for physmap.c ?
2006-08-30 14:04 ` Lennert Buytenhek
@ 2006-08-30 15:04 ` Steven Scholz
0 siblings, 0 replies; 3+ messages in thread
From: Steven Scholz @ 2006-08-30 15:04 UTC (permalink / raw)
Cc: linux-mtd
Lennert,
>> for quite some time physmap.c uses platform_{device,driver}.
>>
>> I wonder why it does not contain any (generic) code for power management
>> yet, i.e. .suspend/.resume functions.
>>
>> Is it correct that all I would need to survive a suspend/resume cycle is
>> something like
>>
>> int physmap_flash_suspend(struct platform_device *dev, pm_message_t state)
>> {
>> struct sa_info *info = platform_get_drvdata(dev);
>> int ret = 0;
>> if (info)
>> ret = info->mtd->suspend(info->mtd);
>> return ret;
>> }
>>
>> int physmap_flash_resume(struct platform_device *dev)
>> {
>> struct sa_info *info = platform_get_drvdata(dev);
>> if (info)
>> info->mtd->resume(info->mtd);
>> return 0;
>> }
>>
>> as stolen from sa1100-flash.c?
>
> Looks OK to me, but that doesn't say much.
;-) Thanks for your reply anyway. Thought I am getting ignored for asking
stupid things...
However could one of the MTD gurus please state on the following:
- Would the above be enough?
- Is it needed at all? For normal NOR flash (that's what physmap.c is for?).
- What could happen without proper PM handling?
- Is it worth it to provide a proper patch?
Thanks a million!
--
Steven
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-30 15:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-23 15:07 PM for physmap.c ? Steven Scholz
2006-08-30 14:04 ` Lennert Buytenhek
2006-08-30 15:04 ` Steven Scholz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox