From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751696AbbCTHp5 (ORCPT ); Fri, 20 Mar 2015 03:45:57 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:42126 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750969AbbCTHpw (ORCPT ); Fri, 20 Mar 2015 03:45:52 -0400 X-AuditID: cbfee690-f79ab6d0000046f7-99-550bd02d947f Message-id: <550BD02D.7050804@samsung.com> Date: Fri, 20 Mar 2015 16:45:49 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-version: 1.0 To: Robert Baldyga Cc: Chanwoo Choi , Roger Quadros , George Cherian , Felipe Balbi , Greg KH , "myungjoo.ham@samsung.com" , linux-usb@vger.kernel.org, linux-kernel , Marek Szyprowski , =?UTF-8?B?xYF1a2FzeiBTdGVsbWFjaA==?= Subject: Re: [RFC 01/19] extcon: add extcon-odroid-usbotg driver References: <1426687464-2563-1-git-send-email-r.baldyga@samsung.com> <1426687464-2563-2-git-send-email-r.baldyga@samsung.com> <550ABBE5.6040908@samsung.com> <550AE11D.30207@ti.com> <550BCB67.7090702@samsung.com> In-reply-to: <550BCB67.7090702@samsung.com> Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCIsWRmVeSWpSXmKPExsWyRsSkRFf3AneowY6t2hYH79dbPDuqbfFx 3k52i+bF69ksbh5awWhxedccNotFy1qZLdYeuctucbtxBZvFg8NAJT2PtBy4PXbOusvusX/u GnaPvi2rGD2O39jO5PF5k1wAaxSXTUpqTmZZapG+XQJXRvu8ZsaCF/IV3/58Ymtg3CvZxcjJ ISFgIjFn21JmCFtM4sK99WxdjFwcQgJLGSXWzZrN1MXIAVZ0rTMGIr6IUeLJolZWCOc1o0TP kml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d70fxLINzBKf/y9iAYlzCmhLrL4eDtLL LKAuMWneImYIW15i85q3zBMYBWYhWTELSdksJGULGJlXMYqmFiQXFCel5xrpFSfmFpfmpesl 5+duYgTH/TPpHYyrGiwOMQpwMCrx8B4o5Q4VYk0sK67MPcQowcGsJMLrsQkoxJuSWFmVWpQf X1Sak1p8iNEUGAITmaVEk/OBKSmvJN7Q2MTMyNLI3NDCyNhcSZxXyb4tREggPbEkNTs1tSC1 CKaPiYNTqoGRfW7OyjpLsX8hEvrO1Rns/925pzD90vj8bKGqcahd5RUb0cwZlq5aQUsN49ZO e8NbcEfjuZS7lfVucYb14h/4N8S+vrazezJDZVLTpQuGCkvnqvcXr32Y9tbs65QPT5waOOou XVEv/tnTMjuohqFHwOzqFfMZ9gvF8/MTOCx2Pwo9JfFw+w4lluKMREMt5qLiRACqF0HHEQMA AA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Robert, On 03/20/2015 04:25 PM, Robert Baldyga wrote: > Hi Chanwoo, > > On 03/19/2015 09:50 PM, Chanwoo Choi wrote: >> Hi Roger, >> >> On Thu, Mar 19, 2015 at 11:45 PM, Roger Quadros wrote: >>> On 19/03/15 14:19, George Cherian wrote: >>>> Hi Robert, >>>> >>>> +Roger >>>> On Thu, Mar 19, 2015 at 5:37 PM, Robert Baldyga wrote: >>>>> Hi George, >>>>> >>>>> On 03/19/2015 09:50 AM, George Cherian wrote: >>>>>> Hi Robert, >>>>>> >>>>>> This looks like a extcon driver based on gpio for USB. >>>>>> >>>>>> Roger posted a generic one a while back. >>>>>> https://lkml.org/lkml/2015/2/2/187 >>>>>> >>>>>> Doesn't this serve the purpose rather than adding this driver? >>>>> >>>>> Roger's driver doesn't support VBUS state detection so it cannot handle >>>> I feel Roger's driver could be extended for supporting VBUS. >>>> Also I think Roger's driver is about to get merged. >>>> Probably, Roger or Chanwoo can better tell that >>> >>> It is already queued for 4.1 and is available in linux-next. >>> >>>> >>>>> situation when USB cable is unpluged. In addition some of Odroid boards >>>>> has only VBUS detection (without ID pin), so this driver cannot handle >>>>> them at all. >>> >>> why not? >>> >>> x15-beagleboard also gets VBUS event over GPIO and I was planning to extent it >>> to support VBUS detection. >> >> Sounds good to me to extent extcon-usb-gpio.c. >> I'd like to hold only one extcon driver to support both USB and >> USB-HOST with gpio . >> >> There are one more extcon-gpio driver in mailing list as following: >> - extcon-usb-gpio.c (will be merged to Linux 4.1) >> - extcon-odroid-usbotg.c >> - extcon-otg_gpio.c [1] >> [1] https://lkml.org/lkml/2015/2/19/411 >> >> The each extcon gpio driver support both USB/USB-HOST cable by using >> different way, >> Because some board which detect USB/USB-HOST by gpio have a little >> different pin composition > > These differences are small. In general we have three cases: > > 1. We have both VBUS and ID pin detection - we can detect USB, USB-HOST > and cable disconnection. > > 2. We have only VBUS detection - we can detect USB and cable disconnection. > > 3. We have ID pin only - we can distinguish between USB and USB-HOST but > without ability to detect cable disconnection. > >> >> I think only one extcon driver can support all cases with optional properties. > > So my driver in current form is ready for that. Only thing it would need > to change is to make VBUS detection an option (for now is mandatory > because all of supported Odroid boards have it). Then boards with VBUS > detection only or ID pin detection only will be handled also. I can also > change name of the driver to more generic. I'm going to prepare V2 on my > patches today. Could you implement this feature on extcon-usb-gpio.c to support various pin composition? because extcon-usb-gpio.c was already implemented by Roger. If you implement other extcon driver to detect USB/USB-HOST cable by using gpio, there will be similar two extcon gpio driver for USB cable. And, As Roger comment, he have the plan to extend the extcon-usb-gpio.c. So, If you will implement some feature for extcon driver with gpio, I'd like you to share your plan this thread to remove duplicat work. Thanks, Chanwoo Choi > > Thanks, > Robert Baldyga > >> >> Roger, >> I'd like you to share your plan to extent the extcon-usb-gpio.c for >> removing duplicate work. >> >> [snip] >> >> Thanks, >> Chanwoo Choi >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-usb" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > -- > 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/ >