From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751311AbbCTHZf (ORCPT ); Fri, 20 Mar 2015 03:25:35 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:55254 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbbCTHZc (ORCPT ); Fri, 20 Mar 2015 03:25:32 -0400 X-AuditID: cbfec7f5-b7fc86d0000066b7-75-550bcac15262 Message-id: <550BCB67.7090702@samsung.com> Date: Fri, 20 Mar 2015 08:25:27 +0100 From: Robert Baldyga User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-version: 1.0 To: Chanwoo Choi , Roger Quadros Cc: George Cherian , Felipe Balbi , Greg KH , "myungjoo.ham@samsung.com" , Chanwoo Choi , 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> In-reply-to: Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsVy+t/xK7oHT3GHGjw8wW9x8H69xfUvz1kt nh3Vtvg4bye7RfPi9WwWNw+tYLS4vGsOm8WiZa3MFmuP3GW3uN24gs2i55GWA7fHzll32T32 z13D7tG3ZRWjx/Eb25k8Pm+SC2CN4rJJSc3JLEst0rdL4Mp4uGQRU8F0iYq3u7ezNTDOE+5i 5OCQEDCRuPnAoIuRE8gUk7hwbz1bFyMXh5DAUkaJv1MvsEI4HxklPjztYAep4hXQkvjROoUN xGYRUJX4O/EUmM0moCOx5fsERpChogIRErcvc0KUC0r8mHyPBSQsIuAicWK+HshIZoEOZonH L94zgcSFBRwk9q73g1jVzyzR0HuOBaSXUyBY4sTGJ2C9zALqElOm5IKEmQXkJTavecs8gVFg FpINsxCqZiGpWsDIvIpRNLU0uaA4KT3XSK84Mbe4NC9dLzk/dxMjJAK+7mBceszqEKMAB6MS D++J49yhQqyJZcWVuYcYJTiYlUR4PTYBhXhTEiurUovy44tKc1KLDzEycXBKNTD6HX8ZtHyZ jdQeFUPm2SJakx5/fbZiP1dG09YLzEV15x+232RMZzvaW7f30f/J0tf2r7y1LKaEs2vK9lNx pnf3HmjqTW31fjPhgGN9kOXlO2w1gU7/3BTeG82bm93qEaMrWx8y1fa3UJiMx3XHtTwrZh7c 8/ndiQc7V69/vtxdMWAdL29FqPs5JZbijERDLeai4kQAJ8ZDo14CAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 >