[PATCH] [MTD] [NAND] GPIO NAND flash driver

Russell King - ARM Linux linux at arm.linux.org.uk
Sun Oct 12 06:43:50 EDT 2008


On Sun, Oct 12, 2008 at 11:35:30AM +0100, David Woodhouse wrote:
> On Sun, 2008-10-12 at 11:13 +0100, Russell King - ARM Linux wrote:
> > Consider the loudspeaker amplifier example.  Does it
> > matter if the amplifier is powered up for a few milliseconds on boot?
> > No.  
> 
> Sometimes it does. Partly because that usually means it's also powered
> up during wake from suspend -- so you get horrible clicks when resume.
> Which if you suspend as often as OLPC does, for example, is a pain.

As I've pointed out, it's hardware dependent.

If your hardware has "sleep modes" for GPIO which are preserved until
you explicitly release the GPIO hardware from sleep state - giving you
a chance to restore the GPIO registers on resume without the external
hardware seeing glitches - then you set the sleep mode state so the
GPIO for the amplifier is set as an output, and driven to the "powered
down" level.

On hardware which doesn't have that facility, then yes you do want
pull-ups and pull-downs.  But just because your hardware doesn't have
sensible GPIO hardware, that's no reason to outlaw setting GPIOs to
their inactive states while unloading drivers.



More information about the linux-mtd mailing list