use the run-time pm rather than en/disable clock in chip select function.
Signed-off-by: Han Xu <han.xu@nxp.com>
* die is selected/unselected.
*/
if (this->current_chip < 0 && chipnr >= 0) {
- ret = gpmi_enable_clk(this);
- if (ret)
+ ret = pm_runtime_get_sync(this->dev);
+ if (ret < 0)
dev_err(this->dev, "Failed to enable the clock\n");
} else if (this->current_chip >= 0 && chipnr < 0) {
- ret = gpmi_disable_clk(this);
- if (ret)
- dev_err(this->dev, "Failed to disable the clock\n");
+ pm_runtime_mark_last_busy(this->dev);
+ pm_runtime_use_autosuspend(this->dev);
}
/*