[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5728340.kX3ri7Iz4s@pcimr>
Date: Thu, 05 Mar 2015 12:57:56 +0100
From: Rojhalat Ibrahim <imr@...chenk.de>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Alexandre Courbot <gnurou@...il.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
Alexandre Courbot <acourbot@...dia.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v5 4/4] mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions
On Thursday 05 March 2015 10:04:20 Linus Walleij wrote:
> On Wed, Mar 4, 2015 at 3:33 PM, Rojhalat Ibrahim <imr@...chenk.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists