ACPI / DPTF: Add additional attributes to power participant driver
PATCH 1/1 ACPI / DPTF: Add additional attributes to power participant driver
Add two additional attributes to the existing power participant driver:rest_of_platform_power_mw: (RO) Shows the rest of worst case platform power in mW. This will help in power distribution to SoC and rest of the system. For example on a test system, this value is 2.5W with a 15W TDP SoC. Based on the adapter rating (adapter_rating_mw), user space software can decide on proper power allocation to SoC to improve short term performance via powercap/RAPL interface.
prochot_confirm: (WO) Confirm EC about a prochot notification.
Also userspace is notified via sysfs_notify(), whenever power source or rest of the platform power is changed. So user space can use poll() system call on those attributes.
The ACPI methods used in this patch are as follows:
PROP
This object evaluates to the rest of worst case platform power in mW. Bits:
23:0 Worst case rest of platform power in mW.
PBOK
PBOK is a method designed to provide a mechanism for OSPM to change power setting before EC can de-assert a PROCHOT from a device. The EC may receive several PROCHOTs, so it has a sequence number attached to PSRC (read via existing attribute "platform_power_source"). Once OSPM takes action for a PSRC change notification, it can call PBOK method to confirm with the sequence number.
Bits:
3:0 Power Delivery State Change Sequence number
30 Reserved
31 0 – Not OK to de-assert PROCHOT
1 – OK to de-assert PROCHOT
PSRC (Platform Power Source): Not new in this patch but for documentation for new bits
This object evaluates to an integer that represents the system power source as well as the power delivery state change sequence number. Bits:
3:0 The current power source as an integer for AC, DC, USB, Wireless. 0 = DC, 1 = AC, 2 = USB, 3 = Wireless Charging
7:4 Power Delivery State Change Sequence Number. Default value is 0
Notifications:0x81: (Power State Change) Used to notify when the power source has changed.0x84: (PROP change) Used to notify when the platform rest of power has changed.
---
Changes:
Updated the commit description for rest of the platform power.
Documentation/ABI/testing/sysfs-platform-dptf | 24 +++++-- drivers/acpi/dptf/dptf_power.c | 69 ++++++++++++++++++- 2 files changed, 88 insertions(+), 5 deletions(-)
Documentation/ABI/testing/sysfs-platform-dptf +20 -4
@@ -27,10 +27,12 @@ KernelVersion: v4.10 Contact: [email protected] Description: (RO) Display the platform power source - 0x00 = DC - 0x01 = AC - 0x02 = USB - 0x03 = Wireless Charger + bits[3:0] Current power source + 0x00 = DC + 0x01 = AC + 0x02 = USB + 0x03 = Wireless Charger + bits[7:4] Power source sequence number What: /sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power Date: Jul, 2016
@@ -38,3 +40,17 @@ KernelVersion: v4.10 Contact: [email protected] Description: (RO) The maximum sustained power for battery in milliwatts. + +What: /sys/bus/platform/devices/INT3407:00/dptf_power/rest_of_platform_power_mw +Date: June, 2020 +KernelVersion: v5.8 +Contact: [email protected] +Description: + (RO) Shows the rest of worst case platform power in mW. + +What: /sys/bus/platform/devices/INT3407:00/dptf_power/prochot_confirm +Date: June, 2020 +KernelVersion: v5.8 +Contact: [email protected] +Description: + (WO) Confirm embedded controller about a prochot notification.
drivers/acpi/dptf/dptf_power.c +68 -1
115 lines not on this page · raw message
Signature · 1 line
2.25.4
Rafael J. Wysocki
maintainerQuoted 8 lines · Srinivas Pandruvada
Add two additional attributes to the existing power participant driver:
rest_of_platform_power_mw: (RO) Shows the rest of worst case platform power in mW. This will help in power distribution to SoC and rest of the system. For example on a test system, this value is 2.5W with a 15W TDP SoC. Based on the adapter rating (adapter_rating_mw), user space software can decide on proper power allocation to SoC to improve short term performance via powercap/RAPL interface.
OK, so "the rest" here means "that part outside of the SoC" IIUC.
So it would be good to spell this out in the description of the attribute in the ABI documentation.