lkml.org 
[lkml]   [2018]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/8] iio: stx104: Implement get_multiple callback
On Sat, Mar 17, 2018 at 5:49 PM, William Breathitt Gray
<vilhelm.gray@gmail.com> wrote:
> The Apex Embedded Systems STX104 series of devices provides 4 TTL
> compatible lines of inputs accessed via a single 4-bit port. Since four
> input lines are acquired on a single port input read, the STX104 GPIO
> driver may improve multiple input reads by utilizing a get_multiple
> callback. This patch implements the stx104_gpio_get_multiple function
> which serves as the respective get_multiple callback.

> +static int stx104_gpio_get_multiple(struct gpio_chip *chip, unsigned long *mask,
> + unsigned long *bits)
> +{
> + struct stx104_gpio *const stx104gpio = gpiochip_get_data(chip);
> +

> + *bits = inb(stx104gpio->base);

I think on LE and BE if will give you different results.

> +
> + return 0;
> +}



--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-03-17 19:51    [W:0.035 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site