From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752808AbcFOGsD (ORCPT ); Wed, 15 Jun 2016 02:48:03 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:50672 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750976AbcFOGsA (ORCPT ); Wed, 15 Jun 2016 02:48:00 -0400 Subject: Re: [PATCH] extcon: palmas: Fix boot up state of VBUS when using GPIO detection To: Chanwoo Choi , References: <1465913075-30166-1-git-send-email-rogerq@ti.com> <5760B604.10407@samsung.com> CC: , , , , From: Roger Quadros Message-ID: <5760FA16.5070008@ti.com> Date: Wed, 15 Jun 2016 09:47:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <5760B604.10407@samsung.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/06/16 04:57, Chanwoo Choi wrote: > On 2016년 06월 14일 23:04, Roger Quadros wrote: >> 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") >> Signed-off-by: Roger Quadros >> --- >> 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; >> > > Applied it. Thanks. But this is a bug fix and must go in v4.7-rc as well as stable v4.6+. Can you please add Cc: stable@vger.kernel.org # v4.6+ -- cheers, -roger