--- drivers/spi/mpc5200_spi.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) Index: work-powerpc.git/drivers/spi/mpc5200_spi.c =================================================================== --- work-powerpc.git.orig/drivers/spi/mpc5200_spi.c +++ work-powerpc.git/drivers/spi/mpc5200_spi.c @@ -368,6 +368,18 @@ static int mpc5200_spi_remove(struct of_ return 0; } +static int mpc5200_spi_of_suspend(struct of_device *odev, pm_message_t state) +{ + return 0; +} +static int mpc5200_spi_of_resume(struct of_device *odev) +{ + struct mpc5200_spi *port = dev_get_drvdata(&odev->dev); + + writeb(0xe, port->base + SPI_DATA_DIR); + return 0; +} + static struct of_device_id mpc5200_spi_of_match[] = { { .type = "spi", .compatible = "mpc5200-spi", }, {}, @@ -380,8 +392,8 @@ static struct of_platform_driver mpc5200 .probe = mpc5200_spi_probe, .remove = mpc5200_spi_remove, #ifdef CONFIG_PM -// .suspend = mpc5200_spi_of_suspend, -// .resume = mpc5200_spi_of_resume, + .suspend = mpc5200_spi_of_suspend, + .resume = mpc5200_spi_of_resume, #endif .driver = { .name = "mpc5200-spi",