On Thu, Dec 17, 2020 at 07:09:31PM +0200, kostap@xxxxxxxxxxx wrote: > + /* > + * 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.
Attachment:
signature.asc
Description: PGP signature