From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751471AbbD3CK3 (ORCPT ); Wed, 29 Apr 2015 22:10:29 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:51916 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbbD3CKZ (ORCPT ); Wed, 29 Apr 2015 22:10:25 -0400 X-AuditID: cbfec7f5-f794b6d000001495-28-55418f143506 Message-id: <55418F0B.5090404@samsung.com> Date: Thu, 30 Apr 2015 11:10:19 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-version: 1.0 To: cw00.choi@samsung.com Cc: linux-kernel , jaewon02.kim@samsung.com, "myungjoo.ham@samsung.com" , Kyungmin Park Subject: Re: [PATCH 0/4] extcon: Modify the name of unused external connector References: <1430137889-22771-1-git-send-email-cw00.choi@samsung.com> <553F01D3.5040305@samsung.com> In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGLMWRmVeSWpSXmKPExsVy+t/xy7oi/Y6hBkfviVtc//Kc1WJHwxFW i9cvDC3ONr1ht7i8aw6bxe3GFWwObB59W1YxenzeJBfAFMVlk5Kak1mWWqRvl8CV8erxDKaC RaIV03a/Ym9gbBHsYuTkkBAwkXi3ZSULhC0mceHeerYuRi4OIYGljBKtl06CJYQEnjJKnLuZ DmLzCmhJ3JzznhHEZhFQlTh98COYzSZgLLF5+RKgZg4OUYEIie4TlRDlghI/Jt9jAQmLCEhK tOwzAxnPLLCeUWLbz9Vg44UFfCX2rf3CArF3LaPEnmvHwBKcAsES925uBLOZBcwkvrw8zAph y0tsXvOWeQKjwCwkO2YhKZuFpGwBI/MqRtHU0uSC4qT0XCO94sTc4tK8dL3k/NxNjJDQ/bqD cekxq0OMAhyMSjy8EiYOoUKsiWXFlbmHGCU4mJVEeBd3OoYK8aYkVlalFuXHF5XmpBYfYpTm YFES5525632IkEB6YklqdmpqQWoRTJaJg1OqgTHi82P5qRnsgndUu7Xv6Ef67zHtlSm48ltc t/v4zokv+uS6J/1PYGedNeFQCV+S9fmP/i/vTjS2e5X01mh/c/ebzdpKWw1NWd86h/+f327J 8U2pwiD1mtaB+fGnr6Y/fnLZg/+G1NFP3K/lQyXu77g7JX6C4OtdrU/VXfJkJhr/EgqNUjHy jFJiKc5INNRiLipOBACeAKK9WQIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.04.2015 17:40, Chanwoo Choi wrote: > On Tue, Apr 28, 2015 at 12:43 PM, Krzysztof Kozlowski > wrote: >> On 27.04.2015 21:31, Chanwoo Choi wrote: >>> >>> This patchset alter the unused name of external connector (jig/dock/MHL) >>> as >>> following. The name of jig cable and dock device include the non-standard >>> H/W >>> information. On user-space side, this information are not necessary. The >>> extcon >>> core will support the other method to inform the specific H/W information >>> to >>> kernel device driver and framework. For example, extcon core have the plan >>> to add >>> the notifier chain for USB ID/VBUS pin state. If extcon consumer (kernel >>> device >>> driver and framework) use the notifer chain for USB ID/VBUS, they can get >>> the >>> state of both JIG and USB when JIG-USB-ON cable is attached. >>> >>> And last patch removes the unused 'num_cables' filed on extcon-adc-jack.c. >>> >>> 1. jig cable name >>> - JIG-USB-ON -->| >>> - JIG-USB-OFF -->| >>> - JIG-UART-ON -->| >>> - JIG-UART-OFF -->|--> JIG >>> >>> 2. dock device name >>> - Dock-Smart -->| >>> - Dock-Desk -->| >>> - Dock-Audio -->| >>> - Dock-Card -->|--> DOCK >>> >>> 3. MHL-TA cable name >>> - MHL-TA -> TA >> >> >> Hi, >> >> That makes sense but isn't such change a break of interface with user-space? >> The user-space may expect Dock-xxx for Dock. > > I guess it's possible. But, the "Dock-{Smart|Desk|Audio}" device name are not > standard. Their name are only used for Samsung Galaxy S3 (releaesd 3.0 > kernel) and it is not for mainline kernel. > > So, I want to make the standard cable name for mainline kernel and user-space. > The extcon driver will send the event of 'dock' device with specific > external connector which is connected to 'dock' device. > > For example, Dock-Smart means the Dock device with MHL cable. When > Dock-Smart is attached, extcon driver will send the two external > connector state of > both 'DOCK' and 'MHL'. So, the user-space process will detect the kind of dock > by catching both 'DOCK' and 'MHL' uevent. Okay, one more concern - for Dock-Smart the extcon will send two consecutive events (first DOCK, then MHL). So to distinguish this from two separate connections of Dock and MHL (user first connects some Dock, disconnects, connects MHL), the driver always has to call extcon_set_cable_state(edev, "Dock", false) after disconnection. Without the "disconnect" state this case would mean for userspace "Dock+MHL". This looks like an important part of API for extcon and for driver implementations. So it should be documented somewhere? Best regards, Krzysztof