From: Rojhalat Ibrahim <imr@rtschenk.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v5 4/4] mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions
Date: Thu, 05 Mar 2015 12:57:56 +0100 [thread overview]
Message-ID: <5728340.kX3ri7Iz4s@pcimr> (raw)
In-Reply-To: <CACRpkdaU7cK1LNdhDMBnir0WX92JnT=s6BV-jidNH3i-Ty6HgQ@mail.gmail.com>
On Thursday 05 March 2015 10:04:20 Linus Walleij wrote:
> On Wed, Mar 4, 2015 at 3:33 PM, Rojhalat Ibrahim <imr@rtschenk.de> wrote:
>
> > And the interface as proposed in this series is very convenient for obtaining
> > all the GPIOs belonging to a group with a single function call and without
> > having to know the number of GPIOs within the group beforehand.
> >
> > So if we want to support different use cases, I think it's quite good as it is.
> > People who want to set a group of GPIOs as obtained by gpiod_get_array() can
> > do so with a single call to gpiod_set_array(), the only overhead being that
> > they have to specify the two elements of struct gpiod_descs explicitly.
> > Likewise people who want to set a group of GPIOs obtained with a combination
> > of calls to gpiod_get_array() and gpiod_get() can do so too. They just have
> > to create that group first.
> >
> > On the other hand if gpiod_set_array() would require a struct gpiod_descs as
> > argument the creation of a group for the second use case would become more
> > complicated as you would have to allocate a struct instead of an array, etc.
> >
> > So let's just keep it the way it is and get this series merged.
>
> I've merged it.
>
Thanks.
> But can you make a separate patch to Documentation/gpio/consumer.txt
> describing the array usecase(s) a bit in detail so people realize when it's
> good to use these functions?
>
Sure.
> > About the confusing function names: I would be happy to submit a patch
> > renaming gpiod_set_array() to gpiod_set_array_value(), once this has been
> > merged. I'm a little concerned about the length of some function names though.
> > Isn't gpiod_set_raw_array_value_cansleep() a bit long?
>
> Just patch it and we'll discuss it... :)
>
Ok. I'll submit a patch after you've merged patch 4/4 in this series in order
to avoid conflicts.
next prev parent reply other threads:[~2015-03-05 11:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 16:28 [PATCH v5 4/4] mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions Rojhalat Ibrahim
2015-02-26 9:54 ` Alexandre Courbot
2015-03-03 9:45 ` Rojhalat Ibrahim
2015-03-04 13:22 ` Alexandre Courbot
2015-03-04 14:33 ` Rojhalat Ibrahim
2015-03-05 9:04 ` Linus Walleij
2015-03-05 11:57 ` Rojhalat Ibrahim [this message]
2015-03-05 8:58 ` Linus Walleij
2015-03-19 9:04 ` Rojhalat Ibrahim
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=5728340.kX3ri7Iz4s@pcimr \
--to=imr@rtschenk.de \
--cc=acourbot@nvidia.com \
--cc=davem@davemloft.net \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).