Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391591
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V5 0/4] gpio: tegra: Cleanups and support for debounce |
| Date | 2016-04-30 13:10 +0200 |
| Message-ID | <rtAWC-6MG-7@gated-at.bofh.it> (permalink) |
| References | <rrMpc-4ls-7@gated-at.bofh.it> <rtcAV-3l0-1@gated-at.bofh.it> <rtd3Y-3yC-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Apr 29, 2016 at 11:20 AM, Laxman Dewangan <ldewangan@nvidia.com> wrote: > On Friday 29 April 2016 02:37 PM, Linus Walleij wrote: >> On Mon, Apr 25, 2016 at 12:38 PM, Laxman Dewangan <ldewangan@nvidia.com> >> wrote: >> >>> Add support for the debounce as Tegra210 support debounce in HW. >>> Also do the clenaups to remove all global variables. >> >> OK this v5 is applied. >> >> Laxman does this GPIO also have open drain and/or open source >> handling? > > > Some of the pins support the open drain and these are part of pinmux > register set. > For that we have property for setting open drain. > > Is it possible to link the gpio APIs to pincontrol for setting that pin? I have the same issue with Nomadik pin control that I use as a testbed: there is a backend in pin control to the GPIO side. I was thinking about adding a new cross call. We now have this: /* External interface to pin control */ extern int pinctrl_request_gpio(unsigned gpio); extern void pinctrl_free_gpio(unsigned gpio); extern int pinctrl_gpio_direction_input(unsigned gpio); extern int pinctrl_gpio_direction_output(unsigned gpio); I was going to add: extern int pinctrl_gpio_set_config(unsigned gpio, unsigned long config); That can be used by GPIO drivers to call back into pincontrol and set up any config flags using the conventions of the corresponding pin control back-end. This could be used for as well open drain as other things (like pull-up) as the userspace ABI matures (it currently only has in/out and open drain/source). What do you think about this idea? >> Then you might want to look into supporting that too as I just added >> support for native single-endedness to gpiolib, c.f.: >> http://marc.info/?l=linux-gpio&m=146011780301280&w=2 > > Yaah, Some of PMIC's (which I am handling) gpios support open drain and I > think I can have changes for the PMIC gpio driver. Nice! :) >> It would be nice if you also implement .get_direction() which >> makes debugfs and initial reading of the state of the lines >> more accurate. > > Sure, this can be implemented. > Will post the patch on top of the series soon. Thanks. Yours, Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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