power: supply: qti_battery_charger: run usb_type_work during probe

Currently, updating USB type only depends on USB status change
notification from the charger firmware. During a reboot with USB
connected, there is a chance that a USB power supply notification would
have been sent by the charger firmware little earlier even before the
battery charger driver was ready to handle it. Hence it would've got
missed and USB type is not updated properly. Fix it by scheduling
usb_type_work once the driver probes.

Change-Id: I0ae482e90a76a0b2128fcc45561adb77a2ca017c
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
Fenglin Wu 2020-11-06 15:37:13 +08:00
commit 8faff2497b

View file

@ -1932,6 +1932,7 @@ static int battery_chg_probe(struct platform_device *pdev)
battery_chg_add_debugfs(bcdev);
battery_chg_notify_enable(bcdev);
device_init_wakeup(bcdev->dev, true);
schedule_work(&bcdev->usb_type_work);
return 0;
error: