Lines Matching full:cap

17 constexpr auto PCAP_INTERFACE = "xyz.openbmc_project.Control.Power.Cap";
39 // Saves the power cap data in the filesystem.
65 // Loads the power cap data from the filesystem
106 // Build the hwmon string to write the power cap bounds in updatePcapBounds()
116 // Read the power cap bounds from sysfs files (from OCC) in updatePcapBounds()
117 uint64_t cap; in updatePcapBounds() local
122 softMinFile >> cap; in updatePcapBounds()
125 capSoftMin = ((cap / (PS_DERATING_FACTOR / 100.0) / 1000000) + 0.9); in updatePcapBounds()
138 minFile >> cap; in updatePcapBounds()
141 capHardMin = ((cap / (PS_DERATING_FACTOR / 100.0) / 1000000) + 0.9); in updatePcapBounds()
154 maxFile >> cap; in updatePcapBounds()
157 capMax = cap / (PS_DERATING_FACTOR / 100.0) / 1000000; in updatePcapBounds()
169 // Save the power cap bounds to dbus in updatePcapBounds()
174 // Validate user power cap (if enabled) is within the bounds in updatePcapBounds()
185 // User power cap is enabled, but does not match dbus in updatePcapBounds()
195 // User power cap is outside of current bounds in updatePcapBounds()
202 "updatePcapBounds: user powercap {CAP}W is outside bounds " in updatePcapBounds()
204 "CAP", dbusUserCap, "SMIN", capSoftMin, "MIN", capHardMin, in updatePcapBounds()
226 // Get value of power cap to send to the OCC (output/DC power)
298 lg2::error("Power Cap base filename not found: {FILE}", "FILE", in getPcapFilename()
306 // Write the user power cap to sysfs (output/DC power)
307 // This will trigger the driver to send the cap to the OCC
316 // Build the hwmon string to write the user power cap in writeOcc()
320 lg2::error("Could not find a power cap file to write to: {FILE})", in writeOcc()
329 // Open the hwmon file and write the power cap in writeOcc()
333 lg2::info("Writing {CAP}uW to {FILE}", "CAP", pcapString, "FILE", in writeOcc()
340 lg2::error("Failed writing {CAP}uW to {FILE} (errno={ERR})", "CAP", in writeOcc()
347 // Read the current user power cap from sysfs as input/AC power
352 // Get the sysfs filename for the user power cap in readUserCapHwmon()
357 "readUserCapHwmon: Could not find a power cap file to read: {FILE})", in readUserCapHwmon()
362 // Open the sysfs file and read the power cap in readUserCapHwmon()
366 uint64_t cap; in readUserCapHwmon() local
367 file >> cap; in readUserCapHwmon()
370 userCap = (cap / (PS_DERATING_FACTOR / 100.0) / 1000000); in readUserCapHwmon()
415 "pcapChanged: Unknown power cap property changed {PROP} to {VAL}", in pcapChanged()
420 // Validate the cap is within supported range in pcapChanged()
426 …"pcapChanged: Power cap of {CAP}W is lower than allowed (soft min:{SMIN}, min:{MIN}) - using soft … in pcapChanged()
427 "CAP", pcap, "SMIN", capSoftMin, "MIN", capHardMin); in pcapChanged()
434 "pcapChanged: Power cap of {CAP}W is higher than allowed (max:{MAX}) - using max", in pcapChanged()
435 "CAP", pcap, "MAX", capMax); in pcapChanged()
443 "Power Cap Property Change (cap={CAP}W (input), enabled={ENABLE})", in pcapChanged()
444 "CAP", pcap, "ENABLE", pcapEnabled); in pcapChanged()
455 // Update the Power Cap bounds on DBus