stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extcon: palmas: Fix boot up state of VBUS when using GPIO detection
       [not found] <1465913075-30166-1-git-send-email-rogerq@ti.com>
@ 2016-06-15  8:12 ` Roger Quadros
  0 siblings, 0 replies; only message in thread
From: Roger Quadros @ 2016-06-15  8:12 UTC (permalink / raw)
  To: myungjoo.ham, cw00.choi
  Cc: balbi, nm, grygorii.strashko, linux-kernel, linux-omap, rogerq,
	stable

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 # v4.6+
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/extcon/extcon-palmas.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 8b3226d..caff46c 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;
-- 
2.7.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-15  8:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1465913075-30166-1-git-send-email-rogerq@ti.com>
2016-06-15  8:12 ` [PATCH] extcon: palmas: Fix boot up state of VBUS when using GPIO detection Roger Quadros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).