17 Sep, 2019

1 commit

  • * pm-opp:
    PM / OPP: Correct Documentation about library location
    opp: of: Support multiple suspend OPPs defined in DT
    dt-bindings: opp: Support multiple opp-suspend properties
    opp: core: add regulators enable and disable
    opp: Don't decrement uninitialized list_kref

    * pm-qos:
    PM: QoS: Get rid of unused flags

    * acpi-pm:
    ACPI: PM: Print debug messages on device power state changes

    * pm-domains:
    PM / Domains: Verify PM domain type in dev_pm_genpd_set_performance_state()
    PM / Domains: Simplify genpd_lookup_dev()
    PM / Domains: Align in-parameter names for some genpd functions

    * pm-tools:
    pm-graph: make setVal unbuffered again for python2 and python3
    cpupower: update German translation
    tools/power/cpupower: fix 64bit detection when cross-compiling
    cpupower: Add missing newline at end of file
    pm-graph v5.5

    Rafael J. Wysocki
     

05 Sep, 2019

1 commit

  • Pull operating performance points (OPP) framework changes for 5.4
    from Viresh Kumar:

    "This contains:

    - OPP core fixes to better support genpd devices (Viresh Kumar).
    - OPP core changes to support multiple suspend-opps in DT (Anson Huang).
    - New OPP API (dev_pm_opp_find_level_exact()) and Qcom OPP binding
    changes for CPR (Niklas Cassel).
    - Qcom minor update (Sricharan R).
    - OPP Documentation fix (Yue Hu).
    - OPP core support to enable/disable regulators (k.konieczny)."

    * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
    dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR
    dt-bindings: opp: qcom-nvmem: Support pstates provided by a power domain
    dt-bindings: opp: qcom-nvmem: Make speedbin related properties optional
    dt-bindings: opp: Re-organise kryo cpufreq to use it for other nvmem based qcom socs
    PM / OPP: Correct Documentation about library location
    opp: of: Support multiple suspend OPPs defined in DT
    dt-bindings: opp: Support multiple opp-suspend properties
    opp: core: add regulators enable and disable
    opp: Don't decrement uninitialized list_kref
    opp: Add dev_pm_opp_find_level_exact()
    opp: Return genpd virtual devices from dev_pm_opp_attach_genpd()
    opp: Not all power-domains are scalable

    Rafael J. Wysocki
     

21 Aug, 2019

1 commit

  • The network_latency and network_throughput flags for PM-QoS have not
    found much use in drivers or in userspace since they were introduced.

    Commit 4a733ef1bea7 ("mac80211: remove PM-QoS listener") removed the
    only user PM_QOS_NETWORK_LATENCY in the kernel a while ago and there
    don't seem to be any userspace tools using the character device files
    either.

    PM_QOS_MEMORY_BANDWIDTH was never even added to the trace events.

    Remove all the flags except cpu_dma_latency.

    Signed-off-by: Amit Kucheria
    Acked-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki

    Amit Kucheria
     

26 Jul, 2019

1 commit


23 Jul, 2019

1 commit


19 Jul, 2019

1 commit

  • Pull more power management updates from Rafael Wysocki:
    "These modify the Intel RAPL driver to allow it to use an MMIO
    interface to the hardware, make the int340X thermal driver provide
    such an interface for it, add Intel Ice Lake CPU IDs to the RAPL
    driver (these changes depend on the previously merged x86 arch
    changes), update cpufreq to use the PM QoS framework for managing the
    min and max frequency limits, and add update the imx-cpufreq-dt
    cpufreq driver to support i.MX8MN.

    Specifics:

    - Add MMIO interface support to the Intel RAPL power capping driver
    and update the int340X thermal driver to provide a RAPL MMIO
    interface (Zhang Rui, Stephen Rothwell).

    - Add Intel Ice Lake CPU IDs to the RAPL driver (Zhang Rui, Rajneesh
    Bhardwaj).

    - Make cpufreq use the PM QoS framework (instead of notifiers) for
    managing the min and max frequency constraints (Viresh Kumar).

    - Add i.MX8MN support to the imx-cpufreq-dt cpufreq driver (Anson
    Huang)"

    * tag 'pm-5.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (27 commits)
    cpufreq: Make cpufreq_generic_init() return void
    intel_rapl: need linux/cpuhotplug.h for enum cpuhp_state
    powercap/rapl: Add Ice Lake NNPI support to RAPL driver
    powercap/intel_rapl: add support for ICX-D
    powercap/intel_rapl: add support for ICX
    powercap/intel_rapl: add support for IceLake desktop
    intel_rapl: Fix module autoloading issue
    int340X/processor_thermal_device: add support for MMIO RAPL
    intel_rapl: support two power limits for every RAPL domain
    intel_rapl: support 64 bit register
    intel_rapl: abstract RAPL common code
    intel_rapl: cleanup hardcoded MSR access
    intel_rapl: cleanup some functions
    intel_rapl: abstract register access operations
    intel_rapl: abstract register address
    intel_rapl: introduce struct rapl_if_private
    intel_rapl: introduce intel_rapl.h
    intel_rapl: remove hardcoded register index
    intel_rapl: use reg instead of msr
    cpufreq: imx-cpufreq-dt: Add i.MX8MN support
    ...

    Linus Torvalds
     

17 Jul, 2019

1 commit

  • The power docs are orphaned at the documentation body.

    While it could likely be moved to be inside some guide, I'm opting to just
    adding it to the main index.rst, removing the :orphan: and adding the SPDX
    header.

    The reason is similar to what it was done for other driver-specific
    subsystems: the docs there contain a mix of Kernelspace, uAPI and
    admin-guide. So, better to keep them on its own directory,
    while the docs there are not properly classified.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

16 Jul, 2019

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    "Core:
    - add HWMON compat layer
    - new properties:
    - input power limit
    - input voltage limit

    Drivers:
    - qcom-pon: add gen2 support
    - new driver for storing reboot move in NVMEM
    - new driver for Wilco EC charger configuration
    - simplify getting the adapter of a client"

    * tag 'for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
    power: reset: nvmem-reboot-mode: add CONFIG_OF dependency
    power_supply: wilco_ec: Add charging config driver
    power: supply: cros: allow to set input voltage and current limit
    power: supply: add input power and voltage limit properties
    power: supply: fix semicolon.cocci warnings
    power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface
    dt-bindings: power: reset: add document for NVMEM based reboot-mode
    reset: qcom-pon: Add support for gen2 pon
    dt-bindings: power: reset: qcom: Add qcom,pm8998-pon compatibility line
    power: supply: Add HWMON compatibility layer
    power: supply: sbs-manager: simplify getting the adapter of a client
    power: supply: rt9455_charger: simplify getting the adapter of a client
    power: supply: rt5033_battery: simplify getting the adapter of a client
    power: supply: max17042_battery: simplify getting the adapter of a client
    power: supply: max17040_battery: simplify getting the adapter of a client
    power: supply: max14656_charger_detector: simplify getting the adapter of a client
    power: supply: bq25890_charger: simplify getting the adapter of a client
    power: supply: bq24257_charger: simplify getting the adapter of a client
    power: supply: bq24190_charger: simplify getting the adapter of a client

    Linus Torvalds
     

04 Jul, 2019

2 commits

  • In order to allow dev_pm_qos_read_value() to read values for different
    QoS requests, pass request type as a parameter to these routines.

    For now, it only supports resume-latency request type but will be
    extended to frequency limit (min/max) constraints later on.

    Reviewed-by: Matthias Kaehlcke
    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     
  • In order to use the same set of routines to register notifiers for
    different request types, update the existing
    dev_pm_qos_{add|remove}_notifier() routines with an additional
    parameter: request-type.

    For now, it only supports resume-latency request type but will be
    extended to frequency limit (min/max) constraints later on.

    Reviewed-by: Matthias Kaehlcke
    Reviewed-by: Ulf Hansson
    Signed-off-by: Viresh Kumar
    Signed-off-by: Rafael J. Wysocki

    Viresh Kumar
     

28 Jun, 2019

1 commit

  • For thermal management strategy you might be interested on limit the
    input power for a power supply. We already have current limit but
    basically what we probably want is to limit power. So, introduce the
    input_power_limit property.

    Although the common use case is limit the input power, in some
    specific cases it is the voltage that is problematic (i.e some regulators
    have different efficiencies at higher voltage resulting in more heat).
    So introduce also the input_voltage_limit property.

    This happens in one Chromebook and is used on the Pixel C's thermal
    management strategy to effectively limit the input power to 5V 3A when
    the screen is on. When the screen is on, the display, the CPU, and the GPU
    all contribute more heat to the system than while the screen is off, and
    we made a tradeoff to throttle the charger in order to give more of the
    thermal budget to those other components.

    So there's nothing fundamentally broken about the hardware that would
    cause the Pixel C to malfunction if we were charging at 9V or 12V instead
    of 5V when the screen is on, i.e. if userspace doesn't change this.

    What would happen is that you wouldn't meet Google's skin temperature
    targets on the system if the charger was allowed to run at 9V or 12V with
    the screen on.

    For folks hacking on Pixel Cs (which is now outside of Google's official
    support window for Android) and customizing their own kernel and userspace
    this would be acceptable, but we wanted to expose this feature in the
    power supply properties because the feature does exist in the Emedded
    Controller firmware of the Pixel C and all of Google's Chromebooks with
    USB-C made since 2015 in case someone running an up to date kernel wanted
    to limit the charging power for thermal or other reasons.

    This patch exposes a new property, similar to input current limit, to
    re-configure the maximum voltage from the external supply at runtime
    based on system-level knowledge or user input.

    Signed-off-by: Enric Balletbo i Serra
    Reviewed-by: Guenter Roeck
    Acked-by: Adam Thomson
    Reviewed-by: Benson Leung
    Signed-off-by: Sebastian Reichel

    Enric Balletbo i Serra
     

15 Jun, 2019

1 commit

  • Convert the PM documents to ReST, in order to allow them to
    build with Sphinx.

    The conversion is actually:
    - add blank lines and indentation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Bjorn Helgaas
    Acked-by: Mark Brown
    Acked-by: Srivatsa S. Bhat (VMware)

    Mauro Carvalho Chehab
     

27 Jan, 2019

1 commit

  • Introduce a documentation file summarizing the key design points and
    APIs of the newly introduced Energy Model framework.

    Signed-off-by: Quentin Perret
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: corbet@lwn.net
    Cc: dietmar.eggemann@arm.com
    Cc: morten.rasmussen@arm.com
    Cc: patrick.bellasi@arm.com
    Cc: qais.yousef@arm.com
    Cc: rjw@rjwysocki.net
    Link: https://lkml.kernel.org/r/20190110110546.8101-2-quentin.perret@arm.com
    Signed-off-by: Ingo Molnar

    Quentin Perret
     

21 Nov, 2018

1 commit

  • Whilst making an unrelated change to some Documentation, Linus sayeth:

    | Afaik, even in Britain, "whilst" is unusual and considered more
    | formal, and "while" is the common word.
    |
    | [...]
    |
    | Can we just admit that we work with computers, and we don't need to
    | use þe eald Englisc spelling of words that most of the world never
    | uses?

    dictionary.com refers to the word as "Chiefly British", which is
    probably an undesirable attribute for technical documentation.

    Replace all occurrences under Documentation/ with "while".

    Cc: David Howells
    Cc: Liam Girdwood
    Cc: Chris Wilson
    Cc: Michael Halcrow
    Cc: Jonathan Corbet
    Reported-by: Linus Torvalds
    Signed-off-by: Will Deacon
    Signed-off-by: Jonathan Corbet

    Will Deacon
     

25 Oct, 2018

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "This is a fairly typical cycle for documentation. There's some welcome
    readability improvements for the formatted output, some LICENSES
    updates including the addition of the ISC license, the removal of the
    unloved and unmaintained 00-INDEX files, the deprecated APIs document
    from Kees, more MM docs from Mike Rapoport, and the usual pile of typo
    fixes and corrections"

    * tag 'docs-4.20' of git://git.lwn.net/linux: (41 commits)
    docs: Fix typos in histogram.rst
    docs: Introduce deprecated APIs list
    kernel-doc: fix declaration type determination
    doc: fix a typo in adding-syscalls.rst
    docs/admin-guide: memory-hotplug: remove table of contents
    doc: printk-formats: Remove bogus kobject references for device nodes
    Documentation: preempt-locking: Use better example
    dm flakey: Document "error_writes" feature
    docs/completion.txt: Fix a couple of punctuation nits
    LICENSES: Add ISC license text
    LICENSES: Add note to CDDL-1.0 license that it should not be used
    docs/core-api: memory-hotplug: add some details about locking internals
    docs/core-api: rename memory-hotplug-notifier to memory-hotplug
    docs: improve readability for people with poorer eyesight
    yama: clarify ptrace_scope=2 in Yama documentation
    docs/vm: split memory hotplug notifier description to Documentation/core-api
    docs: move memory hotplug description into admin-guide/mm
    doc: Fix acronym "FEKEK" in ecryptfs
    docs: fix some broken documentation references
    iommu: Fix passthrough option documentation
    ...

    Linus Torvalds
     

10 Sep, 2018

2 commits

  • This commit updates the default value of /sys/power/image_size in
    the documentation.

    Since ac5c24ec1e983313ef0015258fba6f630e54e7cn the `image_size' value is
    set to about 2/5 of RAM, according to kernel/power/snapshot.c:

    image_size = ((totalram_pages * 2) / 5) * PAGE_SIZE;

    but this change was not reflected everywhere in the documentation.

    Signed-off-by: Vladimir D. Seleznev
    Signed-off-by: Rafael J. Wysocki

    Vladimir D. Seleznev
     
  • This is a respin with a wider audience (all that get_maintainer returned)
    and I know this spams a *lot* of people. Not sure what would be the correct
    way, so my apologies for ruining your inbox.

    The 00-INDEX files are supposed to give a summary of all files present
    in a directory, but these files are horribly out of date and their
    usefulness is brought into question. Often a simple "ls" would reveal
    the same information as the filenames are generally quite descriptive as
    a short introduction to what the file covers (it should not surprise
    anyone what Documentation/sched/sched-design-CFS.txt covers)

    A few years back it was mentioned that these files were no longer really
    needed, and they have since then grown further out of date, so perhaps
    it is time to just throw them out.

    A short status yields the following _outdated_ 00-INDEX files, first
    counter is files listed in 00-INDEX but missing in the directory, last
    is files present but not listed in 00-INDEX.

    List of outdated 00-INDEX:
    Documentation: (4/10)
    Documentation/sysctl: (0/1)
    Documentation/timers: (1/0)
    Documentation/blockdev: (3/1)
    Documentation/w1/slaves: (0/1)
    Documentation/locking: (0/1)
    Documentation/devicetree: (0/5)
    Documentation/power: (1/1)
    Documentation/powerpc: (0/5)
    Documentation/arm: (1/0)
    Documentation/x86: (0/9)
    Documentation/x86/x86_64: (1/1)
    Documentation/scsi: (4/4)
    Documentation/filesystems: (2/9)
    Documentation/filesystems/nfs: (0/2)
    Documentation/cgroup-v1: (0/2)
    Documentation/kbuild: (0/4)
    Documentation/spi: (1/0)
    Documentation/virtual/kvm: (1/0)
    Documentation/scheduler: (0/2)
    Documentation/fb: (0/1)
    Documentation/block: (0/1)
    Documentation/networking: (6/37)
    Documentation/vm: (1/3)

    Then there are 364 subdirectories in Documentation/ with several files that
    are missing 00-INDEX alltogether (and another 120 with a single file and no
    00-INDEX).

    I don't really have an opinion to whether or not we /should/ have 00-INDEX,
    but the above 00-INDEX should either be removed or be kept up to date. If
    we should keep the files, I can try to keep them updated, but I rather not
    if we just want to delete them anyway.

    As a starting point, remove all index-files and references to 00-INDEX and
    see where the discussion is going.

    Signed-off-by: Henrik Austad
    Acked-by: "Paul E. McKenney"
    Just-do-it-by: Steven Rostedt
    Reviewed-by: Jens Axboe
    Acked-by: Paul Moore
    Acked-by: Greg Kroah-Hartman
    Acked-by: Mark Brown
    Acked-by: Mike Rapoport
    Cc: [Almost everybody else]
    Signed-off-by: Jonathan Corbet

    Henrik Austad
     

06 Aug, 2018

1 commit

  • At present, "systemctl suspend" and "shutdown" can run in parrallel. A
    system can suspend after devices_shutdown(), and resume. Then the shutdown
    task goes on to power off. This causes many devices are not really shut
    off. Hence replacing reboot_mutex with system_transition_mutex (renamed
    from pm_mutex) to achieve the exclusion. The renaming of pm_mutex as
    system_transition_mutex can be better to reflect the purpose of the mutex.

    Signed-off-by: Pingfan Liu
    Acked-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki

    Pingfan Liu
     

23 Apr, 2018

1 commit


30 Mar, 2018

1 commit


30 Jan, 2018

1 commit

  • Pull regulator updates from Mark Brown:
    "This is a quiet release in terms of code volume but a fairly big one
    in terms of framework changes - we've got one long awaited feature in
    the form of runtime configuration of suspend and the start of coupled
    regulator support too:

    - Support for modifying the voltage and enable configuration devices
    will have in suspend, contributed by Chunyan Zhang.

    - Support for the Spreadtrum SC2731, contributed by Erick Chen.

    - The start of changes to support coupled regulators from Maciej
    Purski, the rest of the series should arrive for v4.17"

    * tag 'regulator-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
    regulator: Fix build error
    regulator: core: Refactor regulator_list_voltage()
    regulator: core: Move of_find_regulator_by_node() to of_regulator.c
    regulator: add PM suspend and resume hooks
    regulator: empty the old suspend functions
    regulator: leave one item to record whether regulator is enabled
    regulator: make regulator voltage be an array to support more states
    regulator: added support for suspend states
    regulator: qcom_spmi: Use regmap helpers for enable/disable/is_enabled callback
    regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE
    regulator: fix incorrect indentation of two assignment statements
    regulator: sc2731: Add regulator driver to support Spreadtrum SC2731 PMIC
    regulator: Add Spreadtrum SC2731 regulator documentation
    regulator: Update code examples in documentation
    MAINTAINERS: regulator: Add Documentation/power/regulator/
    regulator: tps65218: Add NULL test for devm_kzalloc call
    regulator: tps65218: Remove unused enum tps65218_regulators

    Linus Torvalds
     

29 Nov, 2017

1 commit


27 Nov, 2017

1 commit

  • Add support for DPM_FLAG_LEAVE_SUSPENDED to the PCI bus type by
    making it (a) set the power.may_skip_resume status bit for devices
    that, from its perspective, may be left in suspend after system
    wakeup from sleep and (b) return early from pci_pm_resume_noirq()
    for devices whose remaining resume callbacks during the transition
    under way are going to be skipped by the PM core.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Bjorn Helgaas

    Rafael J. Wysocki
     

17 Nov, 2017

1 commit

  • The check for "active" children in __pm_runtime_set_status(), when
    trying to set the parent device status to "suspended", doesn't
    really make sense, because in fact it is not invalid to set the
    status of a device with runtime PM disabled to "suspended" in any
    case. It is invalid to enable runtime PM for a device with its
    status set to "suspended" while its child_count reference counter
    is nonzero, but the check in __pm_runtime_set_status() doesn't
    really cover that situation.

    For this reason, drop the children check from __pm_runtime_set_status()
    and add a check against child_count reference counters of "suspended"
    devices to pm_runtime_enable().

    Fixes: a8636c89648a (PM / Runtime: Don't allow to suspend a device with an active child)
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Ulf Hansson
    Reviewed-by: Johan Hovold

    Rafael J. Wysocki
     

14 Nov, 2017

2 commits

  • Pull power management updates from Rafael Wysocki:
    "There are no real big ticket items here this time.

    The most noticeable change is probably the relocation of the OPP
    (Operating Performance Points) framework to its own directory under
    drivers/ as it has grown big enough for that. Also Viresh is now going
    to maintain it and send pull requests for it to me, so you will see
    this change in the git history going forward (but still not right
    now).

    Another noticeable set of changes is the modifications of the PM core,
    the PCI subsystem and the ACPI PM domain to allow of more integration
    between system-wide suspend/resume and runtime PM. For now it's just a
    way to avoid resuming devices from runtime suspend unnecessarily
    during system suspend (if the driver sets a flag to indicate its
    readiness for that) and in the works is an analogous mechanism to
    allow devices to stay suspended after system resume.

    In addition to that, we have some changes related to supporting
    frequency-invariant CPU utilization metrics in the scheduler and in
    the schedutil cpufreq governor on ARM and changes to add support for
    device performance states to the generic power domains (genpd)
    framework.

    The rest is mostly fixes and cleanups of various sorts.

    Specifics:

    - Relocate the OPP (Operating Performance Points) framework to its
    own directory under drivers/ and add support for power domain
    performance states to it (Viresh Kumar).

    - Modify the PM core, the PCI bus type and the ACPI PM domain to
    support power management driver flags allowing device drivers to
    specify their capabilities and preferences regarding the handling
    of devices with enabled runtime PM during system suspend/resume and
    clean up that code somewhat (Rafael Wysocki, Ulf Hansson).

    - Add frequency-invariant accounting support to the task scheduler on
    ARM and ARM64 (Dietmar Eggemann).

    - Fix PM QoS device resume latency framework to prevent "no
    restriction" requests from overriding requests with specific
    requirements and drop the confusing PM_QOS_FLAG_REMOTE_WAKEUP
    device PM QoS flag (Rafael Wysocki).

    - Drop legacy class suspend/resume operations from the PM core and
    drop legacy bus type suspend and resume callbacks from ARM/locomo
    (Rafael Wysocki).

    - Add min/max frequency support to devfreq and clean it up somewhat
    (Chanwoo Choi).

    - Rework wakeup support in the generic power domains (genpd)
    framework and update some of its users accordingly (Geert
    Uytterhoeven).

    - Convert timers in the PM core to use timer_setup() (Kees Cook).

    - Add support for exposing the SLP_S0 (Low Power S0 Idle) residency
    counter based on the LPIT ACPI table on Intel platforms (Srinivas
    Pandruvada).

    - Add per-CPU PM QoS resume latency support to the ladder cpuidle
    governor (Ramesh Thomas).

    - Fix a deadlock between the wakeup notify handler and the notifier
    removal in the ACPI core (Ville Syrjälä).

    - Fix a cpufreq schedutil governor issue causing it to use stale
    cached frequency values sometimes (Viresh Kumar).

    - Fix an issue in the system suspend core support code causing wakeup
    events detection to fail in some cases (Rajat Jain).

    - Fix the generic power domains (genpd) framework to prevent the PM
    core from using the direct-complete optimization with it as that is
    guaranteed to fail (Ulf Hansson).

    - Fix a minor issue in the cpuidle core and clean it up a bit (Gaurav
    Jindal, Nicholas Piggin).

    - Fix and clean up the intel_idle and ARM cpuidle drivers (Jason
    Baron, Len Brown, Leo Yan).

    - Fix a couple of minor issues in the OPP framework and clean it up
    (Arvind Yadav, Fabio Estevam, Sudeep Holla, Tobias Jordan).

    - Fix and clean up some cpufreq drivers and fix a minor issue in the
    cpufreq statistics code (Arvind Yadav, Bhumika Goyal, Fabio
    Estevam, Gautham Shenoy, Gustavo Silva, Marek Szyprowski, Masahiro
    Yamada, Robert Jarzmik, Zumeng Chen).

    - Fix minor issues in the system suspend and hibernation core, in
    power management documentation and in the AVS (Adaptive Voltage
    Scaling) framework (Helge Deller, Himanshu Jha, Joe Perches, Rafael
    Wysocki).

    - Fix some issues in the cpupower utility and document that Shuah
    Khan is going to maintain it going forward (Prarit Bhargava, Shuah
    Khan)"

    * tag 'pm-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (88 commits)
    tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore
    tools/power/cpupower: Add 64 bit library detection
    intel_idle: Graceful probe failure when MWAIT is disabled
    cpufreq: schedutil: Reset cached_raw_freq when not in sync with next_freq
    freezer: Fix typo in freezable_schedule_timeout() comment
    PM / s2idle: Clear the events_check_enabled flag
    cpufreq: stats: Handle the case when trans_table goes beyond PAGE_SIZE
    cpufreq: arm_big_little: make cpufreq_arm_bL_ops structures const
    cpufreq: arm_big_little: make function arguments and structure pointer const
    cpuidle: Avoid assignment in if () argument
    cpuidle: Clean up cpuidle_enable_device() error handling a bit
    ACPI / PM: Fix acpi_pm_notifier_lock vs flush_workqueue() deadlock
    PM / Domains: Fix genpd to deal with drivers returning 1 from ->prepare()
    cpuidle: ladder: Add per CPU PM QoS resume latency support
    PM / QoS: Fix device resume latency framework
    PM / domains: Rework governor code to be more consistent
    PM / Domains: Remove gpd_dev_ops.active_wakeup() callback
    soc: rockchip: power-domain: Use GENPD_FLAG_ACTIVE_WAKEUP
    soc: mediatek: Use GENPD_FLAG_ACTIVE_WAKEUP
    ARM: shmobile: pm-rmobile: Use GENPD_FLAG_ACTIVE_WAKEUP
    ...

    Linus Torvalds
     
  • Pull smp/hotplug updates from Thomas Gleixner:
    "No functional changes, just removal of obsolete and outdated defines,
    macros and documentation"

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    cpu/hotplug: Get rid of CPU hotplug notifier leftovers
    cpu/hotplug: Remove obsolete notifier macros

    Linus Torvalds
     

13 Nov, 2017

1 commit


06 Nov, 2017

2 commits

  • Make the PCI bus type take DPM_FLAG_SMART_SUSPEND into account in its
    system-wide PM callbacks and make sure that all code that should not
    run in parallel with pci_pm_runtime_resume() is executed in the "late"
    phases of system suspend, freeze and poweroff transitions.

    [Note that the pm_runtime_suspended() check in pci_dev_keep_suspended()
    is an optimization, because if is not passed, all of the subsequent
    checks may be skipped and some of them are much more overhead in
    general.]

    Also use the observation that if the device is in runtime suspend
    at the beginning of the "late" phase of a system-wide suspend-like
    transition, its state cannot change going forward (runtime PM is
    disabled for it at that time) until the transition is over and the
    subsequent system-wide PM callbacks should be skipped for it (as
    they generally assume the device to not be suspended), so add checks
    for that in pci_pm_suspend_late/noirq(), pci_pm_freeze_late/noirq()
    and pci_pm_poweroff_late/noirq().

    Moreover, if pci_pm_resume_noirq() or pci_pm_restore_noirq() is
    called during the subsequent system-wide resume transition and if
    the device was left in runtime suspend previously, its runtime PM
    status needs to be changed to "active" as it is going to be put
    into the full-power state, so add checks for that too to these
    functions.

    In turn, if pci_pm_thaw_noirq() runs after the device has been
    left in runtime suspend, the subsequent "thaw" callbacks need
    to be skipped for it (as they may not work correctly with a
    suspended device), so set the power.direct_complete flag for the
    device then to make the PM core skip those callbacks.

    In addition to the above add a core helper for checking if
    DPM_FLAG_SMART_SUSPEND is set and the device runtime PM status is
    "suspended" at the same time, which is done quite often in the new
    code (and will be done elsewhere going forward too).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Bjorn Helgaas

    Rafael J. Wysocki
     
  • The motivation for this change is to provide a way to work around
    a problem with the direct-complete mechanism used for avoiding
    system suspend/resume handling for devices in runtime suspend.

    The problem is that some middle layer code (the PCI bus type and
    the ACPI PM domain in particular) returns positive values from its
    system suspend ->prepare callbacks regardless of whether the driver's
    ->prepare returns a positive value or 0, which effectively prevents
    drivers from being able to control the direct-complete feature.
    Some drivers need that control, however, and the PCI bus type has
    grown its own flag to deal with this issue, but since it is not
    limited to PCI, it is better to address it by adding driver flags at
    the core level.

    To that end, add a driver_flags field to struct dev_pm_info for flags
    that can be set by device drivers at the probe time to inform the PM
    core and/or bus types, PM domains and so on on the capabilities and/or
    preferences of device drivers. Also add two static inline helpers
    for setting that field and testing it against a given set of flags
    and make the driver core clear it automatically on driver remove
    and probe failures.

    Define and document two PM driver flags related to the direct-
    complete feature: NEVER_SKIP and SMART_PREPARE that can be used,
    respectively, to indicate to the PM core that the direct-complete
    mechanism should never be used for the device and to inform the
    middle layer code (bus types, PM domains etc) that it can only
    request the PM core to use the direct-complete mechanism for
    the device (by returning a positive value from its ->prepare
    callback) if it also has been requested by the driver.

    While at it, make the core check pm_runtime_suspended() when
    setting power.direct_complete so that it doesn't need to be
    checked by ->prepare callbacks.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Bjorn Helgaas
    Reviewed-by: Ulf Hansson

    Rafael J. Wysocki
     

20 Oct, 2017

1 commit


14 Oct, 2017

1 commit

  • The PM QoS flag PM_QOS_FLAG_REMOTE_WAKEUP is not used consistently
    and the vast majority of code simply assumes that remote wakeup
    should be enabled for devices in runtime suspend if they can
    generate wakeup signals, so drop it.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Ulf Hansson
    Reviewed-by: Mika Westerberg

    Rafael J. Wysocki
     

13 Oct, 2017

2 commits


29 Aug, 2017

2 commits


05 Aug, 2017

1 commit

  • Modify the ACPI system sleep support setup code to select
    suspend-to-idle as the default system sleep state if
    (1) the ACPI_FADT_LOW_POWER_S0 flag is set in the FADT and
    (2) the Low Power Idle S0 _DSM interface has been discovered and
    (3) the default sleep state was not selected from the kernel command
    line.

    The main motivation for this change is that systems where the (1) and
    (2) conditions are met typically ship with OSes that don't exercise
    the S3 path in the platform firmware which remains untested and turns
    out to be non-functional at least in some cases.

    Signed-off-by: Rafael J. Wysocki
    Tested-by: Mario Limonciello

    Rafael J. Wysocki
     

28 Jul, 2017

1 commit

  • Since commit a8636c89648a (PM / Runtime: Don't allow to suspend a
    device with an active child) it is no longer permitted to set
    RPM_SUSPENDED state for a device with active children unless
    power.ignore_children is set.

    Update the documentation to reflect this.

    Signed-off-by: Johan Hovold
    Reviewed-by: Ulf Hansson
    Signed-off-by: Rafael J. Wysocki

    Johan Hovold
     

05 Jul, 2017

1 commit

  • Pull power supply and reset updates from Sebastian Reichel:
    "New drivers:
    - Linear ltc3651 charger driver
    - Motorola CPCAP battery fuel-gauge driver

    New chip/feature support:
    - bq27xxx: prepare for chip data setup
    - axp20x_battery: support max charge current setup

    New core features:
    - add Apple Brick ID type
    - support "supplied-from" device property for generic ACPI/pdata support
    - support strings for sysfs properties representing enums
    - introduce battery-info (backend is DT only for now)
    - provide reboot-mode header globally

    .. and misc fixes"

    * tag 'for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (39 commits)
    power: supply: sbs-battery: Don't needlessly set CAPACITY_MODE
    power: supply: sbs-battery: Prevent CAPACITY_MODE races
    power: supply: bq24735: remove incorrect le16_to_cpu calls
    power: supply: sbs-battery: remove incorrect le16_to_cpu calls
    power: supply: cpcap-charger: Add missing power_supply_config
    power: supply: twl4030-charger: move allocation of iio channel to the beginning
    power: supply: twl4030-charger: allocate iio by devm_iio_channel_get() and fix error path
    power: supply: core: constify psy_tcd_ops.
    dt-bindings: power: supply: cpcap-battery: Add power-supplies property
    dt-bindings: power: supply: move max8903-charger.txt to proper location
    dt-bindings: power: supply: move maxim,max14656.txt to proper location
    power: supply: twl4030_charger: Use sysfs_match_string() helper
    power: reset: reboot-mode: Make include file global
    power: supply: axp20x_battery: add DT support for battery max constant charge current
    power: supply: axp20x_battery: add support for DT battery
    power: supply: bq27xxx: Add power_supply_battery_info support
    power: supply: bq27xxx: Add chip data memory read/write support
    power: supply: bq27xxx: Add bulk transfer bus methods
    dt-bindings: power: supply: bq27xxx: Add monitored-battery documentation
    power: supply: core: Add power_supply_prop_precharge
    ...

    Linus Torvalds
     

28 Jun, 2017

1 commit

  • The run_wake flag in struct dev_pm_info is used to indicate whether
    or not the device is capable of generating remote wakeup signals at
    run time (or in the system working state), but the distinction
    between runtime remote wakeup and system wakeup signaling has always
    been rather artificial. The only practical reason for it to exist
    at the core level was that ACPI and PCI treated those two cases
    differently, but that's not the case any more after recent changes.

    For this reason, get rid of the run_wake flag and, when applicable,
    use device_set_wakeup_capable() and device_can_wakeup() instead of
    device_set_run_wake() and device_run_wake(), respectively.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mika Westerberg
    Acked-by: Bjorn Helgaas

    Rafael J. Wysocki
     

08 Jun, 2017

1 commit