Re: [RFC 2/4] serdev: add GPIO-based multiplexer support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux