On Fri, Jun 10, 2022 at 03:44:59PM +0800, Andy Chiu wrote: > +static int sifive_spi_suspend(struct device *dev) > +{ > + struct spi_master *master = dev_get_drvdata(dev); > + struct sifive_spi *spi = spi_master_get_devdata(master); > + int ret; > + > + ret = spi_master_suspend(master); > + if (ret) > + return ret; > + > + /* Disable all the interrupts just in case */ > + sifive_spi_write(spi, SIFIVE_SPI_REG_IE, 0); > + > + clk_disable_unprepare(spi->clk); Seems like the clock managemnet could usefully be done as runtime PM too? In any case, that can be done as an incremental change.
Attachment:
signature.asc
Description: PGP signature