Re: [PATCH next 1/1] spi: sifive: add PM callbacks to support suspend/resume

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

 



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


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux