[PATCH] spi/atmel: add support for runtime PM

Yang, Wenyou Wenyou.Yang at atmel.com
Thu Oct 16 01:09:49 PDT 2014


Hi Mark,

> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Thursday, October 16, 2014 3:30 PM
> To: Yang, Wenyou
> Cc: linux-spi at vger.kernel.org; linux-kernel at vger.kernel.org; Ferre, Nicolas; linux-
> arm-kernel at lists.infradead.org
> Subject: Re: [PATCH] spi/atmel: add support for runtime PM
> 
> On Thu, Oct 16, 2014 at 09:49:20AM +0800, Wenyou Yang wrote:
> 
> > +static int atmel_spi_runtime_resume(struct device *dev) {
> > +	struct spi_master *master = dev_get_drvdata(dev);
> > +	struct atmel_spi *as = spi_master_get_devdata(master);
> > +
> > +	pinctrl_pm_select_default_state(dev);
> > +	clk_prepare_enable(as->clk);
> > +
> 
> This looks mostly good but you should check the return value of
> clk_prepare_enable() - it can fail.
Thanks a lot, I will add it.

Best Regards,
Wenyou Yang



More information about the linux-arm-kernel mailing list