Merge "powerstats: introduce Modem PCIe GEN state residency" into 24D1-dev
This commit is contained in:
commit
ef5be6ef04
1 changed files with 18 additions and 0 deletions
|
@ -475,6 +475,24 @@ void addPCIe(std::shared_ptr<PowerStats> p) {
|
||||||
|
|
||||||
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
|
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
|
||||||
"/sys/devices/platform/13120000.pcie/power_stats", pcieWifiCfgs));
|
"/sys/devices/platform/13120000.pcie/power_stats", pcieWifiCfgs));
|
||||||
|
|
||||||
|
// Add PCIe Modem GEN
|
||||||
|
const GenericStateResidencyDataProvider::StateResidencyConfig modemGenStateConfig = {
|
||||||
|
.entryCountSupported = true,
|
||||||
|
.entryCountPrefix = "count:",
|
||||||
|
.totalTimeSupported = true,
|
||||||
|
.totalTimePrefix = "duration msec:",
|
||||||
|
};
|
||||||
|
const std::vector<std::pair<std::string, std::string>> modemGenStateHeaders = {
|
||||||
|
std::make_pair("GEN1", "Gen1:"),
|
||||||
|
std::make_pair("GEN3", "Gen3:"),
|
||||||
|
};
|
||||||
|
const std::vector<GenericStateResidencyDataProvider::PowerEntityConfig> modemGenCfgs = {
|
||||||
|
{generateGenericStateResidencyConfigs(modemGenStateConfig, modemGenStateHeaders),
|
||||||
|
"PCIe-Modem-GEN", "link_speed:"}
|
||||||
|
};
|
||||||
|
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
|
||||||
|
"/sys/devices/platform/12100000.pcie/link_duration", modemGenCfgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void addWifi(std::shared_ptr<PowerStats> p) {
|
void addWifi(std::shared_ptr<PowerStats> p) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue