]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.6.5/extcon-palmas-fix-boot-up-state-of-vbus-when-using-gpio-detection.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.6.5 / extcon-palmas-fix-boot-up-state-of-vbus-when-using-gpio-detection.patch
1 From 62e6d1e59c77316768a663d1328390b4cd33801f Mon Sep 17 00:00:00 2001
2 From: Roger Quadros <rogerq@ti.com>
3 Date: Wed, 15 Jun 2016 11:12:05 +0300
4 Subject: extcon: palmas: Fix boot up state of VBUS when using GPIO detection
5
6 From: Roger Quadros <rogerq@ti.com>
7
8 commit 62e6d1e59c77316768a663d1328390b4cd33801f upstream.
9
10 If USB cable is connected prior to boot, we don't get any interrupts
11 so we must manually check the VBUS state and report it during probe.
12 If we don't do it then USB controller will never know that peripheral
13 cable was connected till the user unplugs and replugs the cable.
14
15 Fixes: b7aad8e2685b ("extcon: palmas: Add the support for VBUS detection by using GPIO")
16 Signed-off-by: Roger Quadros <rogerq@ti.com>
17 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20 ---
21 drivers/extcon/extcon-palmas.c | 2 ++
22 1 file changed, 2 insertions(+)
23
24 --- a/drivers/extcon/extcon-palmas.c
25 +++ b/drivers/extcon/extcon-palmas.c
26 @@ -360,6 +360,8 @@ static int palmas_usb_probe(struct platf
27
28 palmas_enable_irq(palmas_usb);
29 /* perform initial detection */
30 + if (palmas_usb->enable_gpio_vbus_detection)
31 + palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb);
32 palmas_gpio_id_detect(&palmas_usb->wq_detectid.work);
33 device_set_wakeup_capable(&pdev->dev, true);
34 return 0;