mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
extcon: palmas: Fix boot up state of VBUS when using GPIO detection
If USB cable is connected prior to boot, we don't get any interrupts
so we must manually check the VBUS state and report it during probe.
If we don't do it then USB controller will never know that peripheral
cable was connected till the user unplugs and replugs the cable.
Fixes: b7aad8e268 ("extcon: palmas: Add the support for VBUS detection by using GPIO")
Cc: [email protected]
Signed-off-by: Roger Quadros <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
This commit is contained in:
parent
af8c34ce6a
commit
62e6d1e59c
1 changed files with 2 additions and 0 deletions
|
|
@ -360,6 +360,8 @@ static int palmas_usb_probe(struct platform_device *pdev)
|
|||
|
||||
palmas_enable_irq(palmas_usb);
|
||||
/* perform initial detection */
|
||||
if (palmas_usb->enable_gpio_vbus_detection)
|
||||
palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb);
|
||||
palmas_gpio_id_detect(&palmas_usb->wq_detectid.work);
|
||||
device_set_wakeup_capable(&pdev->dev, true);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue