Skip to content

Instantly share code, notes, and snippets.

@xkr47
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xkr47/63f9bef333459c3773f1 to your computer and use it in GitHub Desktop.
Save xkr47/63f9bef333459c3773f1 to your computer and use it in GitHub Desktop.
Jolla phone: Different usb power states
# NOTE: In order to change state, you need to run all three commands for the wanted state
# in given order to get the desired effect
# Charge battery, and use usb power to power phone (default state after powering up the phone)
chmod u+w /sys/class/power_supply/usb/charger_disable
echo 0 > /sys/module/pm8921_charger/parameters/disabled
echo 0 > /sys/class/power_supply/usb/charger_disable
# don't charge battery, but use usb power to power phone
chmod u+w /sys/class/power_supply/usb/charger_disable
echo 1 > /sys/module/pm8921_charger/parameters/disabled
echo 0 > /sys/class/power_supply/usb/charger_disable
# don't charge battery, and don't use usb power to power phone (as if cable disconnected)
chmod u+w /sys/class/power_supply/usb/charger_disable
echo 1 > /sys/module/pm8921_charger/parameters/disabled
echo 1 > /sys/class/power_supply/usb/charger_disable
@xkr47
Copy link
Author

xkr47 commented Jun 15, 2015

my theory how it might be logically set up in the hardware: http://xkr47.outerspace.dyndns.org/tmp/jolla-usb-power-theory3.png

@xkr47
Copy link
Author

xkr47 commented Jun 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment