summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-oc-tiny.c
diff options
context:
space:
mode:
authorQuanyang Wang <quanyang.wang@windriver.com>2021-04-16 08:46:49 +0800
committerMark Brown <broonie@kernel.org>2021-04-16 13:44:12 +0100
commit799f923f0a66a9c99f0a3eaa078b306db7a8b33a (patch)
treed8bbecff1f9f723ca48693e7e58250f21ce776ac /drivers/spi/spi-oc-tiny.c
parentc6bdae08012b2ca3e94f3a41ef4ca8cfe7c9ab6f (diff)
spi: spi-zynqmp-gqspi: fix hang issue when suspend/resume
After calling platform_set_drvdata(pdev, xqspi) in probe, the return value of dev_get_drvdata(dev) is a pointer to struct zynqmp_qspi but not struct spi_controller. A wrong structure type passing to the functions spi_controller_suspend/resume will hang the system. And we should check the return value of spi_controller_suspend, if an error is returned, return it to PM subsystem to stop suspend. Also, GQSPI_EN_MASK should be written to GQSPI_EN_OFST to enable the spi controller in zynqmp_qspi_resume since it was disabled in zynqmp_qspi_suspend before. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> Link: https://lore.kernel.org/r/20210416004652.2975446-3-quanyang.wang@windriver.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-oc-tiny.c')
0 files changed, 0 insertions, 0 deletions