Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1393560

Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce

From Stephen Warren <swarren@wwwdotorg.org>
Newsgroups linux.kernel
Subject Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce
Date 2016-05-03 18:00 +0200
Message-ID <ruKTU-2jL-9@gated-at.bofh.it> (permalink)
References (3 earlier) <rtAWC-6MG-7@gated-at.bofh.it> <ruoJH-6Gm-7@gated-at.bofh.it> <ruqBQ-8qK-25@gated-at.bofh.it> <rur4S-iN-13@gated-at.bofh.it> <rurxU-SM-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Linus Walleij <linus.walleij@linaro.org> - 2016-04-29 11:10 +0200
  Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Laxman Dewangan <ldewangan@nvidia.com> - 2016-04-29 11:40 +0200
    Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Linus Walleij <linus.walleij@linaro.org> - 2016-04-30 13:10 +0200
      Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Laxman Dewangan <ldewangan@nvidia.com> - 2016-05-02 09:00 +0200
      Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Stephen Warren <swarren@wwwdotorg.org> - 2016-05-02 18:20 +0200
        Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Laxman Dewangan <ldewangan@nvidia.com> - 2016-05-02 20:20 +0200
          Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Stephen Warren <swarren@wwwdotorg.org> - 2016-05-02 20:50 +0200
            Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Laxman Dewangan <ldewangan@nvidia.com> - 2016-05-02 21:20 +0200
              Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce Stephen Warren <swarren@wwwdotorg.org> - 2016-05-03 18:00 +0200

csiph-web