From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v3 1/8] iio: stx104: Implement get_multiple callback Date: Sat, 17 Mar 2018 20:51:07 +0200 Message-ID: References: <14a09900bf4642495ebe4072b9eb02769dbc4c5e.1521301345.git.vilhelm.gray@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <14a09900bf4642495ebe4072b9eb02769dbc4c5e.1521301345.git.vilhelm.gray@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: William Breathitt Gray Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , linux-iio@vger.kernel.org, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler List-Id: linux-gpio@vger.kernel.org On Sat, Mar 17, 2018 at 5:49 PM, William Breathitt Gray 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