static int dspi_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct fsl_dspi *dspi = spi_master_get_devdata(master); spi_master_suspend(master); clk_disable_unprepare(dspi->clk); return 0; }
static int spi_st_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); int ret; ret = spi_master_suspend(master); if (ret) return ret; return pm_runtime_force_suspend(dev); }
/** * zynq_qspi_suspend - Suspend method for the QSPI driver * @_dev: Address of the platform_device structure * * This function stops the QSPI driver queue and disables the QSPI controller * * Return: Always 0 */ static int __maybe_unused zynq_qspi_suspend(struct device *_dev) { struct platform_device *pdev = container_of(_dev, struct platform_device, dev); struct spi_master *master = platform_get_drvdata(pdev); spi_master_suspend(master); zynq_unprepare_transfer_hardware(master); return 0; }
static int s3c24xx_spi_suspend(struct device *dev) { struct s3c24xx_spi *hw = dev_get_drvdata(dev); int ret; ret = spi_master_suspend(hw->master); if (ret) return ret; if (hw->pdata && hw->pdata->gpio_setup) hw->pdata->gpio_setup(hw->pdata, 0); clk_disable(hw->clk); return 0; }
/** * cdns_spi_suspend - Suspend method for the SPI driver * @dev: Address of the platform_device structure * * This function disables the SPI controller and * changes the driver state to "suspend" * * Return: Always 0 */ static int __maybe_unused cdns_spi_suspend(struct device *dev) { struct platform_device *pdev = container_of(dev, struct platform_device, dev); struct spi_master *master = platform_get_drvdata(pdev); struct cdns_spi *xspi = spi_master_get_devdata(master); spi_master_suspend(master); clk_disable_unprepare(xspi->ref_clk); clk_disable_unprepare(xspi->pclk); return 0; }
static int __maybe_unused bcm_qspi_suspend(struct device *dev) { struct bcm_qspi *qspi = dev_get_drvdata(dev); /* store the override strap value */ if (!bcm_qspi_bspi_ver_three(qspi)) qspi->s3_strap_override_ctrl = bcm_qspi_read(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL); spi_master_suspend(qspi->master); clk_disable(qspi->clk); bcm_qspi_hw_uninit(qspi); return 0; };
static int rockchip_spi_suspend(struct device *dev) { int ret = 0; struct spi_master *master = dev_get_drvdata(dev); struct rockchip_spi *rs = spi_master_get_devdata(master); ret = spi_master_suspend(rs->master); if (ret) return ret; if (!pm_runtime_suspended(dev)) { clk_disable_unprepare(rs->spiclk); clk_disable_unprepare(rs->apb_pclk); } return ret; }
static int spi_qup_suspend(struct device *device) { struct spi_master *master = dev_get_drvdata(device); struct spi_qup *controller = spi_master_get_devdata(master); int ret; ret = spi_master_suspend(master); if (ret) return ret; ret = spi_qup_set_state(controller, QUP_STATE_RESET); if (ret) return ret; clk_disable_unprepare(controller->cclk); clk_disable_unprepare(controller->iclk); return 0; }
static int img_spfi_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); return spi_master_suspend(master); }
/** * cdns_spi_suspend - Suspend method for the SPI driver * @dev: Address of the platform_device structure * * This function disables the SPI controller and * changes the driver state to "suspend" * * Return: 0 on success and error value on error */ static int __maybe_unused cdns_spi_suspend(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); return spi_master_suspend(master); }