04 Aug, 2020

1 commit

  • Pull ARM cpufreq driver changes for v5.9-rc1 from Viresh Kumar:

    "Here are the details:

    - Adaptive voltage scaling (AVS) support and minor cleanups for
    brcmstb driver (Florian Fainelli and Markus Mayer).

    - A new tegra driver and cleanup for the existing one (Sumit Gupta and
    Jon Hunter).

    - Bandwidth level support for Qcom driver along with OPP changes (Sibi
    Sankar).

    - Cleanups to sti, cpufreq-dt, ap806, CPPC drivers (Viresh Kumar, Lee
    Jones, Ivan Kokshaysky, Sven Auhagen, and Xin Hao).

    - Make schedutil default governor for ARM (Valentin Schneider).

    - Fix dependency issues for imx (Walter Lozano).

    - Cleanup around cached_resolved_idx in cpufreq core (Viresh Kumar)."

    * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
    cpufreq: make schedutil the default for arm and arm64
    cpufreq: cached_resolved_idx can not be negative
    cpufreq: Add Tegra194 cpufreq driver
    dt-bindings: arm: Add NVIDIA Tegra194 CPU Complex binding
    cpufreq: imx: Select NVMEM_IMX_OCOTP
    cpufreq: sti-cpufreq: Fix some formatting and misspelling issues
    cpufreq: tegra186: Simplify probe return path
    cpufreq: CPPC: Reuse caps variable in few routines
    cpufreq: ap806: fix cpufreq driver needs ap cpu clk
    cpufreq: cppc: Reorder code and remove apply_hisi_workaround variable
    cpufreq: dt: fix oops on armada37xx
    cpufreq: brcmstb-avs-cpufreq: send S2_ENTER / S2_EXIT commands to AVS
    cpufreq: brcmstb-avs-cpufreq: Support polling AVS firmware
    cpufreq: brcmstb-avs-cpufreq: more flexible interface for __issue_avs_command()
    cpufreq: qcom: Disable fast switch when scaling DDR/L3
    cpufreq: qcom: Update the bandwidth levels on frequency change
    OPP: Add and export helper to set bandwidth
    cpufreq: blacklist SC7180 in cpufreq-dt-platdev
    cpufreq: blacklist SDM845 in cpufreq-dt-platdev

    Rafael J. Wysocki
     

30 Jul, 2020

1 commit


24 Jun, 2020

1 commit

  • The Energy Model framework supports not only CPU devices. Drop the CPU
    specific interface with cpumask and add struct device. Add also a return
    value, user might use it. This new interface provides easy way to create
    a simple Energy Model, which then might be used by e.g. thermal subsystem.

    Acked-by: Daniel Lezcano
    Signed-off-by: Lukasz Luba
    Signed-off-by: Rafael J. Wysocki

    Lukasz Luba
     

29 May, 2020

1 commit

  • The OPP bindings now support bandwidth values, so add support to parse it
    from device tree and store it into the new dev_pm_opp_icc_bw struct, which
    is part of the dev_pm_opp.

    Signed-off-by: Georgi Djakov
    Reviewed-by: Matthias Kaehlcke
    [ Viresh: Create _read_bw() and use it, renamed _of_find_icc_paths() to
    dev_pm_opp_of_find_icc_paths(), exported it and made opp_table
    argument optional. Also drop the depends on from Kconfig. ]
    Signed-off-by: Viresh Kumar

    Georgi Djakov
     

11 Nov, 2019

1 commit

  • On some SoCs the Adaptive Voltage Scaling (AVS) technique is
    employed to optimize the operating voltage of a device. At a
    given frequency, the hardware monitors dynamic factors and either
    makes a suggestion for how much to adjust a voltage for the
    current frequency, or it automatically adjusts the voltage
    without software intervention. Add an API to the OPP library for
    the former case, so that AVS type devices can update the voltages
    for an OPP when the hardware determines the voltage should
    change. The assumption is that drivers like CPUfreq or devfreq
    will register for the OPP notifiers and adjust the voltage
    according to suggestions that AVS makes.

    This patch is derived from [1] submitted by Stephen.
    [1] https://lore.kernel.org/patchwork/patch/599279/

    Signed-off-by: Stephen Boyd
    [Roger Lu: Changed to rcu less implementation]
    Signed-off-by: Roger Lu
    [s.nawrocki@samsung.com: added handling of OPP min/max voltage]
    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Viresh Kumar

    Stephen Boyd
     

26 Jul, 2019

2 commits

  • Since the performance states in the OPP table are unique, implement a
    dev_pm_opp_find_level_exact() in order to be able to fetch a specific OPP.

    Signed-off-by: Niklas Cassel
    [ Viresh: Updated commit log ]
    Signed-off-by: Viresh Kumar

    Niklas Cassel
     
  • The cpufreq drivers don't need to do runtime PM operations on the
    virtual devices returned by dev_pm_domain_attach_by_name() and so the
    virtual devices weren't shared with the callers of
    dev_pm_opp_attach_genpd() earlier.

    But the IO device drivers would want to do that. This patch updates the
    prototype of dev_pm_opp_attach_genpd() to accept another argument to
    return the pointer to the array of genpd virtual devices.

    Reported-by: Rajendra Nayak
    Tested-by: Rajendra Nayak
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     

26 Jun, 2019

1 commit

  • Pull operating performance points (OPP) framework changes for v5.3
    from Viresh Kumar:

    "This pull request contains:

    - OPP core changes to support a wider range of devices, like IO
    devices (Rajendra Nayak and Stehpen Boyd).
    - Fixes around genpd_virt_devs (Viresh Kumar).
    - Fix for platform with set_opp() callback (Dmitry Osipenko)."

    * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
    opp: Don't use IS_ERR on invalid supplies
    opp: Make dev_pm_opp_set_rate() handle freq = 0 to drop performance votes
    opp: Don't overwrite rounded clk rate
    opp: Allocate genpd_virt_devs from dev_pm_opp_attach_genpd()
    opp: Attach genpds to devices from within OPP core

    Rafael J. Wysocki
     

19 Jun, 2019

1 commit

  • Based on 2 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation #

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 4122 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Enrico Weigelt
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 May, 2019

1 commit

  • The OPP core requires the virtual device pointers to set performance
    state on behalf of the device, for the multiple power domain case. The
    genpd API (dev_pm_domain_attach_by_name()) has evolved now to support
    even the single power domain case and that lets us add common code for
    handling both the cases more efficiently.

    The virtual device structure returned by dev_pm_domain_attach_by_name()
    isn't normally used by the cpufreq drivers as they don't manage power
    on/off of the domains and so is only useful for the OPP core.

    This patch moves all the complexity into the OPP core to make the end
    drivers simple. The earlier APIs dev_pm_opp_{set|put}_genpd_virt_dev()
    are reworked into dev_pm_opp_{attach|detach}_genpd(). The new helper
    dev_pm_opp_attach_genpd() accepts a NULL terminated array of strings
    which contains names of all the genpd's to attach. It then attaches all
    the domains and saves the pointers to the virtual devices. The other
    helper undo the work done by this helper.

    Tested-by: Niklas Cassel
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     

10 Apr, 2019

1 commit

  • This patch introduces a new helper routine in the OPP core, which
    returns the OPP with the highest frequency which has voltage less than
    or equal to the target voltage passed to the helper.

    Signed-off-by: Andrew-sh.Cheng
    [ Viresh: Massaged the commit log and renamed the helper with some
    cleanups. ]
    Signed-off-by: Viresh Kumar

    Andrew-sh.Cheng
     

07 Mar, 2019

1 commit

  • Pull power management updates from Rafael Wysocki:
    "These are PM-runtime framework changes to use ktime instead of jiffies
    for accounting, new PM core flag to mark devices that don't need any
    form of power management, cpuidle updates including driver API
    documentation and a new governor, cpufreq updates including a new
    driver for Armada 8K, thermal cleanups and more, some energy-aware
    scheduling (EAS) enabling changes, new chips support in the intel_idle
    and RAPL drivers and assorted cleanups in some other places.

    Specifics:

    - Update the PM-runtime framework to use ktime instead of jiffies for
    accounting (Thara Gopinath, Vincent Guittot)

    - Optimize the autosuspend code in the PM-runtime framework somewhat
    (Ladislav Michl)

    - Add a PM core flag to mark devices that don't need any form of
    power management (Sudeep Holla)

    - Introduce driver API documentation for cpuidle and add a new
    cpuidle governor for tickless systems (Rafael Wysocki)

    - Add Jacobsville support to the intel_idle driver (Zhang Rui)

    - Clean up a cpuidle core header file and the cpuidle-dt and ACPI
    processor-idle drivers (Yangtao Li, Joseph Lo, Yazen Ghannam)

    - Add new cpufreq driver for Armada 8K (Gregory Clement)

    - Fix and clean up cpufreq core (Rafael Wysocki, Viresh Kumar, Amit
    Kucheria)

    - Add support for light-weight tear-down and bring-up of CPUs to the
    cpufreq core and use it in the cpufreq-dt driver (Viresh Kumar)

    - Fix cpu_cooling Kconfig dependencies, add support for CPU cooling
    auto-registration to the cpufreq core and use it in multiple
    cpufreq drivers (Amit Kucheria)

    - Fix some minor issues and do some cleanups in the davinci,
    e_powersaver, ap806, s5pv210, qcom and kryo cpufreq drivers
    (Bartosz Golaszewski, Gustavo Silva, Julia Lawall, Paweł Chmiel,
    Taniya Das, Viresh Kumar)

    - Add a Hisilicon CPPC quirk to the cppc_cpufreq driver (Xiongfeng
    Wang)

    - Clean up the intel_pstate and acpi-cpufreq drivers (Erwan Velu,
    Rafael Wysocki)

    - Clean up multiple cpufreq drivers (Yangtao Li)

    - Update cpufreq-related MAINTAINERS entries (Baruch Siach, Lukas
    Bulwahn)

    - Add support for exposing the Energy Model via debugfs and make
    multiple cpufreq drivers register an Energy Model to support
    energy-aware scheduling (Quentin Perret, Dietmar Eggemann, Matthias
    Kaehlcke)

    - Add Ice Lake mobile and Jacobsville support to the Intel RAPL
    power-capping driver (Gayatri Kammela, Zhang Rui)

    - Add a power estimation helper to the operating performance points
    (OPP) framework and clean up a core function in it (Quentin Perret,
    Viresh Kumar)

    - Make minor improvements in the generic power domains (genpd), OPP
    and system suspend frameworks and in the PM core (Aditya Pakki,
    Douglas Anderson, Greg Kroah-Hartman, Rafael Wysocki, Yangtao Li)"

    * tag 'pm-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (80 commits)
    cpufreq: kryo: Release OPP tables on module removal
    cpufreq: ap806: add missing of_node_put after of_device_is_available
    cpufreq: acpi-cpufreq: Report if CPU doesn't support boost technologies
    cpufreq: Pass updated policy to driver ->setpolicy() callback
    cpufreq: Fix two debug messages in cpufreq_set_policy()
    cpufreq: Reorder and simplify cpufreq_update_policy()
    cpufreq: Add kerneldoc comments for two core functions
    PM / core: Add support to skip power management in device/driver model
    cpufreq: intel_pstate: Rework iowait boosting to be less aggressive
    cpufreq: intel_pstate: Eliminate intel_pstate_get_base_pstate()
    cpufreq: intel_pstate: Avoid redundant initialization of local vars
    powercap/intel_rapl: add Ice Lake mobile
    ACPI / processor: Set P_LVL{2,3} idle state descriptions
    cpufreq / cppc: Work around for Hisilicon CPPC cpufreq
    ACPI / CPPC: Add a helper to get desired performance
    cpufreq: davinci: move configuration to include/linux/platform_data
    cpufreq: speedstep: convert BUG() to BUG_ON()
    cpufreq: powernv: fix missing check of return value in init_powernv_pstates()
    cpufreq: longhaul: remove unneeded semicolon
    cpufreq: pcc-cpufreq: remove unneeded semicolon
    ..

    Linus Torvalds
     

16 Feb, 2019

1 commit

  • …t/agross/linux into arm/drivers

    Qualcomm ARM Based Driver Updates for v5.1

    * Add Qualcomm RPMh power domain driver and related changes
    * Fix issues with sleep/wake sets and batch API in RPMh
    * Update MAINTAINERS Qualcomm entry
    * Fixup RMTFS-mem sysfs and uevents
    * Fix error handling in GSBI
    * Add SMD-RPM compatible entry for SDM660

    * tag 'qcom-drivers-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
    soc: qcom: smd-rpm: Add sdm660 compatible
    soc: qcom: gsbi: Fix error handling in gsbi_probe()
    soc: qcom: rpmh: Avoid accessing freed memory from batch API
    drivers: qcom: rpmh: avoid sending sleep/wake sets immediately
    soc: qcom: rmtfs-mem: Make sysfs attributes world-readable
    soc: qcom: rmtfs-mem: Add class to enable uevents
    soc: qcom: update config dependencies for QCOM_RPMPD
    soc: qcom: rpmpd: Drop family A RPM dependency
    MAINTAINERS: update list of qcom drivers
    soc: qcom: rpmhpd: Mark mx as a parent for cx
    soc: qcom: rpmhpd: Add RPMh power domain driver
    soc: qcom: rpmpd: Add support for get/set performance state
    soc: qcom: rpmpd: Add a Power domain driver to model corners
    dt-bindings: power: Add qcom rpm power domain driver bindings
    OPP: Add support for parsing the 'opp-level' property
    dt-bindings: opp: Introduce opp-level bindings

    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     

08 Feb, 2019

1 commit


07 Feb, 2019

1 commit

  • The Energy Model (EM) framework provides an API to let drivers register
    the active power of CPUs. The drivers are expected to provide a callback
    method which estimates the power consumed by a CPU at each available
    performance levels. How exactly this should be implemented, however,
    depends on the platform.

    On some systems, PM_OPP knows the voltage and frequency at which CPUs
    can run. When coupled with the CPU 'capacitance' (as provided by the
    'dynamic-power-coefficient' devicetree binding), it is possible to
    estimate the dynamic power consumption of a CPU as P = C * V^2 * f, with
    C its capacitance and V and f respectively the voltage and frequency of
    the OPP. The Intelligent Power Allocator (IPA) thermal governor already
    implements that estimation method, in the thermal framework.

    However, this power estimation method can be applied to any platform
    where all the parameters are known (C, V and f), and not only those
    suffering thermal issues. As such, the code implementing this feature
    can be re-used to also populate the EM framework now used by EAS.

    As a first step, introduce in PM_OPP a helper function which CPUFreq
    drivers can use to register into the EM framework. This duplicates the
    power estimation done in IPA until it can be migrated to using the EM
    framework. This will be done later, once the EM framework has support
    for at least all platforms currently supported by IPA.

    Signed-off-by: Quentin Perret
    Tested-by: Matthias Kaehlcke
    Reviewed-by: Matthias Kaehlcke
    Signed-off-by: Viresh Kumar

    Quentin Perret
     

23 Jan, 2019

1 commit

  • Now that the OPP bindings are updated to include an optional
    'opp-level' property, add support to parse it from device tree
    and store it as part of dev_pm_opp structure.
    Also add and export an helper 'dev_pm_opp_get_level()' that can be
    used to get the level value read from device tree when present.

    Reviewed-by: Stephen Boyd
    Acked-by: Viresh Kumar
    Signed-off-by: Rajendra Nayak
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Andy Gross

    Rajendra Nayak
     

04 Jan, 2019

1 commit

  • Since the commit 2a4eb7358aba "OPP: Don't remove dynamic OPPs from
    _dev_pm_opp_remove_table()", dynamically created OPP aren't
    automatically removed anymore by dev_pm_opp_cpumask_remove_table(). This
    affects the scpi and scmi cpufreq drivers which no longer free OPPs on
    failures or on invocations of the policy->exit() callback.

    Create a generic OPP helper dev_pm_opp_remove_all_dynamic() which can be
    called from these drivers instead of dev_pm_opp_cpumask_remove_table().

    In dev_pm_opp_remove_all_dynamic(), we need to make sure that the
    opp_list isn't getting accessed simultaneously from other parts of the
    OPP core while the helper is freeing dynamic OPPs, i.e. we can't drop
    the opp_table->lock while traversing through the OPP list. And to
    accomplish that, this patch also creates _opp_kref_release_unlocked()
    which can be called from this new helper with the opp_table lock already
    held.

    Cc: 4.20 # v4.20
    Reported-by: Valentin Schneider
    Fixes: 2a4eb7358aba "OPP: Don't remove dynamic OPPs from _dev_pm_opp_remove_table()"
    Signed-off-by: Viresh Kumar
    Tested-by: Valentin Schneider
    Reviewed-by: Sudeep Holla
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

14 Dec, 2018

2 commits

  • of_get_required_opp_performance_state() returns 0 on errors currently
    and a positive performance state otherwise. Since 0 is a valid
    performance state (representing off), it would be better if this routine
    returns negative values on error.

    That will also make it behave similar to
    dev_pm_opp_xlate_performance_state(), which also returns performance
    states and returns negative values on error. Change the return type of
    the function to "int" in order to return negative values.

    This doesn't have any users for now and so no other part of the kernel
    will be impacted with this change.

    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     
  • dev_pm_genpd_set_performance_state() needs to handle performance state
    propagation going forward. Currently this routine only gets the required
    performance state of the device's genpd as an argument, but it doesn't
    know how to translate that to master genpd(s) of the device's genpd.

    Introduce a new helper dev_pm_opp_xlate_performance_state() which will
    be used to translate from performance state of a device (or genpd
    sub-domain) to another device (or master genpd).

    Normally the src_table (of genpd sub-domain) will have the
    "required_opps" property set to point to one of the OPPs in the
    dst_table (of master genpd), but in some cases the genpd and its master
    have one to one mapping of performance states and so none of them have
    the "required-opps" property set. Return the performance state of the
    src_table as it is in such cases.

    Tested-by: Rajendra Nayak
    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     

05 Nov, 2018

3 commits

  • This isn't used anymore, remove it.

    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     
  • The OPP core already has the performance state values for each of the
    genpd's OPPs and there is no need to call the genpd callback again to
    get the performance state for the case where the end device doesn't have
    an OPP table and has the "required-opps" property directly in its node.

    This commit renames of_genpd_opp_to_performance_state() as
    of_get_required_opp_performance_state() and moves it to the OPP core, as
    it is all about OPP stuff now.

    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     
  • Multiple generic power domains for a consumer device are supported with
    the help of virtual devices, which are created for each consumer device
    - genpd pair. These are the device structures which are attached to the
    power domain and are required by the OPP core to set the performance
    state of the genpd.

    The helpers added by this commit are required to be called once for each
    of these virtual devices. These are required only if multiple domains
    are available for a device, otherwise the actual device structure will
    be used instead by the OPP core.

    The new helpers also support the complex cases where the consumer device
    wouldn't always require all the domains. For example, a camera may
    require only one power domain during normal operations but two during
    high resolution operations. The consumer driver can call
    dev_pm_opp_put_genpd_virt_dev(high_resolution_genpd_virt_dev) if it is
    currently operating in the normal mode and doesn't have any performance
    requirements from the genpd which manages high resolution power
    requirements. The consumer driver can later call
    dev_pm_opp_set_genpd_virt_dev(high_resolution_genpd_virt_dev) once it
    switches back to the high resolution mode.

    The new helpers differ from other OPP set/put helpers as the new ones
    can be called with OPPs initialized for the table as we may need to call
    them on the fly because of the complex case explained above. For this
    reason it is possible that the genpd virt_dev structure may be used in
    parallel while the new helpers are running and a new mutex is added to
    protect against that. We didn't use the existing opp_table->lock mutex
    as that is widely used in the OPP core and we will need this lock in the
    dev_pm_opp_set_rate() helper while changing OPP and we need to make sure
    there is not much contention while doing that as that's the hotpath.

    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     

20 Sep, 2018

1 commit

  • This is a preparatory patch required for the next commit which will
    start using OPP table's node pointer in _of_init_opp_table(), which
    requires the index in order to read the OPP table's phandle.

    This commit adds the index argument in the call chains in order to get
    it delivered to _of_init_opp_table().

    Tested-by: Niklas Cassel
    Signed-off-by: Viresh Kumar

    Viresh Kumar
     

09 May, 2018

4 commits


14 Oct, 2017

1 commit

  • This adds the dev_pm_opp_{un}register_get_pstate_helper() helper
    routines which will be used to set the get_pstate() callback for a
    device. This callback will be later called internally by the OPP core to
    get performance state corresponding to an OPP.

    This is required temporarily until the time we have proper DT bindings
    to include the performance state information.

    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

11 Oct, 2017

1 commit

  • The routine is named incorrectly since the first attempt as there is
    nothing like a put_opp() helper. We wanted to unregister the set_opp()
    helper here and so it should rather be named as
    dev_pm_opp_unregister_set_opp_helper().

    Signed-off-by: Viresh Kumar
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

24 Jun, 2017

1 commit

  • In order to support OPP switching, OPP layer needs to get pointer to the
    clock for the device. Simple cases work fine without using the routines
    added by this patch (i.e. by passing connection-id as NULL), but for a
    device with multiple clocks available, the OPP core needs to know the
    exact name of the clk to use.

    Add a new set of APIs to get that done.

    Tested-by: Rajendra Nayak
    Signed-off-by: Viresh Kumar
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

10 Feb, 2017

1 commit


30 Jan, 2017

3 commits

  • Add kref to struct dev_pm_opp for easier accounting of the OPPs.

    Note that the OPPs are freed under the opp_table->lock mutex only.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • Now that we have proper kernel reference infrastructure in place for OPP
    tables, use it to guarantee that the OPP table isn't freed while being
    used by the callers of dev_pm_opp_set_*() APIs.

    Make them all return the pointer to the OPP table after taking its
    reference and put the reference back with dev_pm_opp_put_*() APIs.

    Now that the OPP table wouldn't get freed while these routines are
    executing after dev_pm_opp_get_opp_table() is called, there is no need
    to take opp_table_lock. Drop them as well.

    Remove the rcu specific comments from these routines as they aren't
    relevant anymore.

    Note that prototypes of dev_pm_opp_{set|put}_regulators() were already
    updated by another patch.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • Add kref to struct opp_table for easier accounting of the OPP table.

    Note that the new routine dev_pm_opp_get_opp_table() takes the reference
    from under the opp_table_lock, which guarantees that the OPP table
    doesn't get freed unless dev_pm_opp_put_opp_table() is called for the
    OPP table.

    Two separate release mechanisms are added: locked and unlocked. In
    unlocked version the routines aren't required to take/drop
    opp_table_lock as the callers have already done that. This is required
    to avoid breaking git bisect, otherwise we may get lockdeps between
    commits. Once all the users of OPP table are updated the unlocked
    version shall be removed.

    Signed-off-by: Viresh Kumar
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

27 Jan, 2017

2 commits


06 Dec, 2016

4 commits

  • The generic set_opp() handler isn't sufficient for platforms with
    complex DVFS. For example, some TI platforms have multiple regulators
    for a CPU device. The order in which various supplies need to be
    programmed is only known to the platform code and its best to leave it
    to it.

    This patch implements APIs to register platform specific set_opp()
    callback.

    Signed-off-by: Viresh Kumar
    Tested-by: Dave Gerlach
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • Later patches would add support for custom set_opp() callbacks. This
    patch separates out the code for _generic_set_opp() handler in order to
    prepare for that.

    Signed-off-by: Viresh Kumar
    Tested-by: Dave Gerlach
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • This patch adds infrastructure to manage multiple regulators and updates
    the only user (cpufreq-dt) of dev_pm_opp_set{put}_regulator().

    This is preparatory work for adding full support for devices with
    multiple regulators.

    Signed-off-by: Viresh Kumar
    Tested-by: Dave Gerlach
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • This is a preparatory step for multiple regulator per device support.
    Move the voltage/current variables to a new structure.

    Signed-off-by: Viresh Kumar
    Tested-by: Dave Gerlach
    Reviewed-by: Stephen Boyd
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar