RE: [EXT] Re: [PATCH v2 1/2] spi: orion: enable clocks before spi_setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Mark,

> -----Original Message-----
> From: Mark Brown <broonie@xxxxxxxxxx>

> > +	/*
> > +	 * Make sure the clocks are enabled before
> > +	 * configuring the SPI controller.
> > +	 */
> > +	clk_prepare_enable(orion_spi->clk);
> > +	if (!IS_ERR(orion_spi->axi_clk))
> > +		clk_prepare_enable(orion_spi->axi_clk);
> > +
> >  	return orion_spi_setup_transfer(spi, NULL);  }
> 
> There's no matching disable here so we'll leak the enables every time
> setup() is called - we should unwind the enables after calling
> _setup_transfer().  It may be more sensible to just take a runtime PM
> reference rather than do the raw clock API stuff, one less call and means if
> anything else gets added to runtime PM it'll be handled.

[KP] You mean we should call here to orion_spi_runtime_resume() instead of clk_prepare_enable() and make this PM function available regardless the CONFIG_PM option?

Thanks
Kosta




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux