public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: xiaolei li <xiaolei.li@mediatek.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: <computersforpeace@gmail.com>, <dwmw2@infradead.org>,
	<linux-mtd@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <rogercc.lin@mediatek.com>,
	<srv_heupstream@mediatek.com>, <bayi.cheng@mediatek.com>
Subject: Re: [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function
Date: Wed, 1 Nov 2017 18:07:03 +0800	[thread overview]
Message-ID: <1509530823.19864.41.camel@mhfsdcap03> (raw)
In-Reply-To: <20171101110021.221fb256@bbrezillon>

Hi Boris,

On Wed, 2017-11-01 at 11:00 +0100, Boris Brezillon wrote:
> Hi Xiaolei,
> 
> On Wed, 1 Nov 2017 14:19:57 +0800
> <xiaolei.li@mediatek.com> wrote:
> 
> > From: Xiaolei Li <xiaolei.li@mediatek.com>
> > 
> > It is necessary to deselect the chip if it was selected before.
> > But now we only select chips when resume nand driver.
> > So, deselect the chip after doing nand reset.
> > 
> > Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
> > ---
> >  drivers/mtd/nand/mtk_nand.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
> > index d86a7d1..a8bf61a 100644
> > --- a/drivers/mtd/nand/mtk_nand.c
> > +++ b/drivers/mtd/nand/mtk_nand.c
> > @@ -1557,6 +1557,7 @@ static int mtk_nfc_resume(struct device *dev)
> >  		for (i = 0; i < chip->nsels; i++) {
> >  			nand->select_chip(mtd, i);
> >  			nand->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
> > +			nand->select_chip(mtd, -1);
> 
> Can you use nand_reset() instead of open-coding this sequence?
> 
OK. Got it.
Will update it in PATCH v2.

Thanks,

Xiaolei

> Thanks,
> 
> Boris
> 
> >  		}
> >  	}
> >  
> 

      reply	other threads:[~2017-11-01 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01  6:19 [PATCH] mtd: nand: mtk: deselect the chip that was selected in resume function xiaolei.li
2017-11-01 10:00 ` Boris Brezillon
2017-11-01 10:07   ` xiaolei li [this message]

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=1509530823.19864.41.camel@mhfsdcap03 \
    --to=xiaolei.li@mediatek.com \
    --cc=bayi.cheng@mediatek.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rogercc.lin@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox