power: pm8921-charger: Do not update "type" property of usb_psy

The userspace fails to detect the supply type as USB if "type"
property of usb_psy power-supply class is set to anything other
than USB at init. The driver ends up setting this to type
-UNKNOWN at bootup if there is no USB source present
-USB_DCP/ACA if a wall charger is present
This causes issues with displaying the charger source later on
since the USB path is not noted by the userspace. Moreover, the
userspace ignores the changes to the type property at runtime
making it futile for the driver to update it.

Use local driver data to store the usb type information
and use this to determine the supply-type. Keep the
usb_psy.type set to USB always.

CRs-Fixed: 451196
Change-Id: I69d6935826a05dd0310b960b4fd1735bc77ec67f
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
1 file changed