From: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Baolin Wang <baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
MyungJoo Ham
<myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Linaro Kernel Mailman List
<linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/2] extcon: usb-gpio: Add level trigger support
Date: Fri, 24 Mar 2017 07:41:09 -0500 [thread overview]
Message-ID: <CAL_JsqLOHP5fVcJDf+aMWFmPSHiBnHHfcPm4xu1CZJjWo9GtdQ@mail.gmail.com> (raw)
In-Reply-To: <CAMz4kuJrUtC6HL0Lbuqsoa2cMB9-2zuHMii1v7Y_-jCyKiL8qQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, Mar 24, 2017 at 6:56 AM, Baolin Wang <baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> Hi,
>
> On 24 March 2017 at 19:08, Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
>> 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 <baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>> ---
>>> .../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'.
>
> Sure.
"extcon-gpio" is not a vendor, so don't make it a vendor prefix.
>>> +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,
>
> Yes, I agree with you. We already have helper functions to get
> interrupt flag from device tree, but we can not get the irq number of
> GPIO to configure in device tree, then I introduce one new flag to
> indicate the trigger type. But I like to change the patch if there are
> any good suggestion. Thanks.
The extcon binding needs an overhaul in general. I'm not going to take
extensions to a broken binding. What's needed is a USB connector
binding like we have for HDMI and other video connectors. And for
USB-C, those need to be combined.
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-03-24 12:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170320080127epcas1p120786738dd2e3cd371bf6410d5f2b3a6@epcas1p1.samsung.com>
2017-03-20 7:59 ` [PATCH 1/2] extcon: usb-gpio: Add level trigger support Baolin Wang
2017-03-20 7:59 ` [PATCH 2/2] extcon: usb-gpio: Add the GPIO " Baolin Wang
2017-03-24 11:08 ` [PATCH 1/2] extcon: usb-gpio: Add " Chanwoo Choi
[not found] ` <58D4FE1D.9040404-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-03-24 11:56 ` Baolin Wang
[not found] ` <CAMz4kuJrUtC6HL0Lbuqsoa2cMB9-2zuHMii1v7Y_-jCyKiL8qQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-24 12:41 ` Rob Herring [this message]
[not found] ` <CAL_JsqLOHP5fVcJDf+aMWFmPSHiBnHHfcPm4xu1CZJjWo9GtdQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-29 6:08 ` Baolin Wang
[not found] ` <CAMz4kuLi0rP7UP93hGZoO2WKTDTA08LQ3jYgL14qoaudV6rW+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-03 10:56 ` Baolin Wang
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=CAL_JsqLOHP5fVcJDf+aMWFmPSHiBnHHfcPm4xu1CZJjWo9GtdQ@mail.gmail.com \
--to=robh+dt-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=myungjoo.ham-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).