lkml.org 
[lkml]   [2011]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 1/1] gpio: introduce gpio_export_array to ease export for gpio arrays
Date
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> owner@vger.kernel.org] On Behalf Of Stephen Warren
> Sent: Wednesday, November 16, 2011 2:37 AM
> To: Dong Aisheng; linux-kernel@vger.kernel.org
> Cc: grant.likely@secretlab.ca; arnd@arndb.de
> Subject: RE: [PATCH 1/1] gpio: introduce gpio_export_array to ease export
> for gpio arrays
>
> Dong Aisheng wrote at Tuesday, November 15, 2011 2:54 AM:
> > Introduce gpio_export_array function to ease the export operation for
> > gpio arrays.
> > This can cooperate with the exist gpio_request_array function.
> ...
> > +/**
> > + * gpio_export_array - export multiple GPIOs in a single call
> > + * @array: array of the 'struct gpio'
> > + * @num: how many GPIOs in the array
> > + */
> > +int gpio_export_array(const struct gpio *array, size_t num,
> > + bool direction_may_change)
>
> Should direction_may_change be added to "struct gpio" so it can vary per
> pin?
>
I just thougt that after adding this member(or flag) into struct gpio,
we may not need gpio_export_array function. It can be done in gpio_request_one
by checking the flag just like wolfram's patch does (I just found his patch).
It seems his patch is more light to implement this function.

> I might this new function to create its own parameter type instead of re-
> using struct gpio, but I guess the main value here is re-using the data
> passed to both request_array and export_array.
>
Agree. :-)

Regards
Dong Aisheng



\
 
 \ /
  Last update: 2011-11-16 14:45    [W:0.092 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site