Re: [PATCH] audio: sai: Add Power Management support

2014-10-30 Thread Huan Wang
Hi, Fabio, Please always add the driver maintainers (Xiubo Li and Nicolin Chen). [Alison Wang] ok, thanks for your reminder. On Wed, Oct 29, 2014 at 1:21 AM, Alison Wang wrote: > +#ifdef CONFIG_PM_SLEEP > +static int fsl_sai_suspend(struct device *dev) > +{ > + struct fsl_sai *sai =

Re: [PATCH] audio: sai: Add Power Management support

2014-10-30 Thread Huan Wang
Hi, On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: > This patch adds Power Management support for SAI. > Activate regmap cache with REGCACHE_RBTREE, and use Are you sure that REGCACHE_RBTREE is the best option here? For MMIO devices the cost tradeoff for the rbtree is usually

Re: [PATCH] audio: sai: Add Power Management support

2014-10-30 Thread Mark Brown
On Thu, Oct 30, 2014 at 03:30:40AM +, li.xi...@freescale.com wrote: > One more thing, if the device is not performance critical, then shouldn't we > Take care of the cache memory consumption to determine using flat or rbtree > Type ? Yes, it's always fine to use a rbtree if it makes sense -

Re: [PATCH] audio: sai: Add Power Management support

2014-10-30 Thread Mark Brown
On Thu, Oct 30, 2014 at 03:30:40AM +, li.xi...@freescale.com wrote: One more thing, if the device is not performance critical, then shouldn't we Take care of the cache memory consumption to determine using flat or rbtree Type ? Yes, it's always fine to use a rbtree if it makes sense - it

Re: [PATCH] audio: sai: Add Power Management support

2014-10-30 Thread Huan Wang
Hi, On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: This patch adds Power Management support for SAI. Activate regmap cache with REGCACHE_RBTREE, and use Are you sure that REGCACHE_RBTREE is the best option here? For MMIO devices the cost tradeoff for the rbtree is usually higher

Re: [PATCH] audio: sai: Add Power Management support

2014-10-30 Thread Huan Wang
Hi, Fabio, Please always add the driver maintainers (Xiubo Li and Nicolin Chen). [Alison Wang] ok, thanks for your reminder. On Wed, Oct 29, 2014 at 1:21 AM, Alison Wang b18...@freescale.com wrote: +#ifdef CONFIG_PM_SLEEP +static int fsl_sai_suspend(struct device *dev) +{ + struct

RE: [PATCH] audio: sai: Add Power Management support

2014-10-29 Thread li.xi...@freescale.com
rnel.org; > lgirdw...@gmail.com; pe...@perex.cz; linux-arm-ker...@lists.infradead.org > Subject: Re: [PATCH] audio: sai: Add Power Management support > > On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: > > This patch adds Power Management support for SAI. > >

Re: [PATCH] audio: sai: Add Power Management support

2014-10-29 Thread Fabio Estevam
Hi Alison, Please always add the driver maintainers (Xiubo Li and Nicolin Chen). On Wed, Oct 29, 2014 at 1:21 AM, Alison Wang wrote: > +#ifdef CONFIG_PM_SLEEP > +static int fsl_sai_suspend(struct device *dev) > +{ > + struct fsl_sai *sai = dev_get_drvdata(dev); > + > +

Re: [PATCH] audio: sai: Add Power Management support

2014-10-29 Thread Mark Brown
On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: > This patch adds Power Management support for SAI. > Activate regmap cache with REGCACHE_RBTREE, and use Are you sure that REGCACHE_RBTREE is the best option here? For MMIO devices the cost tradeoff for the rbtree is usually higher

Re: [PATCH] audio: sai: Add Power Management support

2014-10-29 Thread Mark Brown
On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: This patch adds Power Management support for SAI. Activate regmap cache with REGCACHE_RBTREE, and use Are you sure that REGCACHE_RBTREE is the best option here? For MMIO devices the cost tradeoff for the rbtree is usually higher than

Re: [PATCH] audio: sai: Add Power Management support

2014-10-29 Thread Fabio Estevam
Hi Alison, Please always add the driver maintainers (Xiubo Li and Nicolin Chen). On Wed, Oct 29, 2014 at 1:21 AM, Alison Wang b18...@freescale.com wrote: +#ifdef CONFIG_PM_SLEEP +static int fsl_sai_suspend(struct device *dev) +{ + struct fsl_sai *sai = dev_get_drvdata(dev); + +

RE: [PATCH] audio: sai: Add Power Management support

2014-10-29 Thread li.xi...@freescale.com
...@gmail.com; pe...@perex.cz; linux-arm-ker...@lists.infradead.org Subject: Re: [PATCH] audio: sai: Add Power Management support On Wed, Oct 29, 2014 at 11:21:36AM +0800, Alison Wang wrote: This patch adds Power Management support for SAI. Activate regmap cache with REGCACHE_RBTREE, and use

[PATCH] audio: sai: Add Power Management support

2014-10-28 Thread Alison Wang
This patch adds Power Management support for SAI. Activate regmap cache with REGCACHE_RBTREE, and use regmap cache code to save and restore registers in suspend and resume. The Transmit Control Register (TCSR) and Receive Control Register(RCSR) should be volatile registers. Signed-off-by: Alison

[PATCH] audio: sai: Add Power Management support

2014-10-28 Thread Alison Wang
This patch adds Power Management support for SAI. Activate regmap cache with REGCACHE_RBTREE, and use regmap cache code to save and restore registers in suspend and resume. The Transmit Control Register (TCSR) and Receive Control Register(RCSR) should be volatile registers. Signed-off-by: Alison