All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v3 0/2] Request GPIO when enabling interrupt
@ 2018-11-20 15:19 Fabrizio Castro
  2018-11-20 15:19 ` [RFC v3 1/2] pinctrl: core: Add pinctrl_mux_gpio_request_enable Fabrizio Castro
  2018-11-20 15:19 ` [RFC v3 2/2] gpio: rcar: Set pin as a GPIO when configuring an interrupt Fabrizio Castro
  0 siblings, 2 replies; 8+ messages in thread
From: Fabrizio Castro @ 2018-11-20 15:19 UTC (permalink / raw)
  To: Linus Walleij, Geert Uytterhoeven, Bartosz Golaszewski
  Cc: Fabrizio Castro, linux-gpio, Simon Horman, Chris Paterson,
	Biju Das, linux-renesas-soc

Dear All,

here is a new iteration of the fix for the pinmuxing issue while
requesting an interrupt.
I don't like this implementation either as:
* pinctrl_mux_gpio_request_enable is very similar to pinctrl_gpio_request,
  and the name I have picked up is not exactly brilliant...
* it may cause an error message like "Pin X is busy, can't configure it as
  GPIO." (for cd-gpios pins for example) as it can't check the status of the pin
  before requesting it (can it?)
* because it's discarding errors returned by pinctrl_mux_gpio_request_enable

This problem needs fixing, but the solutions proposed so far don't look
great, as they are not spectacularly neat.

What's the best way to fix this?

Ideas and comments very welcome!

Thanks,
Fab

Fabrizio Castro (2):
  pinctrl: core: Add pinctrl_mux_gpio_request_enable
  gpio: rcar: Set pin as a GPIO when configuring an interrupt

 drivers/gpio/gpio-rcar.c         |  3 +++
 drivers/pinctrl/core.c           | 34 ++++++++++++++++++++++++++++++++++
 include/linux/pinctrl/consumer.h |  6 ++++++
 3 files changed, 43 insertions(+)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-08  8:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 15:19 [RFC v3 0/2] Request GPIO when enabling interrupt Fabrizio Castro
2018-11-20 15:19 ` [RFC v3 1/2] pinctrl: core: Add pinctrl_mux_gpio_request_enable Fabrizio Castro
2018-12-05 21:46   ` Linus Walleij
2018-12-06  9:47     ` Fabrizio Castro
2019-03-01 13:27       ` Geert Uytterhoeven
2019-03-01 14:22         ` Fabrizio Castro
2019-03-08  8:24         ` Linus Walleij
2018-11-20 15:19 ` [RFC v3 2/2] gpio: rcar: Set pin as a GPIO when configuring an interrupt Fabrizio Castro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.