From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Laxman Dewangan
<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce
Date: Tue, 3 May 2016 09:59:14 -0600 [thread overview]
Message-ID: <5728CAD2.9050701@wwwdotorg.org> (raw)
In-Reply-To: <5727A535.2060808-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 05/02/2016 01:06 PM, Laxman Dewangan wrote:
>
> On Tuesday 03 May 2016 12:14 AM, Stephen Warren wrote:
>> On 05/02/2016 11:58 AM, Laxman Dewangan wrote:
>>>
>>>
>>> Toggling OE bit is something emulating the open drain here.
>>
>> From the perspective of the external HW that's attached to the GPIO, I
>> believe there's no difference.
>>
>>> I think idea is that when we configure the pin in open drain then it
>>> should be automatically handled by HW when we want to set pin state
>>> high or low. When we set low, the pin should be driven and when high
>>> then it should be tristated input. We should not need any direction bit
>>> setting.
>>
>> I don't imagine anything in the kernel cares, so long as the correct
>> logic level is present on the pin based on whatever GPIO API was last
>> called.
>>
>> I'd be very surprised if there wasn't hardware that could only
>> implement open-drain by this "emulation" method, so I'd be very
>> surprised if something prohibited that implementation style.
>>
>
> The emulation method implemented just to not drive high for open drain.
> Recently, proper callback added for hw control for open drain and hence
> emulation method is not needed for such HW.
>
> I think if HW support the callback to implement the open drain then use
> the HW method otherwise fallback to emulation method.
I don't see any benefit to that. It makes the code more complex without
enabling any more features.
For reference, on Tegra124 and earlier, very few pins have open-drain
control in HW (pinmux) whereas you can emulate it in the GPIO module for
any pin. In Tegra210 and Tegra186, many pins have open-drain control in
HW (pinmux) yet a good number still don't, yet you can still emulate
this in the GPIO module for any pin.
prev parent reply other threads:[~2016-05-03 15:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 10:38 [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Laxman Dewangan
2016-04-25 10:38 ` [PATCH V5 1/4] gpio: tegra: Don't open code of_device_get_match_data() Laxman Dewangan
[not found] ` <1461580714-22479-2-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-29 8:59 ` Linus Walleij
2016-04-25 10:38 ` [PATCH V5 2/4] gpio: tegra: Make of_device_id compatible data to constant Laxman Dewangan
2016-04-29 9:00 ` Linus Walleij
2016-04-25 10:38 ` [PATCH V5 3/4] gpio: tegra: Get rid of all file scoped global variables Laxman Dewangan
2016-04-29 9:01 ` Linus Walleij
2016-04-25 10:38 ` [PATCH V5 4/4] gpio: tegra: Add support for gpio debounce Laxman Dewangan
[not found] ` <1461580714-22479-5-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-28 5:58 ` Alexandre Courbot
2016-04-29 9:03 ` Linus Walleij
2016-04-29 9:07 ` [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Linus Walleij
2016-04-29 9:20 ` Laxman Dewangan
[not found] ` <5723274B.3050209-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-30 11:07 ` Linus Walleij
[not found] ` <CACRpkdZ-muOGvtKbKNP66Bv5FSPeMeYvmArC5GAM92EcKp+kgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-02 6:44 ` Laxman Dewangan
2016-05-02 16:12 ` Stephen Warren
[not found] ` <57277C70.5080204-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-05-02 17:58 ` Laxman Dewangan
[not found] ` <57279534.5010409-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-02 18:44 ` Stephen Warren
2016-05-02 19:06 ` Laxman Dewangan
[not found] ` <5727A535.2060808-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-05-03 15:59 ` Stephen Warren [this message]
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=5728CAD2.9050701@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@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).