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