summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq/tegra-devfreq.c
Commit message (Collapse)AuthorAgeFilesLines
* PM / OPP: Update OPP users to put referenceViresh Kumar2017-01-301-3/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch updates dev_pm_opp_find_freq_*() routines to get a reference to the OPPs returned by them. Also updates the users of dev_pm_opp_find_freq_*() routines to call dev_pm_opp_put() after they are done using the OPPs. As it is guaranteed the that OPPs wouldn't get freed while being used, the RCU read side locking present with the users isn't required anymore. Drop it as well. This patch also updates all users of devfreq_recommended_opp() which was returning an OPP received from the OPP core. Note that some of the OPP core routines have gained rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs within them. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [Devfreq] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* PM / devfreq: tegra: Set freq in rate callbackTomeu Vizoso2016-02-231-0/+2
| | | | | | | | | | | | | | | As per the documentation of the devfreq_dev_profile.target callback, set the freq argument to the new frequency before returning. This caused endless messages like this after recent changes in the core: devfreq 6000c800.actmon: Couldn't update frequency transition information. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reported-by: Tyler Baker <tyler.baker@linaro.org> Tested-by: Thierry Reding <treding@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: Update governor to use devfreq_update_stats()MyungJoo Ham2015-09-111-3/+5
| | | | | | Direct invocation of get_dev_status() is no more recommended. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: Register governor on module initTomeu Vizoso2015-03-311-7/+30
| | | | | | | So this driver builds as a module. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: Enable interrupts after resuming the devfreq monitorTomeu Vizoso2015-03-311-2/+2
| | | | | Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: Set drvdata before enabling the irqTomeu Vizoso2015-03-311-2/+2
| | | | | | | | To avoid a race in which the interrupt will be handled before the drvdata has been set up. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: remove operating-pointsTomeu Vizoso2015-03-311-6/+6
| | | | | | | | As the DT bindings don't have an operating-points property any more, build the OPP table from the frequencies supported by the EMC clock. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: Use clock rate constraintsTomeu Vizoso2015-03-311-10/+5
| | | | | | | | Now that we have per-user clocks and the possibility to set constraints in a clock, set a floor constraint on the EMC clock. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: Update to v5 of the submitted patchesTomeu Vizoso2015-03-311-204/+253
| | | | | | | | | | | | | | | | | | | There seemed to be some miscommunication and an old version of the submitted patches was merged. This commit updates the driver to v5, which had this changelog: * Clarify the units of avg_dependency_threshold * Remove unused references to platform_device * Enable and disable interrupts on governor events * Make sure we handle all interrupts for any of the devices we are sampling * Move locking to be per-actmon-device Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> CC: Alex Frid <afrid@nvidia.com> CC: Mikko Perttunen <mikko.perttunen@kapsi.fi> [Added const to device ID by MyungJoo] Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
* PM / devfreq: tegra: add devfreq driver for Tegra Activity MonitorTomeu Vizoso2015-01-291-0/+718
The ACTMON block can monitor several counters, providing averaging and firing interrupts based on watermarking configuration. This implementation monitors the MCALL and MCCPU counters to choose an appropriate frequency for the external memory clock. This patch is based on work by Alex Frid <afrid@nvidia.com> and Mikko Perttunen <mikko.perttunen@kapsi.fi>. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>