• spiiroin's avatar
    [power-udev] Expect POWER_SUPPLY_REAL_TYPE udev property. JB#38667 · fac9bcca
    spiiroin authored
    On devices like Xperia 10 statefs fails to report charger type which
    then leads to issues situations where one needs to differentiate
    between for example wall chargers and other kinds of chargers. This
    happens due to kernel/udev reporting two device type properties:
      POWER_SUPPLY_TYPE=USB_PD
      POWER_SUPPLY_REAL_TYPE=USB_HVDCP
    of which REAL_TYPE has the content statefs expects to see in TYPE.
    
    When POWER_SUPPLY_REAL_TYPE property is defined, use it instead of
    POWER_SUPPLY_TYPE.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    fac9bcca