Snap for 8650624 from 8d40c208a3
to udc-release
Change-Id: I8fe4bf45dea680361af41b391a5f8e3284d11345
This commit is contained in:
commit
adcf322f09
4 changed files with 30 additions and 52 deletions
|
@ -987,10 +987,19 @@ on property:vendor.thermal.link_ready=1
|
||||||
chown system system /dev/thermal/cdev-by-name/wlc_fcc/cur_state
|
chown system system /dev/thermal/cdev-by-name/wlc_fcc/cur_state
|
||||||
chown system system /dev/thermal/cdev-by-name/usbc-port/cur_state
|
chown system system /dev/thermal/cdev-by-name/usbc-port/cur_state
|
||||||
|
|
||||||
|
# Create thermal symlink in off charging mode
|
||||||
on charger
|
on charger
|
||||||
|
mkdir /dev/thermal 0750 system system
|
||||||
|
mkdir /dev/thermal/tz-by-name 0750 system system
|
||||||
|
mkdir /dev/thermal/cdev-by-name 0750 system system
|
||||||
|
start vendor.thermal.symlinks
|
||||||
write /proc/vendor_sched/sys_uclamp_min 0
|
write /proc/vendor_sched/sys_uclamp_min 0
|
||||||
write /proc/vendor_sched/sys_prefer_idle 0
|
write /proc/vendor_sched/sys_prefer_idle 0
|
||||||
|
|
||||||
|
# Launch thermal hal in off charging mode
|
||||||
|
on charger && property:vendor.thermal.link_ready=1
|
||||||
|
start vendor.thermal-hal-2-0
|
||||||
|
|
||||||
on property:vendor.disable.bcl.control=1
|
on property:vendor.disable.bcl.control=1
|
||||||
write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 0
|
write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 0
|
||||||
|
|
||||||
|
|
|
@ -75,15 +75,6 @@
|
||||||
],
|
],
|
||||||
"ResetOnInit": true
|
"ResetOnInit": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Name": "F2fsRecessModeEnable",
|
|
||||||
"Path": "/dev/sys/fs/by-name/userdata/gc_urgent",
|
|
||||||
"Values": [
|
|
||||||
"2",
|
|
||||||
"0"
|
|
||||||
],
|
|
||||||
"ResetOnInit": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Name": "PowerHALRenderingState",
|
"Name": "PowerHALRenderingState",
|
||||||
"Path": "vendor.powerhal.rendering",
|
"Path": "vendor.powerhal.rendering",
|
||||||
|
@ -184,12 +175,6 @@
|
||||||
"Duration": 200,
|
"Duration": 200,
|
||||||
"Value": "0"
|
"Value": "0"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"PowerHint": "DEVICE_IDLE",
|
|
||||||
"Node": "F2fsRecessModeEnable",
|
|
||||||
"Duration": 0,
|
|
||||||
"Value": "2"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"PowerHint": "LAUNCH",
|
"PowerHint": "LAUNCH",
|
||||||
"Type": "EndHint",
|
"Type": "EndHint",
|
||||||
|
@ -231,12 +216,6 @@
|
||||||
"Duration": 5000,
|
"Duration": 5000,
|
||||||
"Value": "0"
|
"Value": "0"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"PowerHint": "DISPLAY_INACTIVE",
|
|
||||||
"Node": "F2fsRecessModeEnable",
|
|
||||||
"Duration": 0,
|
|
||||||
"Value": "2"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"PowerHint": "CAMERA_LAUNCH",
|
"PowerHint": "CAMERA_LAUNCH",
|
||||||
"Node": "CPUBigClusterMaxFreq",
|
"Node": "CPUBigClusterMaxFreq",
|
||||||
|
|
|
@ -95,15 +95,6 @@
|
||||||
],
|
],
|
||||||
"ResetOnInit": true
|
"ResetOnInit": true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"Name": "F2fsRecessModeEnable",
|
|
||||||
"Path": "/dev/sys/fs/by-name/userdata/gc_urgent",
|
|
||||||
"Values": [
|
|
||||||
"2",
|
|
||||||
"0"
|
|
||||||
],
|
|
||||||
"ResetOnInit": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Name": "LimitFlashCurrent",
|
"Name": "LimitFlashCurrent",
|
||||||
"Path": "vendor.camera.max_flash_current",
|
"Path": "vendor.camera.max_flash_current",
|
||||||
|
@ -214,12 +205,6 @@
|
||||||
"Duration": 200,
|
"Duration": 200,
|
||||||
"Value": "0"
|
"Value": "0"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"PowerHint": "DEVICE_IDLE",
|
|
||||||
"Node": "F2fsRecessModeEnable",
|
|
||||||
"Duration": 0,
|
|
||||||
"Value": "2"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"PowerHint": "LAUNCH",
|
"PowerHint": "LAUNCH",
|
||||||
"Type": "EndHint",
|
"Type": "EndHint",
|
||||||
|
@ -261,12 +246,6 @@
|
||||||
"Duration": 5000,
|
"Duration": 5000,
|
||||||
"Value": "0"
|
"Value": "0"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"PowerHint": "DISPLAY_INACTIVE",
|
|
||||||
"Node": "F2fsRecessModeEnable",
|
|
||||||
"Duration": 0,
|
|
||||||
"Value": "2"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"PowerHint": "CAMERA_LAUNCH",
|
"PowerHint": "CAMERA_LAUNCH",
|
||||||
"Node": "CPUBigClusterMaxFreq",
|
"Node": "CPUBigClusterMaxFreq",
|
||||||
|
|
|
@ -83,23 +83,39 @@ ScopedAStatus Usb::enableUsbData(const string& in_portName, bool in_enable,
|
||||||
int64_t in_transactionId) {
|
int64_t in_transactionId) {
|
||||||
bool result = true;
|
bool result = true;
|
||||||
std::vector<PortStatus> currentPortStatus;
|
std::vector<PortStatus> currentPortStatus;
|
||||||
|
string pullup;
|
||||||
|
|
||||||
ALOGI("Userspace turn %s USB data signaling. opID:%ld", in_enable ? "on" : "off",
|
ALOGI("Userspace turn %s USB data signaling. opID:%ld", in_enable ? "on" : "off",
|
||||||
in_transactionId);
|
in_transactionId);
|
||||||
|
|
||||||
if (in_enable) {
|
if (in_enable) {
|
||||||
if (!mUsbDataEnabled) {
|
if (!mUsbDataEnabled) {
|
||||||
|
if (ReadFileToString(PULLUP_PATH, &pullup)) {
|
||||||
|
pullup = Trim(pullup);
|
||||||
|
if (pullup != kGadgetName) {
|
||||||
|
if (!WriteStringToFile(kGadgetName, PULLUP_PATH)) {
|
||||||
|
ALOGE("Gadget cannot be pulled up");
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!WriteStringToFile("1", USB_DATA_PATH)) {
|
if (!WriteStringToFile("1", USB_DATA_PATH)) {
|
||||||
ALOGE("Not able to turn on usb connection notification");
|
ALOGE("Not able to turn on usb connection notification");
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WriteStringToFile(kGadgetName, PULLUP_PATH)) {
|
|
||||||
ALOGE("Gadget cannot be pulled up");
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (ReadFileToString(PULLUP_PATH, &pullup)) {
|
||||||
|
pullup = Trim(pullup);
|
||||||
|
if (pullup == kGadgetName) {
|
||||||
|
if (!WriteStringToFile("none", PULLUP_PATH)) {
|
||||||
|
ALOGE("Gadget cannot be pulled down");
|
||||||
|
result = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!WriteStringToFile("1", ID_PATH)) {
|
if (!WriteStringToFile("1", ID_PATH)) {
|
||||||
ALOGE("Not able to turn off host mode");
|
ALOGE("Not able to turn off host mode");
|
||||||
result = false;
|
result = false;
|
||||||
|
@ -114,11 +130,6 @@ ScopedAStatus Usb::enableUsbData(const string& in_portName, bool in_enable,
|
||||||
ALOGE("Not able to turn on usb connection notification");
|
ALOGE("Not able to turn on usb connection notification");
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WriteStringToFile("none", PULLUP_PATH)) {
|
|
||||||
ALOGE("Gadget cannot be pulled down");
|
|
||||||
result = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue