From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756495AbcHDK51 (ORCPT ); Thu, 4 Aug 2016 06:57:27 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:44253 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751024AbcHDK5Z (ORCPT ); Thu, 4 Aug 2016 06:57:25 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfee68e-f79cb6d000006cfe-4c-57a31f92caee Content-transfer-encoding: 8BIT Message-id: <57A31F92.8010902@samsung.com> Date: Thu, 04 Aug 2016 19:57:22 +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: Roger Quadros , Guenter Roeck Cc: 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> In-reply-to: <565b50ac-7b34-740f-ca59-88c3b95bfe82@ti.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrEIsWRmVeSWpSXmKPExsWyRsSkUHeS/OJwg8utlhbH2p6wW0y8cYXF 4uUhTYtTr5YxW/QuWsJi8fqFocXlXXPYLG43rmCz6HmkZTH/wQ5mBy6P2Q0XWTwWbCr12LSq k83j76z9LB59W1Yxehy/sZ3J4/MmuQD2KC6blNSczL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t0kP2UESvAKCEj8m32PpYuTgYBaQlzhyKRvCVJeYMiUXovwBo8TP9b1sEOVaEiv794HNZBFQ lZjYup0FxGYDiu9/cQOshl9AUeLqj8eMIHNEBSIkuk9UgoRFBFwk/rU9YQWZySywikniw8YG sDnCAkkSj5qusEMse8EssWnLL7BBnAJWEn/XfWScwCg4C8mpsxBOnYVw6gJG5lWMEqkFyQXF Sem5Rnmp5XrFibnFpXnpesn5uZsYwYnhmfQOxsO73A8xCnAwKvHwWkxcFC7EmlhWXJl7iFGC g1lJhLdMbnG4EG9KYmVValF+fFFpTmrxIUZToF8nMkuJJucDk1ZeSbyhsYmZkaWRuaGFkbG5 kjjv4//rwoQE0hNLUrNTUwtSi2D6mDg4pRoYuaxcFI+2CMRfc7jm9bHJX8v/tsWq4rT3mQ5s JU+T3nFPWnymt1+wd3LTt4bz+cotQUuj1ep56ze4/Ll+Uz6/SspHuL7zMHPk9Zqy7IKeb83i LI2ByXfifaW/tl656VGhPDF9L+8s5Y2O7b1HP/X/8udWjjzTUXBEIojByFlxkq35/V3sB5RY ijMSDbWYi4oTAR3WytoiAwAA 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 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. > >> >>> 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