I want to add my own battery status to UPower. My google-fu is lacking. Most of the results give me info about reading the battery status, but I want to add my own.
I found some dbus examples here: https://github.com/Louisvdw/dbus-serialbattery/blob/master/etc/dbus-serialbattery/dbushelper.py
But that one doesn't seem like it publishes to UPower. Any pointers into the right direction?
#[SOLVED] Adding a battery to dbus/upower
5 messages · Page 1 of 1 (latest)
Or do I need to get data in /sys/class/power_supply/BAT1? 
Those /sys entries are created by code calling "power_supply_register".
Found it:
https://docs.huihoo.com/doxygen/linux/kernel/3.7/include_2linux_2power__supply_8h.html
power_supply_register()
Someone helped me find this:
https://github.com/torvalds/linux/blob/master/drivers/power/supply/generic-adc-battery.c