Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Dmitry Osipenko
30.10.2021 03:47, Dmitry Osipenko пишет: > 29.10.2021 21:06, Rafael J. Wysocki пишет: > ... > I just noticed that RPM core doesn't reset RPM-enable count of a device > on driver's unbind (pm_runtime_reinit). It was a bad idea to use > devm_pm_runtime_enable() + pm_runtime_force_suspend(

Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Dmitry Osipenko
29.10.2021 21:06, Rafael J. Wysocki пишет: ... I just noticed that RPM core doesn't reset RPM-enable count of a device on driver's unbind (pm_runtime_reinit). It was a bad idea to use devm_pm_runtime_enable() + pm_runtime_force_suspend() here, since RPM is disabled twice on driv

Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Rafael J. Wysocki
On Fri, Oct 29, 2021 at 6:29 PM Dmitry Osipenko wrote: > > 29.10.2021 18:56, Rafael J. Wysocki пишет: > > On Fri, Oct 29, 2021 at 5:20 PM Dmitry Osipenko wrote: > >> > >> 26.10.2021 01:40, Dmitry Osipenko пишет: > >>> + ret = devm_pm_runtime_enable(&pdev->dev); > >>> + if (ret) > >>> +

Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Dmitry Osipenko
29.10.2021 18:56, Rafael J. Wysocki пишет: > On Fri, Oct 29, 2021 at 5:20 PM Dmitry Osipenko wrote: >> >> 26.10.2021 01:40, Dmitry Osipenko пишет: >>> + ret = devm_pm_runtime_enable(&pdev->dev); >>> + if (ret) >>> + return ret; >>> + >>> + ret = devm_tegra_core_dev_init_opp

Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Dmitry Osipenko
29.10.2021 18:28, Ulf Hansson пишет: > On Fri, 29 Oct 2021 at 17:20, Dmitry Osipenko wrote: >> >> 26.10.2021 01:40, Dmitry Osipenko пишет: >>> + ret = devm_pm_runtime_enable(&pdev->dev); >>> + if (ret) >>> + return ret; >>> + >>> + ret = devm_tegra_core_dev_init_opp_table_c

Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Rafael J. Wysocki
On Fri, Oct 29, 2021 at 5:20 PM Dmitry Osipenko wrote: > > 26.10.2021 01:40, Dmitry Osipenko пишет: > > + ret = devm_pm_runtime_enable(&pdev->dev); > > + if (ret) > > + return ret; > > + > > + ret = devm_tegra_core_dev_init_opp_table_common(&pdev->dev); > > + if (ret) >

Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Ulf Hansson
On Fri, 29 Oct 2021 at 17:20, Dmitry Osipenko wrote: > > 26.10.2021 01:40, Dmitry Osipenko пишет: > > + ret = devm_pm_runtime_enable(&pdev->dev); > > + if (ret) > > + return ret; > > + > > + ret = devm_tegra_core_dev_init_opp_table_common(&pdev->dev); > > + if (ret) > >

Re: [PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-29 Thread Dmitry Osipenko
26.10.2021 01:40, Dmitry Osipenko пишет: > + ret = devm_pm_runtime_enable(&pdev->dev); > + if (ret) > + return ret; > + > + ret = devm_tegra_core_dev_init_opp_table_common(&pdev->dev); > + if (ret) > + return ret; > + > + ret = pm_runtime_resume_and_get(&

[PATCH v14 20/39] pwm: tegra: Add runtime PM and OPP support

2021-10-25 Thread Dmitry Osipenko
The PWM on Tegra belongs to the core power domain and we're going to enable GENPD support for the core domain. Now PWM must be resumed using runtime PM API in order to initialize the PWM power state. The PWM clock rate must be changed using OPP API that will reconfigure the power domain performance