Commit 5cf7ebef authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'spi-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "There's two things here - the big one is a batch of fixes for the
  power management in the Cadence QuadSPI driver which had some serious
  issues with runtime PM and there's also a revert of one of the last
  batch of fixes for ppc4xx which has a dependency on -next but was in
  between two mainline fixes so the -next dependency got missed.

  The ppc4xx driver is not currently included in any defconfig and has
  dependencies that exclude it from allmodconfigs so none of the CI
  systems catch issues with it, hence the need for the earlier fixes
  series. There's some updates to the PowerPC configs to address this"

* tag 'spi-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: Drop mismerged fix
  spi: cadence-qspi: add system-wide suspend and resume callbacks
  spi: cadence-qspi: put runtime in runtime PM hooks names
  spi: cadence-qspi: remove system-wide suspend helper calls from runtime PM hooks
  spi: cadence-qspi: fix pointer reference in runtime PM hooks
parents 628e0594 6415c7fe
......@@ -1927,24 +1927,18 @@ static void cqspi_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
}
static int cqspi_suspend(struct device *dev)
static int cqspi_runtime_suspend(struct device *dev)
{
struct cqspi_st *cqspi = dev_get_drvdata(dev);
struct spi_controller *host = dev_get_drvdata(dev);
int ret;
ret = spi_controller_suspend(host);
cqspi_controller_enable(cqspi, 0);
clk_disable_unprepare(cqspi->clk);
return ret;
return 0;
}
static int cqspi_resume(struct device *dev)
static int cqspi_runtime_resume(struct device *dev)
{
struct cqspi_st *cqspi = dev_get_drvdata(dev);
struct spi_controller *host = dev_get_drvdata(dev);
clk_prepare_enable(cqspi->clk);
cqspi_wait_idle(cqspi);
......@@ -1952,12 +1946,27 @@ static int cqspi_resume(struct device *dev)
cqspi->current_cs = -1;
cqspi->sclk = 0;
return 0;
}
static int cqspi_suspend(struct device *dev)
{
struct cqspi_st *cqspi = dev_get_drvdata(dev);
return spi_controller_suspend(cqspi->host);
}
return spi_controller_resume(host);
static int cqspi_resume(struct device *dev)
{
struct cqspi_st *cqspi = dev_get_drvdata(dev);
return spi_controller_resume(cqspi->host);
}
static DEFINE_RUNTIME_DEV_PM_OPS(cqspi_dev_pm_ops, cqspi_suspend,
cqspi_resume, NULL);
static const struct dev_pm_ops cqspi_dev_pm_ops = {
RUNTIME_PM_OPS(cqspi_runtime_suspend, cqspi_runtime_resume, NULL)
SYSTEM_SLEEP_PM_OPS(cqspi_suspend, cqspi_resume)
};
static const struct cqspi_driver_platdata cdns_qspi = {
.quirks = CQSPI_DISABLE_DAC_MODE,
......
......@@ -359,22 +359,22 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
/* Setup the state for the bitbang driver */
bbp = &hw->bitbang;
bbp->ctlr = hw->host;
bbp->master = hw->host;
bbp->setup_transfer = spi_ppc4xx_setupxfer;
bbp->txrx_bufs = spi_ppc4xx_txrx;
bbp->use_dma = 0;
bbp->ctlr->setup = spi_ppc4xx_setup;
bbp->ctlr->cleanup = spi_ppc4xx_cleanup;
bbp->ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
bbp->ctlr->use_gpio_descriptors = true;
bbp->master->setup = spi_ppc4xx_setup;
bbp->master->cleanup = spi_ppc4xx_cleanup;
bbp->master->bits_per_word_mask = SPI_BPW_MASK(8);
bbp->master->use_gpio_descriptors = true;
/*
* The SPI core will count the number of GPIO descriptors to figure
* out the number of chip selects available on the platform.
*/
bbp->ctlr->num_chipselect = 0;
bbp->master->num_chipselect = 0;
/* the spi->mode bits understood by this driver: */
bbp->ctlr->mode_bits =
bbp->master->mode_bits =
SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | SPI_LSB_FIRST;
/* Get the clock for the OPB */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment