From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbbETDYt (ORCPT ); Tue, 19 May 2015 23:24:49 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:59902 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbbETDYs (ORCPT ); Tue, 19 May 2015 23:24:48 -0400 X-AuditID: cbfec7f5-f794b6d000001495-9e-555bfe7d3127 Message-id: <555BFE78.2000503@samsung.com> Date: Wed, 20 May 2015 12:24:40 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-version: 1.0 To: Chanwoo Choi Cc: Chanwoo Choi , linux-kernel , "myungjoo.ham@samsung.com" , Charles Keepax , gg@slimlogic.co.uk, Kishon Vijay Abraham I , jaewon02.kim@samsung.com, Roger Quadros , "Pallala, Ramakrishna" , george.cherian@ti.com, Felipe Balbi , Aaro Koskinen Subject: Re: [PATCH 1/2] extcon: Use the unique id for external connector instead of string References: <1431700278-30465-1-git-send-email-cw00.choi@samsung.com> <1431700278-30465-2-git-send-email-cw00.choi@samsung.com> <555B2C56.8080105@samsung.com> In-reply-to: <555B2C56.8080105@samsung.com> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeLIzCtJLcpLzFFi42I5/e/4Nd3af9GhBruaJCzWvHCwOHi/3uLf lBvsFte/PGe1eHZU2+LUweWsFv1bXCx2NBxhtXj9wtDiwtMeNovLu+awWdxuXMFmsfDNTSaL nkdaDnweO2fdZfc4/HUhi8fiPS+ZPF5O/M3m0bdlFaPH1Cl/GT2O39jO5PF5k1wARxSXTUpq TmZZapG+XQJXxtrpW1gK7vBUTNsm2sD4nbOLkZNDQsBEYsaWMywQtpjEhXvr2boYuTiEBJYy Smzs2scE4TxllJi+9yIzSBWvgJbEj6lb2EBsFgFVievHToB1swkYS2xevgQsLioQIfH28kkm iHpBiR+T74HViAhoSMz8e4URZCizwBVmiQ8/ehlBEsICsRLd0+YwQmzbwCTx++4NdpAEp4C2 xP+F31i7GDmAOtQlpkzJBQkzC8hLbF7zlnkCo8AsJDtmIVTNQlK1gJF5FaNoamlyQXFSeq6R XnFibnFpXrpecn7uJkZI9Hzdwbj0mNUhRgEORiUe3hOHokOFWBPLiitzDzFKcDArifDOmgkU 4k1JrKxKLcqPLyrNSS0+xCjNwaIkzjtz1/sQIYH0xJLU7NTUgtQimCwTB6dUA2NYfqbM4ku3 2pgT11/iV1u2e/02jwcs8z3Fb07vqeVS87Q67lopwBSb41YoGV1/keGuRKtARN7P32/rfubO u/wzNlYz6c+WW4ceMHIuqbiQvqZW4oFhyaH1Nl8mrw9b1THVfcazt5WL953c9lyirHlf86zr p7sMJTW7btzZ875SyTr5nkMSp58SS3FGoqEWc1FxIgAi78rbmgIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.05.2015 21:28, Chanwoo Choi wrote: > Hi Krzysztof, > >>>> + >>>> + if (i == edev->max_supported) >>>> + return -EINVAL; >>>> >>>> if (index < 0 || (edev->max_supported && edev->max_supported <= index)) >>>> return -EINVAL; >>>> @@ -605,7 +644,7 @@ static void dummy_sysfs_dev_release(struct device *dev) >>>> * >>>> * Return the pointer of extcon device if success or ERR_PTR(err) if fail >>>> */ >>>> -struct extcon_dev *extcon_dev_allocate(const char **supported_cable) >>>> +struct extcon_dev *extcon_dev_allocate(const enum extcon *supported_cable) >>> >>> I think you also have to update the documentation. At least for >>> {devm}_extcon_dev_allocate but maybe in other places too. Previously >>> the documentation states that supported_cable is an array of strings. >>> Additionally AFAIU now it must end with EXTCON_NONE. This >>> sentinel-like info must be clearly documented. > > As you commented, extcon must need to document the update and usage method of extcon core. > The mainline kernel includes only the 'Documentation/extcon/porting-android-switch-class'. > Namely, the mainline kernel have not included the document showing the usage method of extcon core. I mean documentation for the function. The kerneldoc above functions says: * @supported_cable: Array of supported cable names ending with NULL. * If supported_cable is NULL, cable name related APIs * are disabled. AFAIU now the supported cable must end with EXTCON_NONE. Is it correct? Best regards, Krzysztof