Snap for 8429531 from 79fa7f99b9
to tm-qpr1-release
Change-Id: Id660684d390916b250d54b33f5dc0466fa8a5534
This commit is contained in:
commit
7334e2cf55
6 changed files with 129 additions and 6 deletions
|
@ -413,6 +413,15 @@
|
|||
"1"
|
||||
],
|
||||
"DefaultIndex": 0
|
||||
},
|
||||
{
|
||||
"Name": "PMU_POLL",
|
||||
"Path": "/proc/vendor_sched/pmu_poll_enable",
|
||||
"Values": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"DefaultIndex": 0
|
||||
}
|
||||
],
|
||||
"Actions": [
|
||||
|
@ -1267,6 +1276,12 @@
|
|||
"Duration": 0,
|
||||
"Value": "400000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_SEVERE",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_SEVERE",
|
||||
"Node": "BigControlTempSet",
|
||||
|
@ -1375,6 +1390,12 @@
|
|||
"Duration": 1000,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY",
|
||||
"Node": "CPU_LITTLE_TSKIN_BYPASS",
|
||||
|
@ -1458,6 +1479,12 @@
|
|||
"Node": "RestrictedCpuset",
|
||||
"Duration": 0,
|
||||
"Value": "0-3"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -414,6 +414,15 @@
|
|||
"1"
|
||||
],
|
||||
"DefaultIndex": 0
|
||||
},
|
||||
{
|
||||
"Name": "PMU_POLL",
|
||||
"Path": "/proc/vendor_sched/pmu_poll_enable",
|
||||
"Values": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"DefaultIndex": 0
|
||||
}
|
||||
],
|
||||
"Actions": [
|
||||
|
@ -1284,6 +1293,12 @@
|
|||
"Duration": 0,
|
||||
"Value": "400000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_SEVERE",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_SEVERE",
|
||||
"Node": "BigControlTempSet",
|
||||
|
@ -1392,6 +1407,12 @@
|
|||
"Duration": 1000,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY",
|
||||
"Node": "CPU_LITTLE_TSKIN_BYPASS",
|
||||
|
@ -1475,6 +1496,12 @@
|
|||
"Node": "RestrictedCpuset",
|
||||
"Duration": 0,
|
||||
"Value": "0-3"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -379,6 +379,15 @@
|
|||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": false
|
||||
},
|
||||
{
|
||||
"Name": "PMU_POLL",
|
||||
"Path": "/proc/vendor_sched/pmu_poll_enable",
|
||||
"Values": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"DefaultIndex": 0
|
||||
}
|
||||
],
|
||||
"Actions": [
|
||||
|
@ -1301,6 +1310,12 @@
|
|||
"Duration": 0,
|
||||
"Value": "400000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_SEVERE",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_SEVERE",
|
||||
"Node": "BigControlTempSet",
|
||||
|
@ -1378,6 +1393,18 @@
|
|||
"Node": "MLUclampBoost",
|
||||
"Duration": 2000,
|
||||
"Value": "512"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_VIRTUAL-SKIN_LIGHT",
|
||||
"Node": "PMU_POLL",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <log/log.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider;
|
||||
using aidl::android::hardware::power::stats::EnergyConsumerType;
|
||||
|
@ -75,6 +76,8 @@ void addDisplay(std::shared_ptr<PowerStats> p) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
struct stat buffer;
|
||||
|
||||
LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting.";
|
||||
|
||||
// single thread
|
||||
|
@ -84,8 +87,19 @@ int main() {
|
|||
|
||||
addGs101CommonDataProviders(p);
|
||||
addDisplay(p);
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats");
|
||||
|
||||
if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats");
|
||||
} else {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-8/i2c-st21nfc/power_stats");
|
||||
}
|
||||
const std::string instance = std::string() + PowerStats::descriptor + "/default";
|
||||
binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());
|
||||
LOG_ALWAYS_FATAL_IF(status != STATUS_OK);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <log/log.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider;
|
||||
using aidl::android::hardware::power::stats::EnergyConsumerType;
|
||||
|
@ -117,6 +118,8 @@ void addUwb(std::shared_ptr<PowerStats> p) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
struct stat buffer;
|
||||
|
||||
LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting.";
|
||||
|
||||
// single thread
|
||||
|
@ -126,9 +129,19 @@ int main() {
|
|||
|
||||
addGs101CommonDataProviders(p);
|
||||
addDisplay(p);
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats");
|
||||
addUwb(p);
|
||||
|
||||
if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats");
|
||||
} else {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-8/i2c-st21nfc/power_stats");
|
||||
}
|
||||
const std::string instance = std::string() + PowerStats::descriptor + "/default";
|
||||
binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());
|
||||
LOG_ALWAYS_FATAL_IF(status != STATUS_OK);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <log/log.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider;
|
||||
using aidl::android::hardware::power::stats::EnergyConsumerType;
|
||||
|
@ -58,6 +59,8 @@ void addDisplay(std::shared_ptr<PowerStats> p) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
struct stat buffer;
|
||||
|
||||
LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting.";
|
||||
|
||||
// single thread
|
||||
|
@ -67,7 +70,19 @@ int main() {
|
|||
|
||||
addGs101CommonDataProviders(p);
|
||||
addDisplay(p);
|
||||
|
||||
if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-3/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-4/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-5/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-6/i2c-st21nfc/power_stats");
|
||||
} else if (!stat("/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats", &buffer)) {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-7/i2c-st21nfc/power_stats");
|
||||
} else {
|
||||
addNFC(p, "/sys/devices/platform/10960000.hsi2c/i2c-8/i2c-st21nfc/power_stats");
|
||||
}
|
||||
const std::string instance = std::string() + PowerStats::descriptor + "/default";
|
||||
binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());
|
||||
LOG_ALWAYS_FATAL_IF(status != STATUS_OK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue