From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759384AbcHEAo5 (ORCPT ); Thu, 4 Aug 2016 20:44:57 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:58505 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754612AbcHEAoz (ORCPT ); Thu, 4 Aug 2016 20:44:55 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfee68d-f79286d000007a9a-ff-57a3deeff062 Content-transfer-encoding: 8BIT Message-id: <57A3DEEF.7030306@samsung.com> Date: Fri, 05 Aug 2016 09:33:51 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Guenter Roeck Cc: Roger Quadros , linux-kernel , Felipe Balbi , myungjoo.ham@samsung.com, Chris Zhong , Guenter Roeck , chanwoo@kernel.org, Krzysztof Kozlowski , "cpgs (cpgs@samsung.com)" Subject: Re: [PATCH v3 2/6] extcon: Add the support for extcon property according to extcon type References: <1470103105-5992-1-git-send-email-cw00.choi@samsung.com> <1470103105-5992-3-git-send-email-cw00.choi@samsung.com> <1c9b6c33-5699-2767-f97c-d14fb0db7ec6@ti.com> <57A05501.8040508@samsung.com> <47c543d6-0d2d-ffe9-6d81-4773eef46729@ti.com> <57A28F8F.7010101@samsung.com> <565b50ac-7b34-740f-ca59-88c3b95bfe82@ti.com> <57A31F92.8010902@samsung.com> In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHIsWRmVeSWpSXmKPExsWyRsSkUPf9vcXhBj8Omloca3vCbjHxxhUW i5eHNC1OvVrGbNG7aAmLxesXhhaXd81hs7jduILNoueRlsX8BzuYHbg8ZjdcZPFYsKnUY9Oq TjaPv7P2s3j0bVnF6HH8xnYmj8+b5ALYo7hsUlJzMstSi/TtErgyzh1VLngo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AUGJH5PvARVxcDALyEscuZQNYapLTJmSC1H+gFHi6oXlUOVaEg3bbjKC1LAIqErM nxMIEmYDCu9/cYMNxOYXUJS4+uMxWImoQIRE94lKkLAIUPWpp8fBLmAWOMkk0dY2GWyksECS xKOmK2C2kMA5FomrE6RAbE6BYImNe9eyT2AUnIXk0FkIh85COHQBI/MqRonUguSC4qT0XMO8 1HK94sTc4tK8dL3k/NxNjOCU8ExqB+PBXe6HGAU4GJV4eB2OLA4XYk0sK67MPcQowcGsJMJb eRcoxJuSWFmVWpQfX1Sak1p8iNEU6NOJzFKiyfnAdJVXEm9obGJmZGlkbmhhZGyuJM77+P+6 MCGB9MSS1OzU1ILUIpg+Jg5OqQbGQxolyf0OtTfW8sa94DM1yJR+YhlimrJ2+eMTFZb/J9pO u7ri8GuHlidMi+omXP959l7RxZYXD9c8nKW6Iub/W9WnVy/cC7uUvHg3t3DFc8azHQIsmkH8 PFECS5K9L718reDXyd52do/bw7WlYQ4v91/h6t+nPbE0uzR84dW4ElGF5uOrxT6nKLEUZyQa ajEXFScCAJtHgpgfAwAA 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 Guenter, On 2016년 08월 04일 23:47, Guenter Roeck wrote: > On Thu, Aug 4, 2016 at 3:57 AM, Chanwoo Choi wrote: >> Hi Guenter and Roger, >> >> On 2016년 08월 04일 17:49, Roger Quadros wrote: >>> On 04/08/16 07:09, Guenter Roeck wrote: >>>> On Wed, Aug 3, 2016 at 5:42 PM, Chanwoo Choi wrote: >>>>> Hi Roger, >>>>> >>>>> On 2016년 08월 03일 18:46, Roger Quadros wrote: >>>>>> Hi Chanwoo, >>>>>> >>>> >>>> [ ... ] >>>> >>>>>>>>> + /* >>>>>>>>> + * Check whether the external connector is attached. >>>>>>>>> + * If external connector is detached, the user can not >>>>>>>>> + * get the property value. >>>>>>>>> + */ >>>>>>>> >>>>>>>> How will this work for USB case? We need to know VBUS and ID states >>>>>>>> even if the USB cable is detached. >>>>>>> >>>>>>> When USB is detached, extcon_get_property return the default value without any operation. >>>>>>> The default value of supported property are 0 (zero). If new property need the differnt default >>>>>>> value, I'll support it. >>>>>> >>>>>> Is the property a property of the connector or of the cable? >>>>>> >>>>>> In my opinion, ID and VBUS are properties of the USB connector and not of >>>>>> the USB cable. So extcon must provide valid status for those properties >>>>>> even if USB cable or USB_HOST cable is detached. >>>>> >>>>> I don't understand about that if USB and USB_HOST are detached, >>>>> how can the USB be operating? As you mentioned that, extcon must >>>>> provide the valid status for both state and properties. >>>>> >>>> >>>> Correct. No cable means that the polarity is unknown, and VBUS must not be >>>> active (for USB_HOST), or it can not be active (for USB). >>> >>> OK. >>> >>>> >>>> Only question might be EXTCON_PROP_USB_ID; I am not sure I understand >>>> what it is supposed to return. Maybe it would be worthwhile to document it ? >>> >>> Agreed. It seems redundant as ID can be easily inferred from USB_HOST cable state. >>> i.e. if USB_HOST is attached ID is 0. If USB_HOST is detached ID is 1. >> >> Do you mean the EXTCON_PROP_USB_ID is un-needed? >> I'll remove the EXTCON_PROP_USB_ID property on next version. >> > > If ID reflects host vs. device state, yes, it is not needed. Or, > alternatively, one of USB and USB_HOST would not be needed if ID is > present. Since that is not feasible because it would modify the ABI to > user space, dropping ID makes sense. OK. I'll drop the EXTCON_PROP_USB_ID. Thanks. Regards, Chanwoo Choi > > Thanks, > Guenter > >>> >>>> >>>>> So, I already mentioned, When USB and USB_HOST are detached, >>>>> extcon return the default value instead of error value. >>>>> I think that it is reasonable. Why is it not a valid? >>>>> >>>> >>>> I agree; I don't know what else could be returned if no cable is >>>> attached, even if we wanted to. >>>> >>> OK. >>> >>> I understood now that if kernel USB driver can interpret EXTCON_USB, EXTCON_USB_HOST >>> and VBUS property, it sufficiently captures ID and VBUS information. >>> >> >> Regards, >> Chanwoo Choi >> > > >