Merge "dumpstate: dump display PMIC registers" into qt-qpr1-dev am: d1da9e8dac
Change-Id: Ic91d2e6979ab207ffce440abbd0158c591d113a5
This commit is contained in:
@@ -129,6 +129,8 @@ ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
$(LOCAL_PATH)/init.hardware.ipa.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_PLATFORM).ipa.rc
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/init.hardware.power_debug.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_PLATFORM).power_debug.rc
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/init.hardware.userdebug.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_PLATFORM).userdebug.rc
|
||||
else
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/init.hardware.diag.rc.user:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).diag.rc
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "DumpstateDevice.h"
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/properties.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <cutils/properties.h>
|
||||
@@ -309,6 +310,30 @@ static void DumpDisplay(int fd) {
|
||||
DumpFileToFd(fd, "PANEL VENDOR NAME", "/sys/class/panel_info/panel0/panel_vendor_name");
|
||||
DumpFileToFd(fd, "PANEL SN", "/sys/class/panel_info/panel0/serial_number");
|
||||
DumpFileToFd(fd, "PANEL EXTRA INFO", "/sys/class/panel_info/panel0/panel_extinfo");
|
||||
|
||||
const std::string pmic_regmap_path = "/sys/kernel/debug/regmap/spmi0-05";
|
||||
using android::base::WriteStringToFile;
|
||||
|
||||
if (WriteStringToFile("0x80", pmic_regmap_path + "/count", true) &&
|
||||
WriteStringToFile("0xE000", pmic_regmap_path + "/address", true)) {
|
||||
DumpFileToFd(fd, "OLEDB Register Dump", pmic_regmap_path + "/data");
|
||||
} else {
|
||||
dprintf(fd, "Unable to print OLEDB Register Dump\n");
|
||||
}
|
||||
|
||||
if (WriteStringToFile("0x80", pmic_regmap_path + "/count", true) &&
|
||||
WriteStringToFile("0xDE00", pmic_regmap_path + "/address", true)) {
|
||||
DumpFileToFd(fd, "ELVDD Register Dump", pmic_regmap_path + "/data");
|
||||
} else {
|
||||
dprintf(fd, "Unable to print ELVDD Register Dump\n");
|
||||
}
|
||||
|
||||
if (WriteStringToFile("0x60", pmic_regmap_path + "/count", true) &&
|
||||
WriteStringToFile("0xDC00", pmic_regmap_path + "/address", true)) {
|
||||
DumpFileToFd(fd, "ELVSS Register Dump", pmic_regmap_path + "/data");
|
||||
} else {
|
||||
dprintf(fd, "Unable to print ELVSS Register Dump\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void DumpSensorLog(int fd) {
|
||||
|
||||
21
init.hardware.userdebug.rc.userdebug
Normal file
21
init.hardware.userdebug.rc.userdebug
Normal file
@@ -0,0 +1,21 @@
|
||||
#
|
||||
# Copyright (C) 2019 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
chown system system /sys/kernel/debug/regmap/spmi0-05/address
|
||||
chown system system /sys/kernel/debug/regmap/spmi0-05/count
|
||||
chown system system /sys/kernel/debug/regmap/spmi0-05/data
|
||||
|
||||
Reference in New Issue
Block a user