Re: [PATCH] gpio-pisosr: add support for get_multiple

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

 



On Mon, Jul 16, 2018 at 2:44 PM Morten Hein Tiljeset
<morten.tiljeset@xxxxxxxxx> wrote:

> Signed-off-by: Morten Hein Tiljeset <morten.tiljeset@xxxxxxxxx>
> Reviewed-by: Sean Nyekjaer <sean.nyekjaer@xxxxxxxxx>

Patch applied!
No more feedback, so obvioisly apply time.

> +       bitmap_zero(bits, chip->ngpio);
> +       for (i = 0; i < nbytes; i++) {
> +               j = i / sizeof(unsigned long);
> +               bits[j] |= ((unsigned long) gpio->buffer[i])
> +                          << (8 * (i % sizeof(unsigned long)));
> +       }

That's some clever code. We should probably think about making that
 a library way of getting multiple.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux