Subject: Re: [PATCH][v3] drivers/memory: Add deep sleep support for IFC

From: Scott Wood <[email-masked]>
Date: Wed, 17 Feb 2016 19:11:29 -0600

On Wed, 2016-02-17 at 17:19 -0600, Leo Li wrote:
> On Wed, Feb 17, 2016 at 8:40 AM, Raghav Dogra <[email-masked]> wrote:
> > 
> > > Is it really necessary to spin here rather than waiting for an interrupt
> > > like
> > > normal?
> > > 
> > 
> > Aren't the global interrupts disabled at this stage? Can we use the
> > interrupt based
> > waits in the deep sleep code? We used it based on the assumption that
> > interrupts
> > cannot be used here.
> 
> At the resume() stage, interrupts are already enabled.  But the
> problem of using interrupt based wait here is that we cannot give a
> correct return value at this point.  And it can also defeat the
> ordering of resume() callbacks for dependent devices.

I didn't say to return from the resume() function before the operation is
done, just to have the resume() function wait for the interrupt.  At the very
least it would make it easier to reuse existing code once this is moved to the
NAND driver, if we don't need a special way of waiting for this operation.

-Scott