[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5Ah4H1WDvFOBMhw7RS7XwSNSEet3u_emELFZTGD7rUzyw@mail.gmail.com>
Date: Wed, 29 Oct 2014 10:33:54 -0200
From: Fabio Estevam <festevam@...il.com>
To: Alison Wang <b18965@...escale.com>
Cc: perex@...ex.cz, Takashi Iwai <tiwai@...e.de>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Nicolin Chen <nicoleotsuka@...il.com>,
Xiubo Li <Li.Xiubo@...escale.com>
Subject: Re: [PATCH] audio: sai: Add Power Management support
Hi Alison,
Please always add the driver maintainers (Xiubo Li and Nicolin Chen).
On Wed, Oct 29, 2014 at 1:21 AM, Alison Wang <b18965@...escale.com> wrote:
> +#ifdef CONFIG_PM_SLEEP
> +static int fsl_sai_suspend(struct device *dev)
> +{
> + struct fsl_sai *sai = dev_get_drvdata(dev);
> +
> + regcache_cache_only(sai->regmap, true);
> + regcache_mark_dirty(sai->regmap);
> +
> + return 0;
> +}
> +
> +static int fsl_sai_resume(struct device *dev)
> +{
> + struct fsl_sai *sai = dev_get_drvdata(dev);
> +
> + /* Restore all registers */
> + regcache_cache_only(sai->regmap, false);
> + regcache_sync(sai->regmap);
> +
> + return 0;
> +};
> +#endif /* CONFIG_PM_SLEEP */
> +
> +static const struct dev_pm_ops fsl_sai_pm = {
> + SET_SYSTEM_SLEEP_PM_OPS(fsl_sai_suspend, fsl_sai_resume)
This could be simplified to:
static SIMPLE_DEV_PM_OPS(fsl_sai_pm, fsl_sai_suspend, fsl_sai_resume);
I am also curious as to how you tested it, as I noticed that
suspend/resume is broken on 3.18-rc for mx6sx.
Are you able to do suspend/resume on 3.18-rc on a mx6sx sdb board?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists