Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933234AbdCXLIr (ORCPT ); Fri, 24 Mar 2017 07:08:47 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:51563 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780AbdCXLIg (ORCPT ); Fri, 24 Mar 2017 07:08:36 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: b6c32a38-f79f06d000001a72-1b-58d4fe1ef1d4 Content-transfer-encoding: 8BIT Message-id: <58D4FE1D.9040404@samsung.com> Date: Fri, 24 Mar 2017 20:08:13 +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: Baolin Wang , myungjoo.ham@samsung.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: broonie@kernel.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 1/2] extcon: usb-gpio: Add level trigger support In-reply-to: <0db99bd509c94ea8a80f633022d15235a99391a9.1489995966.git.baolin.wang@linaro.org> X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0wTaRTN12mnA271s7V4g67WSYyBhNqpBcYHG4yoTTSRxMQQjakTGFsi nZZOQfFXWRcf+AguMVFsRIwVaYgaQAMKikisxgRfBV+Igqg8gs/gawnY6WDWf+c795zv3nty KULrJ+OpXMHLewQujyZjlZduJBiT5oyHs0x9d/XsJ1+YYI/09pNsZXuHin3f9oZgH172k2zg 0X0F+6z4LMmWtLSr0ylr7YlaZK0L7iOt3V3NpPXZ+CvCeqghiKyf6+Zkkhv5ZQ6ey+E9Bl7I duXkCvY0es162wpbcoqJSWIWs6m0QeCcfBqdsTYzaVVuXmQg2lDI5RVEqExOFOmFfy3zuAq8 vMHhEr1p9CaGMRsZU6rRbDYbLYs2LzEnRyRbeEfDrmalu0uz48ztE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k+YtYoaof8Aocf79 DCaIei2JpS+Og9ksAqoSx2ecYwex2YDi+1/cYAOx+QUUJa7+eMwIMlNUIEKi+0QlSFhEIE9i zvU7zBDziySunD3EDlIiLOAisW6NMMSqTYwSr5eeAruZUyBeYu/eiSwTGAVnIbl0FsKls5Bc uoCReRWjRGpBckFxUnquYV5quV5xYm5xaV66XnJ+7iZGcCw+k9rBeHCX+yFGAQ5GJR7eE6+v RAixJpYVV+YeYpTgYFYS4d31GyjEm5JYWZValB9fVJqTWnyI0RTo1YnMUqLJ+cA0kVcSb2hi bmJubGBhbmlpYqQkzts4+1m4kEB6YklqdmpqQWoRTB8TB6cUMDbmsp81PnD9SW/gucNrdt+Z O/PygrRPpxd1B/QevXNa58PVgrl3uFZNk9u57HKqkfudCQu/rFv053+K+0ebXaZTlC6KlTwp 1vtccd3XrvroWV6hVnu5Y+/sVnfG1Z/sPmz35gCv83em6u6FDjsCcrrXmf9iStbfln19zzP+ pym3JtRaOjnZx1oqsRRnJBpqMRcVJwIATMxev9sCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170324110814epcas1p2994c50deaeeb5304f50d46b3681d4778 X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170320080127epcas1p120786738dd2e3cd371bf6410d5f2b3a6 X-RootMTR: 20170320080127epcas1p120786738dd2e3cd371bf6410d5f2b3a6 References: <0db99bd509c94ea8a80f633022d15235a99391a9.1489995966.git.baolin.wang@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1705 Lines: 45 Hi, On 2017년 03월 20일 16:59, Baolin Wang wrote: > Now extcon-usb-gpio only supports for GPIO egdge trigger, but VBUS/ID > gpios' detection can be triggered by the level trigger on some platforms. > Thus intoduce one property 'extcon-gpio,level-trigger' to identify this > situation. > > Signed-off-by: Baolin Wang > --- > .../devicetree/bindings/extcon/extcon-usb-gpio.txt | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt > index dfc14f7..191504b 100644 > --- a/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt > +++ b/Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt > @@ -9,6 +9,9 @@ Required properties: > Either one of id-gpio or vbus-gpio must be present. Both can be present as well. > - id-gpio: gpio for USB ID pin. See gpio binding. > - vbus-gpio: gpio for USB VBUS pin. > +- extcon-gpio,level-trigger: Boolean, set this gpio's interrupt flag to It is 'extcon-usb-gpio' instead of 'extcon-gpio'. > +level trigger. If not specified defaults to false, gpio's interrupt flag > +defaults to edge trigger. I understand why you need the new flag. But, I'm not sure it is right way to add the new flag for interrupt flag. IMHO, I think that we need to find the more proper way to get the interrupt flag or maybe, we may need to implement the new helper api to get the interrupt flag for gpio pin when we use the gpio as the interrupt source, > > Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below: > extcon_usb1 { > -- Best Regards, Chanwoo Choi Samsung Electronics