this is enough upper layers take care for current transfer to finish --- drivers/spi/mpc52xx_psc_spi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) Index: work-powerpc.git/drivers/spi/mpc52xx_psc_spi.c =================================================================== --- work-powerpc.git.orig/drivers/spi/mpc52xx_psc_spi.c +++ work-powerpc.git/drivers/spi/mpc52xx_psc_spi.c @@ -613,6 +613,19 @@ static int __exit mpc52xx_psc_spi_of_rem return mpc52xx_psc_spi_do_remove(&op->dev); } +static int mpc52xx_psc_spi_of_suspend(struct of_device *op, pm_message_t state) +{ + return 0; +} +static int mpc52xx_psc_spi_of_resume(struct of_device *op) +{ + struct device *dev = &op->dev; + struct spi_master *master = dev_get_drvdata(dev); + struct mpc52xx_psc_spi *mps = spi_master_get_devdata(master); + + return mpc52xx_psc_spi_port_config(master->bus_num, mps); +} + static struct of_device_id mpc52xx_psc_spi_of_match[] = { { .type = "spi", .compatible = "mpc5200-psc-spi", }, {}, @@ -626,6 +639,8 @@ static struct of_platform_driver mpc52xx .match_table = mpc52xx_psc_spi_of_match, .probe = mpc52xx_psc_spi_of_probe, .remove = __exit_p(mpc52xx_psc_spi_of_remove), + .suspend = mpc52xx_psc_spi_of_suspend, + .resume = mpc52xx_psc_spi_of_resume, .driver = { .name = "mpc52xx-psc-spi", .owner = THIS_MODULE,