From: Chanwoo Choi <cw00.choi@samsung.com>
To: Guenter Roeck <groeck@google.com>
Cc: Roger Quadros <rogerq@ti.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Felipe Balbi <balbi@kernel.org>,
myungjoo.ham@samsung.com, Chris Zhong <zyw@rock-chips.com>,
Guenter Roeck <groeck@chromium.org>,
chanwoo@kernel.org, Krzysztof Kozlowski <k.kozlowski@samsung.com>,
"cpgs (cpgs@samsung.com)" <cpgs@samsung.com>
Subject: Re: [PATCH v3 2/6] extcon: Add the support for extcon property according to extcon type
Date: Fri, 05 Aug 2016 09:33:51 +0900 [thread overview]
Message-ID: <57A3DEEF.7030306@samsung.com> (raw)
In-Reply-To: <CABXOdTcO1LOGF4TC7+RKHLa8zcugev8E915Mh-4BHxSDet4Znw@mail.gmail.com>
Hi Guenter,
On 2016년 08월 04일 23:47, Guenter Roeck wrote:
> On Thu, Aug 4, 2016 at 3:57 AM, Chanwoo Choi <cw00.choi@samsung.com> 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 <cw00.choi@samsung.com> 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
>>
>
>
>
next prev parent reply other threads:[~2016-08-05 0:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 1:58 [PATCH v3 0/6] extcon: Add the support for extcon type and property Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 1/6] extcon: Add the extcon_type to gather each connector into five category Chanwoo Choi
2016-08-02 7:27 ` Roger Quadros
2016-08-02 7:41 ` Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 2/6] extcon: Add the support for extcon property according to extcon type Chanwoo Choi
2016-08-02 7:43 ` Roger Quadros
2016-08-02 8:08 ` Chanwoo Choi
2016-08-03 9:46 ` Roger Quadros
2016-08-04 0:42 ` Chanwoo Choi
2016-08-04 4:09 ` Guenter Roeck
2016-08-04 8:49 ` Roger Quadros
2016-08-04 10:57 ` Chanwoo Choi
2016-08-04 14:47 ` Guenter Roeck
2016-08-05 0:33 ` Chanwoo Choi [this message]
2016-08-02 1:58 ` [PATCH v3 3/6] extcon: Add the support for the capability of each property Chanwoo Choi
2016-08-02 8:07 ` Roger Quadros
2016-08-02 8:18 ` Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 4/6] extcon: Rename the extcon_set/get_state() to maintain the function naming pattern Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 5/6] extcon: Add the synchronization extcon APIs to support the notification Chanwoo Choi
2016-08-02 1:58 ` [PATCH v3 6/6] extcon: Add EXTCON_DISP_DP and the property for USB Type-C Chanwoo Choi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57A3DEEF.7030306@samsung.com \
--to=cw00.choi@samsung.com \
--cc=balbi@kernel.org \
--cc=chanwoo@kernel.org \
--cc=cpgs@samsung.com \
--cc=groeck@chromium.org \
--cc=groeck@google.com \
--cc=k.kozlowski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=rogerq@ti.com \
--cc=zyw@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.