Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index 0a4b2f0e47348b60bffdc9a74536c980113aa9a5..ea86e6d90176beddca6f2f5c7217635793a09f72 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -78,6 +78,20 @@ CONTROL_USB_CHARGING_COMMANDS = [ |
'disable_command': |
'echo 1 > /sys/module/pm8921_charger/parameters/disabled', |
}, |
+ { |
+ # Nexus 5 |
+ # Setting the HIZ bit of the bq24192 causes the charger to actually ignore |
pasko
2014/10/14 09:16:22
Wow! Cool! How do I discover similar things for ne
|
+ # energy coming from USB. Setting the power_supply offline just updates the |
+ # Android system to reflect that. |
+ 'witness_file': '/sys/kernel/debug/bq24192/INPUT_SRC_CONT', |
+ 'enable_command': ( |
+ 'echo 0x4A > /sys/kernel/debug/bq24192/INPUT_SRC_CONT && ' |
+ 'echo 1 > /sys/class/power_supply/usb/online'), |
+ 'disable_command': ( |
+ 'echo 0xCA > /sys/kernel/debug/bq24192/INPUT_SRC_CONT && ' |
+ 'chmod 644 /sys/class/power_supply/usb/online && ' |
+ 'echo 0 > /sys/class/power_supply/usb/online'), |
+ }, |
] |
class DeviceTempFile(object): |