Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751455Ab3IJMFS (ORCPT ); Tue, 10 Sep 2013 08:05:18 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:11564 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207Ab3IJMFR (ORCPT ); Tue, 10 Sep 2013 08:05:17 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 10 Sep 2013 05:02:14 -0700 Message-ID: <522F0FA3.4020206@nvidia.com> Date: Tue, 10 Sep 2013 17:55:07 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2 MIME-Version: 1.0 To: George Cherian CC: "linux-kernel@vger.kernel.org" , "myungjoo.ham@samsung.com" , "cw00.choi@samsung.com" , "kishon@ti.com" Subject: Re: [PATCH] extcon: palmas: Dont set USB state if ID pin is grounded References: <1378799369-15803-1-git-send-email-george.cherian@ti.com> <522EE3B9.4020807@nvidia.com> <522F0946.9040104@ti.com> In-Reply-To: <522F0946.9040104@ti.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1814 Lines: 46 On Tuesday 10 September 2013 05:27 PM, George Cherian wrote: > On 9/10/2013 2:47 PM, Laxman Dewangan wrote: >> On Tuesday 10 September 2013 01:19 PM, George Cherian wrote: >>> In OMAP5 when USB-HOST is set true, the VBUS regulator is turned ON. >>> This causes a VBUS interrupt, ignore the same if we are already in >>> USB-HOST. >>> >>> Signed-off-by: George Cherian >>> --- >>> drivers/extcon/extcon-palmas.c | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/drivers/extcon/extcon-palmas.c >>> b/drivers/extcon/extcon-palmas.c >>> index 9672f31..91b31af 100644 >>> --- a/drivers/extcon/extcon-palmas.c >>> +++ b/drivers/extcon/extcon-palmas.c >>> @@ -50,6 +50,9 @@ static irqreturn_t palmas_vbus_irq_handler(int irq, >>> void *_palmas_usb) >>> struct palmas_usb *palmas_usb = _palmas_usb; >>> unsigned int vbus_line_state; >>> + if (palmas_usb->linkstat == PALMAS_USB_STATE_ID) >>> + return IRQ_HANDLED; >>> + >> Should we really handle this on this extcon driver? I think it should >> be handled in the USB driver. If port is OTG type and if usb driver >> enable the VBUS then it can expect the VBUS available notification but >> based on the USB driver state, it should ignore this notification. >> > Correct extcon should just notify and the consumer should take > appropriate decision. Thanks, so our code design is same as yours and so we will not need this patch. >> Otherwise, Palmas pin find that there is VBUS state true but the SW >> status will show as the VBUS not there. >> > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/