All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Gilles BULOZ <gilles.buloz@kontron.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>, linux-gpio@vger.kernel.org
Subject: Re: [questions] : gpiolib and gpioset behaviour
Date: Sat, 27 Apr 2024 20:09:02 +0800	[thread overview]
Message-ID: <20240427120902.GA367260@rigel> (raw)
In-Reply-To: <20240426020720.GA9777@rigel>

On Fri, Apr 26, 2024 at 10:07:20AM +0800, Kent Gibson wrote:
> On Mon, Apr 22, 2024 at 06:49:05PM +0200, Gilles BULOZ wrote:
> > On Mon, Apr 22, 2024 at 3:55 PM Bartosz Golaszewski wrote :
> > > On Mon, Apr 22, 2024 at 2:44 PM Gilles BULOZ <gilles.buloz@kontron.com> wrote:
> > >>
>
> Note that the mask in gc->get_multiple() is unsigned long*, so it is a
> pointer to an array of unsigned long.  Its width is not limited by
> unsigned long, but by the bits parameter.  In your case the mask you pass
> should contain multiple unsigned longs to achieve 112 bits.
> Refer to gpiod_get_array_value_complex() for an example of building bitmap
> masks to pass to gc->get_multiple(), in that case via
> gpio_chip_get_multiple().
>

Bah, what was I saying here - both the mask AND bits parameters of
get_multiple()/set_multiple() are bitmaps of width gc->ngpio, where the
mask identifies the pins to get/set and bits contains the values.

My bad - must've been before the coffee soaked in.

Cheers,
Kent.


  parent reply	other threads:[~2024-04-27 12:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 12:44 [questions] : gpiolib and gpioset behaviour Gilles BULOZ
2024-04-22 15:55 ` Bartosz Golaszewski
2024-04-22 16:49   ` Gilles BULOZ
2024-04-22 18:04     ` Bartosz Golaszewski
2024-04-26  2:07     ` Kent Gibson
2024-04-26 13:08       ` Gilles BULOZ
2024-04-26 13:37         ` Kent Gibson
2024-04-26 16:16           ` Gilles BULOZ
2024-04-27  0:23             ` Kent Gibson
2024-04-27 12:09       ` Kent Gibson [this message]
2024-04-29  8:50         ` Gilles BULOZ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240427120902.GA367260@rigel \
    --to=warthog618@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=gilles.buloz@kontron.com \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.