- Sep 04, 2024
-
-
Andy Shevchenko authored
The Documentation refers to some deprecated macros. Update those parts accordingly. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20240903172520.3568731-1-andriy.shevchenko@linux.intel.com [ rjw: Changelog edit ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jun 26, 2024
-
-
Biju Das authored
Add a helper function that allow regulator consumers to allow low-level HW access, in order to enable/disable regulator in atomic context. The use-case for RZ/G2L SoC is to enable VBUS selection register based on vbus detection that happens in interrupt context. Signed-off-by:
Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20240616105402.45211-4-biju.das.jz@bp.renesas.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- Mar 27, 2024
-
-
Bjorn Helgaas authored
platform_pci_wakeup_init() was removed by d2e5f0c1 ("ACPI / PCI: Rework the setup and cleanup of device wakeup") but was still mentioned in the documentation. Update the doc to refer to pci_acpi_setup(), which does the equivalent work. Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Dhruva Gole <d-gole@ti.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Mar 13, 2024
-
-
Saravana Kannan authored
Typos are bad. Fix them. Signed-off-by:
Saravana Kannan <saravanak@google.com> Reviewed-by:
Dhruva Gole <d-gole@ti.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Feb 29, 2024
-
-
Yiwei Lin authored
The '7. Generic subsystem callbacks' should be a section title, but the markdown syntax is not adequate now. Fix it so the chapter can be linked at docs.kernel.org correctly. Signed-off-by:
Yiwei Lin <s921975628@gmail.com> [ rjw: Changelog edits ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Feb 12, 2024
-
-
RinHizakura authored
According to the context, 'pci_pm_suspend_noirq' is the right word for the changed sentence. Signed-off-by:
Yiwei Lin <s921975628@gmail.com> [ rjw: Subject edits ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Sakari Ailus authored
Add __pm_runtime_put_autosuspend() that replaces pm_runtime_put_autosuspend() for new users. The intent is to later re-purpose pm_runtime_put_autosuspend() to also mark the device's last busy stamp---which is what the vast majority of users actually need. This is also described in pm_runtime_put_autosuspend() documentation. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Sakari Ailus authored
There are two ways to opportunistically increment a device's runtime PM usage count, calling either pm_runtime_get_if_active() or pm_runtime_get_if_in_use(). The former has an argument to tell whether to ignore the usage count or not, and the latter simply calls the former with ign_usage_count set to false. The other users that want to ignore the usage_count will have to explicitly set that argument to true which is a bit cumbersome. To make this function more practical to use, remove the ign_usage_count argument from the function. The main implementation is in a static function called pm_runtime_get_conditional() and implementations of pm_runtime_get_if_active() and pm_runtime_get_if_in_use() are moved to runtime.c. Signed-off-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by:
Alex Elder <elder@linaro.org> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Takashi Iwai <tiwai@suse.de> # sound/ Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> # drivers/accel/ivpu/ Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> # drivers/gpu/drm/i915/ Reviewed-by:
Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> # drivers/pci/ Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Feb 08, 2024
-
-
Lukasz Luba authored
Add a new description which covers the information about runtime EM. It contains the design decisions, describes models and how they reflect the reality. Remove description of the default EM. Add example driver code which modifies EM. Add API documentation for the new feature which allows to modify the EM in runtime. Reviewed-by:
Dietmar Eggemann <dietmar.eggemann@arm.com> Tested-by:
Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jan 23, 2024
-
-
Erick Archer authored
As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting. Using those allocations could lead to linear overflows of heap memory and other misbehaviors. So, in the example code use the purpose specific kcalloc() function instead of the argument size * count in the kzalloc() function. At the same time, modify the translations accordingly. Signed-off-by:
Erick Archer <erick.archer@gmx.com> Reviewed-by:
Hu Haowen <2023002089@link.tyut.edu.cn> Reviewed-by:
Yanteng Si <siyanteng@loongson.cn> Reviewed-by:
Hu Haowen <2023002089@link.tyut.edu.cn> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org>
-
- Dec 19, 2023
-
-
Kevin Hao authored
The core freezer logic has been modified by commit f5d39b02 ("freezer,sched: Rewrite core freezer logic"), so adjust the documentation to reflect the new code. The main changes include: - Drop references to PF_FROZEN and PF_FREEZER_SKIP - Describe TASK_FROZEN, TASK_FREEZABLE and __TASK_FREEZABLE_UNSAFE - Replace system_freezing_cnt with freezer_active - Use a different example for the loop of a freezable kernel thread, since the old code is gone gone Signed-off-by:
Kevin Hao <haokexin@gmail.com> [ rjw: Subject and changelog edits, doc text adjustments ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Aug 18, 2023
-
-
Bjorn Helgaas authored
Fix typos in Documentation. Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20230814212822.193684-4-helgaas@kernel.org Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Apr 27, 2023
-
-
Philippe De Muyter authored
Removing an erroneous 'd' at the end of 'regulator_enable'. Signed-off-by:
Philippe De Muyter <phdm@macqel.be> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/1682537582-2314-1-git-send-email-Philippe.DeMuyter@macq.eu Signed-off-by:
Mark Brown <broonie@kernel.org>
-
- Feb 01, 2023
-
-
Arnd Bergmann authored
This driver was used for a couple of Intel PXA and Samsung S3C24xx based PDAs, but all of those are now removed from the kernel, so the driver itself is no longer useful. Cc: Anton Vorontsov <cbou@mail.ru> Cc: linux-pm@vger.kernel.org Acked-by:
Sebastian Reichel <sebastian.reichel@collabora.com> Acked-by:
Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
-
- Jan 30, 2023
-
-
Randy Dunlap authored
Correct spelling problems for Documentation/power/ as reported by codespell. Signed-off-by:
Randy Dunlap <rdunlap@infradead.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jul 15, 2022
-
-
Lukasz Luba authored
The EM now uses the micro-Watts scale for the power values. Update related documentation to reflect that fact. Fix also a problematic sentence in the doc "to:" which triggers test scripts complaining about wrong email address. Reviewed-by:
Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jul 08, 2022
-
-
Mario Limonciello authored
`pme_interrupt` was dropped from `struct pci_dev` as part of commit 8370c2dc ("PCI / PM: Drop pme_interrupt flag from struct pci_dev"), but the Documentation still includes this member. Remove it from the documentation as well and update it to have the missing `pme_poll` member instead. Fixes: 8370c2dc ("PCI / PM: Drop pme_interrupt flag from struct pci_dev") Signed-off-by:
Mario Limonciello <mario.limonciello@amd.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Apr 13, 2022
-
-
Lukasz Luba authored
Add description about new artificial EM registration and use cases. Update also the documentation with the new .get_cost() callback description and usage. Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Reviewed-by:
Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Lukasz Luba authored
The .active_power() callback passes the device pointer when it's called. Aligned with a convetion present in other subsystems and pass the 'dev' as a first argument. It looks more cleaner. Adjust all affected drivers which implement that API callback. Suggested-by:
Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Reviewed-by:
Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Mar 03, 2022
-
-
Lukasz Luba authored
The new registration method allows to get power values from the DT OPP definition. The new OPP entry property "opp-microwatt" contains total power expressed in micro-Watts. Align the EM documentation with this new possible registration method of EM. Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org>
-
- Dec 27, 2021
-
-
Tang Yizhou authored
Three problems have been revised: 1. CONFIG_PM_OPP no longer depends on CONFIG_PM. 2. opp_find_freq_{ceil, floor} is renamed as dev_pm_opp_find_freq_{ceil, floor}. 3. Make it clear that the 'opp' struct is actually dev_pm_opp. Signed-off-by:
Tang Yizhou <tangyizhou@huawei.com> Signed-off-by:
Viresh Kumar <viresh.kumar@linaro.org>
-
- Dec 17, 2021
-
-
Rafael J. Wysocki authored
In some cases (for example, during system-wide suspend and resume of devices) it is useful to know whether or not runtime PM has ever been enabled for a given device and, if so, what the runtime PM status of it had been right before runtime PM was disabled for it last time. For this reason, introduce a new struct dev_pm_info field called last_status that will be used for capturing the runtime PM status of the device when its power.disable_depth counter changes from 0 to 1. The new field will be set to RPM_INVALID to start with and whenever power.disable_depth changes from 1 to 0, so it will be valid only when runtime PM of the device is currently disabled, but it has been enabled at least once. Immediately use power.last_status in rpm_resume() to make it handle the case when PM runtime is disabled for the device, but its runtime PM status is RPM_ACTIVE more consistently. Namely, make it return 1 if power.last_status is also equal to RPM_ACTIVE in that case (the idea being that if the status was RPM_ACTIVE last time when power.disable_depth was changing from 0 to 1 and it is still RPM_ACTIVE, it can be assumed to reflect what happened to the device last time when it was using runtime PM) and -EACCES otherwise. Update the documentation to provide a description of last_status and change the description of pm_runtime_resume() in it to reflect the new behavior of rpm_active(). While at it, rearrange the code in pm_runtime_enable() to be more straightforward and replace the WARN() macro in it with a pr_warn() invocation which is less disruptive. Link: https://lore.kernel.org/linux-pm/20211026222626.39222-1-ulf.hansson@linaro.org/t/#u Reviewed-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Nov 10, 2021
-
-
Lukasz Luba authored
The Energy Model (EM) can be registered in two ways: 1) Using a helper function, which under the hood relies on OPP framework and DT entry in CPU node: 'dynamic-power-coefficient'. This is a 'simple' EM because it's tied to the math formula: Power = dynamic-power-coefficient * V^2 * f 2) Using em_dev_register_perf_domain() API function with a driver custom callback which provides power for each performance state. This is 'advanced' EM, since it can better reflect real power measurements for each performance state. It's not limited to any math formula and can better reflect real physics of the device. Add description of these two methods to the documentation, so developers could choose the suitable registration method (option). Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> [ rjw: Changelog edits ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Lukasz Luba authored
The Energy Model (EM) registration for CPUs should now be done using a dedicated callback added recently into CPUFreq framework and drivers. Commit c17495b0 ("cpufreq: Add callback to register with energy model") The callback guaranties that the EM registration is called at the right time during driver setup. To avoid mistakes update the documentation to align with the existing code implementation. Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Sep 07, 2021
-
-
Lukasz Luba authored
Improve the existing documentation of the Energy Model and add kernel-doc comments. This extends an API description and helps better understanding the usage. Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jun 11, 2021
-
-
Ulf Hansson authored
Recent changes to the PM core allows ->runtime_suspend|resume callbacks to be unassigned. In the earlier behaviour the PM core would return -ENOSYS, when trying to runtime resume a device, for example. Let's update the documentation to clarify this. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Acked-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- May 31, 2021
-
-
Krzysztof Kozlowski authored
pm_runtime_get_sync(), contradictory to intuition, does not drop the runtime PM usage counter on errors which lead to several wrong usages in drivers (missing the put). pm_runtime_resume_and_get() was added as a better implementation so document the preference of using it, hoping it will stop bad patterns. Suggested-by:
Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> [ rjw: Documentation change edits ] Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Apr 09, 2021
-
-
Alan Stern authored
Commit dd8088d5 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added a new runtime-PM API function without updating the documentation in runtime_pm.rst. Add the missing documentation. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Fixes: dd8088d5 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Apr 02, 2021
-
-
Mauro Carvalho Chehab authored
Changesets: 70c23e62 ("dt-bindings: power: supply: Fix remaining battery.txt links") and: 471dec80 ("dt-bindings: power: Convert battery.txt to battery.yaml") renamed: Documentation/devicetree/bindings/power/supply/battery.txt to: Documentation/devicetree/bindings/power/supply/battery.yaml. Update its cross-reference accordingly. Fixes: 70c23e62 ("dt-bindings: power: supply: Fix remaining battery.txt links") Fixes: 471dec80 ("dt-bindings: power: Convert battery.txt to battery.yaml") Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Jan 27, 2021
-
-
Bjorn Helgaas authored
Fix minor typos and grammatical issues. Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jan 11, 2021
-
-
Joe Perches authored
Replace the lkml.org links with lore to better use a single source that's more likely to stay available long-term. Done by bash script: cvt_lkml_to_lore () { tmpfile=$(mktemp ./.cvt_links.XXXXXXX) header=$(echo $1 | sed 's@/lkml/@/lkml/headers/@') wget -qO - $header > $tmpfile if [[ $? == 0 ]] ; then link=$(grep -i '^Message-Id:' $tmpfile | head -1 | \ sed -r -e 's/^\s*Message-Id:\s*<\s*//' -e 's/\s*>\s*$//' -e 's@^@https://lore.kernel.org/r/@') # echo "testlink: $link" if [ -n "$link" ] ; then wget -qO - $link > /dev/null if [[ $? == 0 ]] ; then echo $link fi fi fi rm -f $tmpfile } git grep -P -o "\bhttps?://(?:www.)?lkml.org/lkml[\/\w]+" $@ | while read line ; do echo $line file=$(echo $line | cut -f1 -d':') link=$(echo $line | cut -f2- -d':') newlink=$(cvt_lkml_to_lore $link) if [[ -n "$newlink" ]] ; then sed -i -e "s#\b$link\b#$newlink#" $file fi done Link: https://lore.kernel.org/patchwork/patch/1265849/#1462688 Signed-off-by:
Joe Perches <joe@perches.com> Link: https://lore.kernel.org/r/77cdb7f32cfb087955bfc3600b86c40bed5d4104.camel@perches.com Signed-off-by:
Jonathan Corbet <corbet@lwn.net>
-
- Dec 22, 2020
-
-
Daniel Lezcano authored
The dynamic thermal and power management is a technique to dynamically adjust the power consumption of different devices in order to ensure a global thermal constraint. An userspace daemon is usually monitoring the temperature and the power to take immediate action on the device. The DTPM framework provides an unified API to userspace to act on the power. Document this framework. Signed-off-by:
Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Nov 10, 2020
-
-
Lukasz Luba authored
Update description and meaning of a new flag, which indicates the type of power scale used for a registered Energy Model (EM) device. Reviewed-by:
Quentin Perret <qperret@google.com> Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Lukasz Luba authored
The Energy Model (EM) can store power values in milli-Watts or in abstract scale. This might cause issues in the subsystems which use the EM for estimating the device power, such as: - mixing of different scales in a subsystem which uses multiple (cooling) devices (e.g. thermal Intelligent Power Allocation (IPA)) - assuming that energy [milli-Joules] can be derived from the EM power values which might not be possible since the power scale doesn't have to be in milli-Watts To avoid misconfiguration add the requisite documentation to the EM and related subsystems: EAS and IPA. Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Sep 29, 2020
-
-
Krzysztof Wilczyński authored
PCI devices support two variants of the D3 power state: D3hot (main power present) D3cold (main power removed). Previously struct pci_dev contained: unsigned int d3_delay; /* D3->D0 transition time in ms */ unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */ "d3_delay" refers specifically to the D3hot state. Rename it to "d3hot_delay" to avoid ambiguity and align with the ACPI "_DSM for Specifying Device Readiness Durations" in the PCI Firmware spec r3.2, sec 4.6.9. There is no change to the functionality. Link: https://lore.kernel.org/r/20200730210848.1578826-1-kw@linux.com Signed-off-by:
Krzysztof Wilczyński <kw@linux.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- Jul 27, 2020
-
-
Sumeet Pawnikar authored
Modern Intel Mobile platforms support power limit4 (PL4), which is the SoC package level maximum power limit (in Watts). It can be used to preemptively limits potential SoC power to prevent power spikes from tripping the power adapter and battery over-current protection. This patch enables this feature by exposing package level peak power capping control to userspace via RAPL sysfs interface. With this, application like DTPF can modify PL4 power limit, the similar way of other package power limit (PL1). As this feature is not tested on previous generations, here it is enabled only for the platform that has been verified to work, for safety concerns. Signed-off-by:
Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Co-developed-by:
Zhang Rui <rui.zhang@intel.com> Signed-off-by:
Zhang Rui <rui.zhang@intel.com> Reviewed-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Tested-by:
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jun 24, 2020
-
-
Lukasz Luba authored
The Energy Model framework supports also other devices than CPUs. Update related information and add description for the new usage. Acked-by:
Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by:
Quentin Perret <qperret@google.com> Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- May 07, 2020
-
-
Qais Yousef authored
The single user could have called freeze_secondary_cpus() directly. Since this function was a source of confusion, remove it as it's just a pointless wrapper. While at it, rename enable_nonboot_cpus() to thaw_secondary_cpus() to preserve the naming symmetry. Done automatically via: git grep -l enable_nonboot_cpus | xargs sed -i 's/enable_nonboot_cpus/thaw_secondary_cpus/g' Signed-off-by:
Qais Yousef <qais.yousef@arm.com> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Link: https://lkml.kernel.org/r/20200430114004.17477-1-qais.yousef@arm.com
-
- Apr 24, 2020
-
-
Rafael J. Wysocki authored
Update the documentation of the driver flags for system-wide power management to reflect the current code flows and be more consistent. Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
Rafael J. Wysocki authored
Rename DPM_FLAG_LEAVE_SUSPENDED to DPM_FLAG_MAY_SKIP_RESUME which matches its purpose more closely. No functional impact. Suggested-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> # for I2C Acked-by:
Alan Stern <stern@rowland.harvard.edu> Acked-by:
Bjorn Helgaas <bhelgaas@google.com>
-