public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: Brian Norris <computersforpeace@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Subject: Re: [PATCH 2/2] mtd: pxa3xx_nand: switch to device PM
Date: Fri, 16 Oct 2015 12:24:17 -0300	[thread overview]
Message-ID: <20151016152416.GA14509@laptop.cereza> (raw)
In-Reply-To: <CAAEAJfDWY2ztYK5y=cBsrntztP+Hm_cDFovPY2YeyRS4XXrr8w@mail.gmail.com>

On 15 Oct 03:32 PM, Ezequiel Garcia wrote:
> +Robert
> 
> On 12 October 2015 at 18:07, Brian Norris <computersforpeace@gmail.com> wrote:
> > On Mon, Oct 12, 2015 at 01:33:12PM -0700, Brian Norris wrote:
> >> The old PM model is deprecated. This is equivalent.
> >>
> >> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> >
> > Sorry, this patch was garbage. Below is the correct one:
> >

Tested on Armada XP-GP using standby and checking nandtest
continues to work after a resume.

Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

Patch looks good, so:

Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

Thanks!

> > ---
> >
> > Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> > ---
> >  drivers/mtd/nand/pxa3xx_nand.c | 18 +++++++++++-------
> >  1 file changed, 11 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
> > index cce5a32eef60..51b67ae5ac1c 100644
> > --- a/drivers/mtd/nand/pxa3xx_nand.c
> > +++ b/drivers/mtd/nand/pxa3xx_nand.c
> > @@ -1889,21 +1889,21 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
> >  }
> >
> >  #ifdef CONFIG_PM
> > -static int pxa3xx_nand_suspend(struct platform_device *pdev, pm_message_t state)
> > +static int pxa3xx_nand_suspend(struct device *dev)
> >  {
> > -       struct pxa3xx_nand_info *info = platform_get_drvdata(pdev);
> > +       struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
> >
> >         if (info->state) {
> > -               dev_err(&pdev->dev, "driver busy, state = %d\n", info->state);
> > +               dev_err(dev, "driver busy, state = %d\n", info->state);
> >                 return -EAGAIN;
> >         }
> >
> >         return 0;
> >  }
> >
> > -static int pxa3xx_nand_resume(struct platform_device *pdev)
> > +static int pxa3xx_nand_resume(struct device *dev)
> >  {
> > -       struct pxa3xx_nand_info *info = platform_get_drvdata(pdev);
> > +       struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
> >
> >         /* We don't want to handle interrupt without calling mtd routine */
> >         disable_int(info, NDCR_INT_MASK);
> > @@ -1930,15 +1930,19 @@ static int pxa3xx_nand_resume(struct platform_device *pdev)
> >  #define pxa3xx_nand_resume     NULL
> >  #endif
> >
> > +static const struct dev_pm_ops pxa3xx_nand_pm_ops = {
> > +       .suspend        = pxa3xx_nand_suspend,
> > +       .resume         = pxa3xx_nand_resume,
> > +};
> > +
> >  static struct platform_driver pxa3xx_nand_driver = {
> >         .driver = {
> >                 .name   = "pxa3xx-nand",
> >                 .of_match_table = pxa3xx_nand_dt_ids,
> > +               .pm     = &pxa3xx_nand_pm_ops,
> >         },
> >         .probe          = pxa3xx_nand_probe,
> >         .remove         = pxa3xx_nand_remove,
> > -       .suspend        = pxa3xx_nand_suspend,
> > -       .resume         = pxa3xx_nand_resume,
> >  };
> >
> >  module_platform_driver(pxa3xx_nand_driver);
> > --
> > 2.6.0.rc2.230.g3dd15c0
> >
> >
> > ______________________________________________________
> > Linux MTD discussion mailing list
> > http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> 
> 
> -- 
> Ezequiel García, VanguardiaSur
> www.vanguardiasur.com.ar

-- 
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar

  reply	other threads:[~2015-10-16 15:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 20:33 [PATCH 1/2] mtd: pxa3xx_nand: don't duplicate MTD suspend/resume Brian Norris
2015-10-12 20:33 ` [PATCH 2/2] mtd: pxa3xx_nand: switch to device PM Brian Norris
2015-10-12 21:07   ` Brian Norris
2015-10-15 18:32     ` Ezequiel Garcia
2015-10-16 15:24       ` Ezequiel Garcia [this message]
2015-10-16 16:35         ` Brian Norris
2015-10-15 18:33 ` [PATCH 1/2] mtd: pxa3xx_nand: don't duplicate MTD suspend/resume Ezequiel Garcia
2015-10-16 15:26   ` Ezequiel Garcia
2015-10-16 16:37     ` Brian Norris
2015-10-16 16:50       ` Ezequiel Garcia
2015-10-20 19:33   ` Robert Jarzmik

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=20151016152416.GA14509@laptop.cereza \
    --to=ezequiel@vanguardiasur.com.ar \
    --cc=computersforpeace@gmail.com \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /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