Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1579276
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 04/14] GPIO: Add gpio-ingenic driver |
| Date | 2017-02-12 21:50 +0100 |
| Message-ID | <ta9fQ-2ui-51@gated-at.bofh.it> (permalink) |
| References | <t1iV4-Qv-5@gated-at.bofh.it> <t3AXv-5pP-3@gated-at.bofh.it> <t3AXw-5pP-35@gated-at.bofh.it> <t5HBv-1Ll-5@gated-at.bofh.it> <t90xY-vh-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Feb 9, 2017 at 6:14 PM, Paul Cercueil <paul@crapouillou.net> wrote: >> If you're not just replacing these with GPIO_GENERIC, please also >> include a .get_direction() callback. > > My .direction_input() and .direction_output() callbacks just call into > the pinctrl driver, using pinctrl_gpio_direction_[in,out]put(). > I didn't find a way to get the direction info from the pinctrl driver, > is that something that the core should provide? Hm OK you have a clear point there, there is no such callback. OK I do not require you to fix that at this time. I am hesitant about providing ever more callbacks from GPIO to pin control, I might need some help for consolidation here. With Mika's patches we have a .set_config() call to pinctrl_gpio_set_config() so essentially we *could* actually refactor all pin control drivers providing a GPIO back-end to use: pinctrl_gpio_set_config(gpio, PIN_CONF_PACKED(PIN_CONFIG_INPUT_ENABLE, 0)); pinctrl_gpio_set_config(gpio, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, val)); And replace the calls to pinctrl_gpio_direction_input() and pinctrl_gpio_direction_output() with this throughout. It makes things a bit simpler. If we need to figure things out the reverse direction then pinctrl_gpio_get_config() should be implemented and used as back-end for figuring out direction. Yours, Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v3 04/14] GPIO: Add gpio-ingenic driver Linus Walleij <linus.walleij@linaro.org> - 2017-01-31 15:30 +0100
Re: [PATCH v3 04/14] GPIO: Add gpio-ingenic driver Paul Cercueil <paul@crapouillou.net> - 2017-02-09 18:20 +0100
Re: [PATCH v3 04/14] GPIO: Add gpio-ingenic driver Linus Walleij <linus.walleij@linaro.org> - 2017-02-12 21:50 +0100
csiph-web