aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2016-06-15 11:12:05 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2016-06-15 17:17:22 +0900
commit62e6d1e59c77316768a663d1328390b4cd33801f (patch)
tree75aa6cb0cf756484b8516b01e8a1200606a60fe6 /drivers/extcon
parentLinux 4.7-rc2 (diff)
downloadlinux-dev-62e6d1e59c77316768a663d1328390b4cd33801f.tar.xz
linux-dev-62e6d1e59c77316768a663d1328390b4cd33801f.zip
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: b7aad8e2685b ("extcon: palmas: Add the support for VBUS detection by using GPIO") Cc: stable@vger.kernel.org Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-palmas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 8b3226dca1d9..caff46c0e214 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -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;