All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Wool <vwool@ru.mvista.com>
To: Martin Waitz <tali@admingilde.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] power management for NAND flash
Date: Mon, 12 Sep 2005 20:08:16 +0400	[thread overview]
Message-ID: <4325A7F0.30303@ru.mvista.com> (raw)
In-Reply-To: <20050912152436.GR12535@admingilde.org>

Hi Martin,

Exactly. We should.
But prior to shut off the clock/power down the flash we need to put the 
flash driver into the corresponding state (suspended).

Thus, a typical suspend (pseudo) code for NAND flash will look the 
following way:

static int chip_nand_suspend(struct device *dev, u32 state, u32 level)
{
        int retval = 0;

#ifdef CONFIG_PM
        struct mtd_info *mtd = dev_get_drvdata(dev);
        if (mtd && mtd->suspend && level == SUSPEND_SAVE_STATE) {
                retval = mtd->suspend(mtd);
                if (retval == 0) {
                        /* shut off the clocks and power down the 
controller here */
                }
        }
#endif
        return retval;
}

with a resume routine doing just the oppsite.


Hope that clarifies the whole thing :)

Best regards,
   Vitaly

Martin Waitz wrote:

>hoi :)
>
>On Mon, Sep 12, 2005 at 03:12:44PM +0400, Vitaly Wool wrote:
>  
>
>>the patch inlined below allows to suspend/resume NAND flash.
>>    
>>
>
>shouldn't we call the board driver while suspending,
>to allow to actually power down the NAND flash?
>
>  
>

  reply	other threads:[~2005-09-12 16:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-12 11:12 [PATCH] power management for NAND flash Vitaly Wool
2005-09-12 15:24 ` Martin Waitz
2005-09-12 16:08   ` Vitaly Wool [this message]
2005-09-12 18:39     ` Martin Waitz

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=4325A7F0.30303@ru.mvista.com \
    --to=vwool@ru.mvista.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=tali@admingilde.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.