• spiiroin's avatar
    [battery-udev] Enablers for configurable charger types. JB#49693 · d387d08c
    spiiroin authored
    For example pinephone exposes charger devices in a manner where the
    name is prefixed with chiptype (e.g. "axp813-ac" / "axp20x-usb").
    As mce does not recognize these, both wall charger and pc connection
    gets treated as "other" type charger - which works to some extent but
    triggers incorrect UI actions.
    
    If direct match for power supply device type / name is not found, try
    to eliminate chipname prefix so that for example names such as
    "axp20x-usb" get treated as plain "usb".
    
    To future proof things, make it possible to override build-in
    defaults and heuristics via mce configuration files.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    d387d08c
datapipe.c 78.7 KB