Hi Ulrich, On Wed, Jun 14, 2017 at 4:38 PM, Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx> wrote: > Adds an interface for slave device multiplexing, and an implementation > for GPIO-based multiplexers. > > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx> Thanks for your patch! > --- /dev/null > +++ b/drivers/tty/serdev/mux-gpio.c > +int of_serdev_register_gpio_mux(struct serdev_controller *ctrl) > +{ > + int i, ngpios; > + struct serdev_mux *mux; > + struct device_node *np = ctrl->dev.of_node; > + > + ngpios = of_gpio_named_count(np, "mux-select-gpios"); To make if OF-agnostic, you probably want to use gpiod_count() instead... > + for (i = 0; i < ngpios; ++i) > + mux->gpios[i] = of_get_named_gpio(np, "mux-select-gpios", i); ... and (devm_)gpiod_get_index(). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx 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