Letux Kernel

Power

Table of Content

How to control battery and charging

Read status of USB power and DC-In power

in general:

cat /sys/class/power_supply/*/*

read status of usb power

cat /sys/class/power_supply/twl4030_usb/*

Read status of dumb battery (e.g. BL-6C)

cat /sys/class/power_supply/gta04-battery/*

Read status of BQ27000 based battery

Note: On mainline (status <= 4.21), omap_hdq does not work properly if power state of the soc is too low.

cat /sys/class/power_supply/bq27000-battery/*