mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-10-13 00:00:48 +02:00
To further decouple and step away from using proprietary APIs between individual driver have the MSM OTG driver register its own USB power supply to allow any charger driver to subscribe to notifications for it and also use the power_supply_set_online and power_supply_set_present APIs to notfiy the driver of USB connections. For example the 8941 charger PMIC driver handles the USBIN_VALID interrupt and has to call power_supply_set_present to notify the OTG driver. This can now be done from virtually any driver that provides a supplicant power supply such as "battery" and provides the external_power_changed callback. Change-Id: I188d3177f200ab00a7080cd8a361c16728aa0f73 Signed-off-by: David Keitel <dkeitel@codeaurora.org>