1. 08 6月, 2021 1 次提交
    • Y
      PM: domains: fix some kernel-doc issues · 763663c9
      Yang Yingliang 提交于
      Fix the following make W=1 kernel build warnings:
      
        drivers/base/power/domain_governor.c:259: warning: Function parameter or member 'now' not described in '_default_power_down_ok'
        drivers/base/power/domain.c:581: warning: Function parameter or member 'depth' not described in 'genpd_power_off'
        drivers/base/power/domain.c:2520: warning: Function parameter or member 'np' not described in 'of_genpd_remove_last'
        drivers/base/power/domain.c:2520: warning: Excess function parameter 'provider' description in 'of_genpd_remove_last'
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      763663c9
  2. 19 3月, 2021 1 次提交
    • U
      PM: domains: Don't runtime resume devices at genpd_prepare() · c1df456d
      Ulf Hansson 提交于
      Runtime resuming a device upfront in the genpd_prepare() callback,
      to check if there is a wakeup pending for it, seems like an
      unnecessary thing to do.
      
      The PM core already manages these kind of things in a common way in
      __device_suspend(), via calling pm_runtime_barrier() and
      pm_wakeup_pending().
      
      Therefore, let's simply drop this behaviour from genpd_prepare().
      
      Note that, this change is applicable only for devices that are
      attached to a genpd that has the GENPD_FLAG_ACTIVE_WAKEUP set
      (Renesas, Mediatek, and Rockchip platforms). Moreover, a driver
      that needs to restore power for its device to re-configure it
      for a system wakeup, may still call pm_runtime_get_sync(), for
      example, to do this.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c1df456d
  3. 09 2月, 2021 1 次提交
  4. 01 2月, 2021 1 次提交
  5. 23 1月, 2021 4 次提交
  6. 12 12月, 2020 1 次提交
  7. 09 12月, 2020 1 次提交
    • V
      opp: Don't create an OPP table from dev_pm_opp_get_opp_table() · e77dcb0b
      Viresh Kumar 提交于
      It has been found that some users (like cpufreq-dt and others on LKML)
      have abused the helper dev_pm_opp_get_opp_table() to create the OPP
      table instead of just finding it, which is the wrong thing to do. This
      routine was meant for OPP core's internal working and exposed the whole
      functionality by mistake.
      
      Change the scope of dev_pm_opp_get_opp_table() to only finding the
      table. The internal helpers _opp_get_opp_table*() are thus renamed to
      _add_opp_table*(), dev_pm_opp_get_opp_table_indexed() is removed (as we
      don't need the index field for finding the OPP table) and so the only
      user, genpd, is updated.
      
      Note that the prototype of _add_opp_table() was already left in opp.h by
      mistake when it was removed earlier and so we weren't required to add it
      now.
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      e77dcb0b
  8. 24 11月, 2020 1 次提交
  9. 11 11月, 2020 2 次提交
  10. 21 10月, 2020 1 次提交
  11. 16 10月, 2020 3 次提交
  12. 03 10月, 2020 2 次提交
  13. 25 8月, 2020 1 次提交
    • S
      opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER · dd461cd9
      Stephan Gerhold 提交于
      The OPP core manages various resources, e.g. clocks or interconnect paths.
      These resources are looked up when the OPP table is allocated once
      dev_pm_opp_get_opp_table() is called the first time (either directly
      or indirectly through one of the many helper functions).
      
      At this point, the resources may not be available yet, i.e. looking them
      up will result in -EPROBE_DEFER. Unfortunately, dev_pm_opp_get_opp_table()
      is currently unable to propagate this error code since it only returns
      the allocated OPP table or NULL.
      
      This means that all consumers of the OPP core are required to make sure
      that all necessary resources are available. Usually this happens by
      requesting them, checking the result and releasing them immediately after.
      
      For example, we have added "dev_pm_opp_of_find_icc_paths(dev, NULL)" to
      several drivers now just to make sure the interconnect providers are
      ready before the OPP table is allocated. If this call is missing,
      the OPP core will only warn about this and then attempt to continue
      without interconnect. This will eventually fail horribly, e.g.:
      
          cpu cpu0: _allocate_opp_table: Error finding interconnect paths: -517
          ... later ...
          of: _read_bw: Mismatch between opp-peak-kBps and paths (1 0)
          cpu cpu0: _opp_add_static_v2: opp key field not found
          cpu cpu0: _of_add_opp_table_v2: Failed to add OPP, -22
      
      This example happens when trying to use interconnects for a CPU OPP
      table together with qcom-cpufreq-nvmem.c. qcom-cpufreq-nvmem calls
      dev_pm_opp_set_supported_hw(), which ends up allocating the OPP table
      early. To fix the problem with the current approach we would need to add
      yet another call to dev_pm_opp_of_find_icc_paths(dev, NULL).
      But actually qcom-cpufreq-nvmem.c has nothing to do with interconnects...
      
      This commit attempts to make this more robust by allowing
      dev_pm_opp_get_opp_table() to return an error pointer. Fixing all
      the usages is trivial because the function is usually used indirectly
      through another helper (e.g. dev_pm_opp_set_supported_hw() above).
      These other helpers already return an error pointer.
      
      The example above then works correctly because set_supported_hw() will
      return -EPROBE_DEFER, and qcom-cpufreq-nvmem.c already propagates that
      error. It should also be possible to remove the remaining usages of
      "dev_pm_opp_of_find_icc_paths(dev, NULL)" from other drivers as well.
      
      Note that this commit currently only handles -EPROBE_DEFER for the
      clock/interconnects within _allocate_opp_table(). Other errors are just
      ignored as before. Eventually those should be propagated as well.
      Signed-off-by: NStephan Gerhold <stephan@gerhold.net>
      Acked-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      [ Viresh: skip checking return value of dev_pm_opp_get_opp_table() for
      	  EPROBE_DEFER in domain.c, fix NULL return value and reorder
      	  code a bit in core.c, and update exynos-asv.c ]
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      dd461cd9
  14. 09 7月, 2020 1 次提交
  15. 14 3月, 2020 1 次提交
  16. 02 1月, 2020 1 次提交
  17. 13 11月, 2019 2 次提交
  18. 03 9月, 2019 2 次提交
  19. 04 7月, 2019 1 次提交
  20. 13 5月, 2019 1 次提交
  21. 26 4月, 2019 4 次提交
  22. 25 4月, 2019 3 次提交
  23. 18 4月, 2019 1 次提交
  24. 10 4月, 2019 2 次提交
  25. 05 4月, 2019 1 次提交