PixelStat: Suez: Porting wireless charging

Wireless ptmc uevent is not supported,
replace it with reading file node

Bug: 171853251
Test: manually, do wirelees charge, check logcat

Signed-off-by: Denny cy Lee <dennycylee@google.com>
Change-Id: I8d4bbff09826fb76b0bce4321e9b5081a1487435
This commit is contained in:
Denny cy Lee 2021-06-08 17:19:41 +08:00 committed by TreeHugger Robot
parent 22484eb00d
commit f2227732cb

View file

@ -40,14 +40,14 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
.ImpedancePath = "/sys/devices/platform/audiometrics/speaker_impedance",
.CodecPath = "/sys/devices/platform/audiometrics/codec_state",
.EEPROMPath = "/dev/battery_history"};
const char *const kAudioUevent = "/devices/virtual/amcs/amcs";
const char *const kSSOCDetailsPath = "/sys/class/power_supply/battery/ssoc_details";
const struct UeventListener::UeventPaths ueventPaths = {
.AudioUevent = "/devices/virtual/amcs/amcs",
.WirelessChargerPtmcPath = "/sys/class/power_supply/wireless/device/ptmc_id"};
int main() {
LOG(INFO) << "starting PixelStats";
UeventListener ueventListener(kAudioUevent, kSSOCDetailsPath);
UeventListener ueventListener(ueventPaths);
std::thread listenThread(&UeventListener::ListenForever, &ueventListener);
listenThread.detach();