linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC 0/2] gpio: of: Add DT overlay support for GPIO hogs
@ 2019-12-30 13:38 Geert Uytterhoeven
  2019-12-30 13:38 ` [PATCH/RFC 1/2] gpio: of: Extract of_gpiochip_add_hog() Geert Uytterhoeven
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2019-12-30 13:38 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Pantelis Antoniou,
	Frank Rowand, Rob Herring
  Cc: Peter Ujfalusi, Chris Brandt, linux-gpio, devicetree,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

	Hi all,

As GPIO hogs are configured at GPIO controller initialization time,
adding/removing GPIO hogs in Device Tree overlays currently does not
work.  Hence this patch series adds support for that, by registering an
of_reconfig notifier, as is already done for platform, i2c, and SPI
devices.

Perhaps this would be better served through a pinctrl-gpio driver?
Pinctrl is already working fine with DT overlays, as the pinctrl-*
properties are part of the slave device node, and thus looked up at
slave device node attachment time, not at pin controller initialization
time.

In my particular use case (talking to SPI devices connected to a PMOD
connector on the RSK+RZA1 development board), the GPIO performs board
level muxing of a.o. the SPI MOSI/MISO/SCK signals.  Hence the hog
really needs to be active only while talking to the SPI device, so the
muxing could (in theory) be done upon demand.
But how to describe that in DT, and implement it (using Runtime PM?)?

Thanks for your comments!

Geert Uytterhoeven (2):
  gpio: of: Extract of_gpiochip_add_hog()
  gpio: of: Add DT overlay support for GPIO hogs

 drivers/gpio/gpiolib-of.c | 133 +++++++++++++++++++++++++++++++++-----
 drivers/gpio/gpiolib-of.h |   2 +
 drivers/gpio/gpiolib.c    |  14 +++-
 drivers/gpio/gpiolib.h    |   3 +
 4 files changed, 133 insertions(+), 19 deletions(-)

-- 
2.17.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

end of thread, other threads:[~2020-01-24 22:02 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30 13:38 [PATCH/RFC 0/2] gpio: of: Add DT overlay support for GPIO hogs Geert Uytterhoeven
2019-12-30 13:38 ` [PATCH/RFC 1/2] gpio: of: Extract of_gpiochip_add_hog() Geert Uytterhoeven
2019-12-30 13:38 ` [PATCH/RFC 2/2] gpio: of: Add DT overlay support for GPIO hogs Geert Uytterhoeven
2020-01-06 23:34   ` Frank Rowand
2020-01-07  7:10     ` Frank Rowand
2020-01-07  7:25       ` Frank Rowand
2020-01-07  8:02         ` Geert Uytterhoeven
2020-01-07  8:11       ` Geert Uytterhoeven
2020-01-24 21:57         ` Frank Rowand
2020-01-24 22:02           ` Frank Rowand
2020-01-07  7:59     ` Geert Uytterhoeven
2020-01-03  9:51 ` [PATCH/RFC 0/2] " Bartosz Golaszewski
2020-01-07  7:46   ` Geert Uytterhoeven
2020-01-07  9:03     ` Bartosz Golaszewski
2020-01-07  9:49       ` Geert Uytterhoeven
2020-01-06 23:34 ` Frank Rowand
2020-01-07  7:51   ` Geert Uytterhoeven

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).