Re: [PATCH 09/10] mtd: rawnand: gpmi: use runtime PM to manage clocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Freitag, den 05.04.2019, 12:07 +0200 schrieb Sascha Hauer:
> The gpmi driver aggressively en/disables the clocks between operations
> which has significant performance cost. Use runtime PM to get rid of
> this bottleneck.
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> ---
[...]
> +static int __maybe_unused gpmi_runtime_suspend(struct device *dev)
> +{
> +	struct gpmi_nand_data *this = dev_get_drvdata(dev);
> +
> +	printk("%s\n", __func__);
> +
> +	return __gpmi_enable_clk(this, false);
> +}
> +
> +static int __maybe_unused gpmi_runtime_resume(struct device *dev)
> +{
> +	struct gpmi_nand_data *this = dev_get_drvdata(dev);
> +
> +	printk("%s\n", __func__);

Leftover debugging in both functions.

Regards,
Lucas

> +
> +	return __gpmi_enable_clk(this, true);
> +}
> +
>  static const struct dev_pm_ops gpmi_pm_ops = {
>  	SET_SYSTEM_SLEEP_PM_OPS(gpmi_pm_suspend, gpmi_pm_resume)
> +	SET_RUNTIME_PM_OPS(gpmi_runtime_suspend, gpmi_runtime_resume, NULL)
>  };
>  
>  static struct platform_driver gpmi_nand_driver = {

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux