#include <linux/module.h>
#include <linux/highmem.h>
#include <linux/delay.h>
+#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
master->dev.of_node = dev->of_node;
master->dev.fwnode = dev->fwnode;
master->flags = SPI_MASTER_GPIO_SS;
+ master->auto_runtime_pm = true;
if (dws->set_cs)
master->set_cs = dws->set_cs;
+ pm_runtime_enable(dev);
+
/* Basic HW init */
spi_hw_init(dev, dws);
spi_enable_chip(dws, 0);
free_irq(dws->irq, master);
err_free_master:
+ pm_runtime_disable(dev);
spi_controller_put(master);
return ret;
}
spi_shutdown_chip(dws);
+ if (dws->master)
+ pm_runtime_disable(&dws->master->dev);
+
free_irq(dws->irq, dws->master);
}
EXPORT_SYMBOL_GPL(dw_spi_remove_host);